aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-06 16:21:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-06 16:21:16 -0400
commit8e73e367f7dc50f1d1bc22a63e5764bb4eea9b48 (patch)
tree9bf593c1fc7612bcdd64b9ba46e41d340f9e94d3 /arch
parentd2f3e9eb7c9e12e89f0ac5f0dbc7a9aed0ea925d (diff)
parent7323f219533e01cc075ba45a76f3e5b214adb23f (diff)
Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups from Olof Johansson: "This branch contains code cleanups, moves and removals for 3.12. There's a large number of various cleanups, and a nice net removal of 13500 lines of code. Highlights worth mentioning are: - A series of patches from Stephen Boyd removing the ARM local timer API. - Move of Qualcomm MSM IOMMU code to drivers/iommu. - Samsung PWM driver cleanups from Tomasz Figa, removing legacy PWM driver and switching over to the drivers/pwm one. - Removal of some unusued auto-generated headers for OMAP2+ (PRM/CM). There's also a move of a header file out of include/linux/i2c/ to platform_data, where it really belongs. It touches mostly ARM platform code for include changes so we took it through our tree" * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (83 commits) ARM: OMAP2+: Add back the define for AM33XX_RST_GLOBAL_WARM_SW_MASK gpio: (gpio-pca953x) move header to linux/platform_data/ arm: zynq: hotplug: Remove unreachable code ARM: SAMSUNG: Remove unnecessary exynos4_default_sdhci*() tegra: simplify use of devm_ioremap_resource ARM: SAMSUNG: Remove plat/regs-timer.h header ARM: SAMSUNG: Remove remaining uses of plat/regs-timer.h header ARM: SAMSUNG: Remove pwm-clock infrastructure ARM: SAMSUNG: Remove old PWM timer platform devices pwm: Remove superseded pwm-samsung-legacy driver ARM: SAMSUNG: Modify board files to use new PWM platform device ARM: SAMSUNG: Rework private data handling in dev-backlight pwm: Add new pwm-samsung driver ARM: mach-mvebu: remove redundant DT parsing and validation ARM: msm: Only compile io.c on platforms that use it iommu/msm: Move mach includes to iommu directory ARM: msm: Remove devices-iommu.c ARM: msm: Move mach/board.h contents to common.h ARM: msm: Migrate msm_timer to CLOCKSOURCE_OF_DECLARE ARM: msm: Remove TMR and TMR0 static mappings ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig24
-rw-r--r--arch/arm/Kconfig.debug9
-rw-r--r--arch/arm/boot/dts/exynos4210.dtsi2
-rw-r--r--arch/arm/boot/dts/exynos4x12.dtsi2
-rw-r--r--arch/arm/boot/dts/exynos5250.dtsi14
-rw-r--r--arch/arm/boot/dts/exynos5420.dtsi2
-rw-r--r--arch/arm/boot/dts/exynos5440.dtsi2
-rw-r--r--arch/arm/configs/exynos4_defconfig68
-rw-r--r--arch/arm/include/asm/localtimer.h34
-rw-r--r--arch/arm/include/debug/msm.S (renamed from arch/arm/mach-msm/include/mach/debug-macro.S)32
-rw-r--r--arch/arm/kernel/smp.c87
-rw-r--r--arch/arm/kernel/smp_twd.c64
-rw-r--r--arch/arm/mach-at91/board-snapper9260.c2
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c2
-rw-r--r--arch/arm/mach-ep93xx/vision_ep9307.c2
-rw-r--r--arch/arm/mach-exynos/common.h43
-rw-r--r--arch/arm/mach-highbank/Kconfig2
-rw-r--r--arch/arm/mach-imx/Kconfig2
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c2
-rw-r--r--arch/arm/mach-imx/mach-mxt_td60.c2
-rw-r--r--arch/arm/mach-ks8695/board-acs5k.c2
-rw-r--r--arch/arm/mach-mmp/ttc_dkb.c2
-rw-r--r--arch/arm/mach-msm/Makefile9
-rw-r--r--arch/arm/mach-msm/board-dt-8660.c4
-rw-r--r--arch/arm/mach-msm/board-dt-8960.c3
-rw-r--r--arch/arm/mach-msm/board-halibut.c1
-rw-r--r--arch/arm/mach-msm/board-mahimahi.c2
-rw-r--r--arch/arm/mach-msm/board-msm7x30.c1
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c1
-rw-r--r--arch/arm/mach-msm/board-sapphire.c2
-rw-r--r--arch/arm/mach-msm/board-trout.c1
-rw-r--r--arch/arm/mach-msm/board-trout.h2
-rw-r--r--arch/arm/mach-msm/common.h18
-rw-r--r--arch/arm/mach-msm/devices-iommu.c912
-rw-r--r--arch/arm/mach-msm/devices-msm7x30.c2
-rw-r--r--arch/arm/mach-msm/devices-qsd8x50.c2
-rw-r--r--arch/arm/mach-msm/include/mach/board.h38
-rw-r--r--arch/arm/mach-msm/include/mach/iommu.h120
-rw-r--r--arch/arm/mach-msm/include/mach/iommu_hw-8xxx.h1865
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap-8960.h46
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap-8x60.h53
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap.h17
-rw-r--r--arch/arm/mach-msm/include/mach/uncompress.h63
-rw-r--r--arch/arm/mach-msm/io.c67
-rw-r--r--arch/arm/mach-msm/timer.c141
-rw-r--r--arch/arm/mach-mvebu/platsmp.c19
-rw-r--r--arch/arm/mach-omap2/Kconfig3
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c2
-rw-r--r--arch/arm/mach-omap2/cm-regbits-24xx.h318
-rw-r--r--arch/arm/mach-omap2/cm-regbits-33xx.h749
-rw-r--r--arch/arm/mach-omap2/cm-regbits-34xx.h632
-rw-r--r--arch/arm/mach-omap2/cm-regbits-44xx.h1558
-rw-r--r--arch/arm/mach-omap2/cm-regbits-54xx.h1633
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_54xx_data.c1
-rw-r--r--arch/arm/mach-omap2/powerdomains54xx_data.c1
-rw-r--r--arch/arm/mach-omap2/prm-regbits-24xx.h247
-rw-r--r--arch/arm/mach-omap2/prm-regbits-33xx.h307
-rw-r--r--arch/arm/mach-omap2/prm-regbits-34xx.h481
-rw-r--r--arch/arm/mach-omap2/prm-regbits-44xx.h2226
-rw-r--r--arch/arm/mach-omap2/prm-regbits-54xx.h2701
-rw-r--r--arch/arm/mach-omap2/timer.c6
-rw-r--r--arch/arm/mach-pxa/cm-x300.c2
-rw-r--r--arch/arm/mach-pxa/em-x270.c2
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c2
-rw-r--r--arch/arm/mach-pxa/spitz.c2
-rw-r--r--arch/arm/mach-pxa/zeus.c2
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa300.c2
-rw-r--r--arch/arm/mach-realview/Kconfig8
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig6
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2410.c1
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2412.c1
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2416.c2
-rw-r--r--arch/arm/mach-s3c24xx/clock-s3c2443.c2
-rw-r--r--arch/arm/mach-s3c24xx/common.c27
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/map.h2
-rw-r--r--arch/arm/mach-s3c24xx/mach-h1940.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx1950.c5
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig2
-rw-r--r--arch/arm/mach-s3c64xx/clock.c2
-rw-r--r--arch/arm/mach-s3c64xx/common.c32
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/irqs.h8
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/map.h1
-rw-r--r--arch/arm/mach-s3c64xx/irq-pm.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c6
-rw-r--r--arch/arm/mach-s3c64xx/mach-hmt.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c5
-rw-r--r--arch/arm/mach-s5p64x0/Kconfig2
-rw-r--r--arch/arm/mach-s5p64x0/clock-s5p6440.c2
-rw-r--r--arch/arm/mach-s5p64x0/clock-s5p6450.c2
-rw-r--r--arch/arm/mach-s5p64x0/common.c27
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/map.h1
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6440.c5
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6450.c5
-rw-r--r--arch/arm/mach-s5p64x0/pm.c3
-rw-r--r--arch/arm/mach-s5pc100/Kconfig1
-rw-r--r--arch/arm/mach-s5pc100/clock.c2
-rw-r--r--arch/arm/mach-s5pc100/common.c28
-rw-r--r--arch/arm/mach-s5pc100/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-s5pc100/include/mach/map.h1
-rw-r--r--arch/arm/mach-s5pc100/mach-smdkc100.c5
-rw-r--r--arch/arm/mach-s5pv210/Kconfig1
-rw-r--r--arch/arm/mach-s5pv210/clock.c1
-rw-r--r--arch/arm/mach-s5pv210/common.c28
-rw-r--r--arch/arm/mach-s5pv210/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-s5pv210/include/mach/map.h1
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c5
-rw-r--r--arch/arm/mach-s5pv210/pm.c10
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm.c2
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c9
-rw-r--r--arch/arm/mach-shmobile/board-kzm9d.c2
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g-reference.c2
-rw-r--r--arch/arm/mach-shmobile/board-lager.c2
-rw-r--r--arch/arm/mach-shmobile/clock-emev2.c2
-rw-r--r--arch/arm/mach-shmobile/include/mach/dma.h1
-rw-r--r--arch/arm/mach-shmobile/include/mach/emev2.h2
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7778.h1
-rw-r--r--arch/arm/mach-shmobile/setup-emev2.c353
-rw-r--r--arch/arm/mach-shmobile/setup-r8a73a4.c2
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c16
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7778.c72
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c7
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7790.c7
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c7
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c34
-rw-r--r--arch/arm/mach-spear/Kconfig2
-rw-r--r--arch/arm/mach-tegra/Kconfig2
-rw-r--r--arch/arm/mach-ux500/Kconfig2
-rw-r--r--arch/arm/mach-vexpress/Kconfig2
-rw-r--r--arch/arm/mach-zynq/Kconfig2
-rw-r--r--arch/arm/mach-zynq/hotplug.c55
-rw-r--r--arch/arm/mach-zynq/slcr.c45
-rw-r--r--arch/arm/plat-samsung/Kconfig14
-rw-r--r--arch/arm/plat-samsung/Makefile3
-rw-r--r--arch/arm/plat-samsung/dev-backlight.c61
-rw-r--r--arch/arm/plat-samsung/devs.c42
-rw-r--r--arch/arm/plat-samsung/include/plat/clock.h4
-rw-r--r--arch/arm/plat-samsung/include/plat/devs.h1
-rw-r--r--arch/arm/plat-samsung/include/plat/irq-vic-timer.h13
-rw-r--r--arch/arm/plat-samsung/include/plat/irqs.h9
-rw-r--r--arch/arm/plat-samsung/include/plat/pwm-clock.h81
-rw-r--r--arch/arm/plat-samsung/include/plat/pwm-core.h22
-rw-r--r--arch/arm/plat-samsung/include/plat/regs-timer.h124
-rw-r--r--arch/arm/plat-samsung/include/plat/samsung-time.h23
-rw-r--r--arch/arm/plat-samsung/include/plat/sdhci.h38
-rw-r--r--arch/arm/plat-samsung/irq-vic-timer.c98
-rw-r--r--arch/arm/plat-samsung/pwm-clock.c474
-rw-r--r--arch/arm/plat-samsung/s5p-irq.c4
-rw-r--r--arch/arm/plat-samsung/samsung-time.c394
-rw-r--r--arch/x86/platform/mrst/mrst.c2
151 files changed, 614 insertions, 16351 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5d1f5704a284..bf7976439c39 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -631,6 +631,7 @@ config ARCH_MSM
631 bool "Qualcomm MSM" 631 bool "Qualcomm MSM"
632 select ARCH_REQUIRE_GPIOLIB 632 select ARCH_REQUIRE_GPIOLIB
633 select CLKDEV_LOOKUP 633 select CLKDEV_LOOKUP
634 select CLKSRC_OF if OF
634 select COMMON_CLK 635 select COMMON_CLK
635 select GENERIC_CLOCKEVENTS 636 select GENERIC_CLOCKEVENTS
636 help 637 help
@@ -646,7 +647,7 @@ config ARCH_SHMOBILE
646 select CLKDEV_LOOKUP 647 select CLKDEV_LOOKUP
647 select GENERIC_CLOCKEVENTS 648 select GENERIC_CLOCKEVENTS
648 select HAVE_ARM_SCU if SMP 649 select HAVE_ARM_SCU if SMP
649 select HAVE_ARM_TWD if LOCAL_TIMERS 650 select HAVE_ARM_TWD if SMP
650 select HAVE_CLK 651 select HAVE_CLK
651 select HAVE_MACH_CLKDEV 652 select HAVE_MACH_CLKDEV
652 select HAVE_SMP 653 select HAVE_SMP
@@ -701,7 +702,7 @@ config ARCH_S3C24XX
701 select ARCH_HAS_CPUFREQ 702 select ARCH_HAS_CPUFREQ
702 select ARCH_REQUIRE_GPIOLIB 703 select ARCH_REQUIRE_GPIOLIB
703 select CLKDEV_LOOKUP 704 select CLKDEV_LOOKUP
704 select CLKSRC_MMIO 705 select CLKSRC_SAMSUNG_PWM
705 select GENERIC_CLOCKEVENTS 706 select GENERIC_CLOCKEVENTS
706 select GPIO_SAMSUNG 707 select GPIO_SAMSUNG
707 select HAVE_CLK 708 select HAVE_CLK
@@ -724,7 +725,7 @@ config ARCH_S3C64XX
724 select ARCH_REQUIRE_GPIOLIB 725 select ARCH_REQUIRE_GPIOLIB
725 select ARM_VIC 726 select ARM_VIC
726 select CLKDEV_LOOKUP 727 select CLKDEV_LOOKUP
727 select CLKSRC_MMIO 728 select CLKSRC_SAMSUNG_PWM
728 select CPU_V6 729 select CPU_V6
729 select GENERIC_CLOCKEVENTS 730 select GENERIC_CLOCKEVENTS
730 select GPIO_SAMSUNG 731 select GPIO_SAMSUNG
@@ -740,7 +741,6 @@ config ARCH_S3C64XX
740 select SAMSUNG_ATAGS 741 select SAMSUNG_ATAGS
741 select SAMSUNG_CLKSRC 742 select SAMSUNG_CLKSRC
742 select SAMSUNG_GPIOLIB_4BIT 743 select SAMSUNG_GPIOLIB_4BIT
743 select SAMSUNG_IRQ_VIC_TIMER
744 select SAMSUNG_WDT_RESET 744 select SAMSUNG_WDT_RESET
745 select USB_ARCH_HAS_OHCI 745 select USB_ARCH_HAS_OHCI
746 help 746 help
@@ -749,7 +749,7 @@ config ARCH_S3C64XX
749config ARCH_S5P64X0 749config ARCH_S5P64X0
750 bool "Samsung S5P6440 S5P6450" 750 bool "Samsung S5P6440 S5P6450"
751 select CLKDEV_LOOKUP 751 select CLKDEV_LOOKUP
752 select CLKSRC_MMIO 752 select CLKSRC_SAMSUNG_PWM
753 select CPU_V6 753 select CPU_V6
754 select GENERIC_CLOCKEVENTS 754 select GENERIC_CLOCKEVENTS
755 select GPIO_SAMSUNG 755 select GPIO_SAMSUNG
@@ -768,7 +768,7 @@ config ARCH_S5PC100
768 bool "Samsung S5PC100" 768 bool "Samsung S5PC100"
769 select ARCH_REQUIRE_GPIOLIB 769 select ARCH_REQUIRE_GPIOLIB
770 select CLKDEV_LOOKUP 770 select CLKDEV_LOOKUP
771 select CLKSRC_MMIO 771 select CLKSRC_SAMSUNG_PWM
772 select CPU_V7 772 select CPU_V7
773 select GENERIC_CLOCKEVENTS 773 select GENERIC_CLOCKEVENTS
774 select GPIO_SAMSUNG 774 select GPIO_SAMSUNG
@@ -788,7 +788,7 @@ config ARCH_S5PV210
788 select ARCH_HAS_HOLES_MEMORYMODEL 788 select ARCH_HAS_HOLES_MEMORYMODEL
789 select ARCH_SPARSEMEM_ENABLE 789 select ARCH_SPARSEMEM_ENABLE
790 select CLKDEV_LOOKUP 790 select CLKDEV_LOOKUP
791 select CLKSRC_MMIO 791 select CLKSRC_SAMSUNG_PWM
792 select CPU_V7 792 select CPU_V7
793 select GENERIC_CLOCKEVENTS 793 select GENERIC_CLOCKEVENTS
794 select GPIO_SAMSUNG 794 select GPIO_SAMSUNG
@@ -1594,16 +1594,6 @@ config ARM_PSCI
1594 0022A ("Power State Coordination Interface System Software on 1594 0022A ("Power State Coordination Interface System Software on
1595 ARM processors"). 1595 ARM processors").
1596 1596
1597config LOCAL_TIMERS
1598 bool "Use local timer interrupts"
1599 depends on SMP
1600 default y
1601 help
1602 Enable support for local timers on SMP platforms, rather then the
1603 legacy IPI broadcast method. Local timers allows the system
1604 accounting to be spread across the timer interval, preventing a
1605 "thundering herd" at every timer tick.
1606
1607# The GPIO number here must be sorted by descending number. In case of 1597# The GPIO number here must be sorted by descending number. In case of
1608# a multiplatform kernel, we just want the highest value required by the 1598# a multiplatform kernel, we just want the highest value required by the
1609# selected platforms. 1599# selected platforms.
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 4137529850cb..9762c84b4198 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -895,6 +895,11 @@ config DEBUG_LL_INCLUDE
895 DEBUG_IMX53_UART ||\ 895 DEBUG_IMX53_UART ||\
896 DEBUG_IMX6Q_UART || \ 896 DEBUG_IMX6Q_UART || \
897 DEBUG_IMX6SL_UART 897 DEBUG_IMX6SL_UART
898 default "debug/msm.S" if DEBUG_MSM_UART1 || \
899 DEBUG_MSM_UART2 || \
900 DEBUG_MSM_UART3 || \
901 DEBUG_MSM8660_UART || \
902 DEBUG_MSM8960_UART
898 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART 903 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
899 default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 904 default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
900 default "debug/sti.S" if DEBUG_STI_UART 905 default "debug/sti.S" if DEBUG_STI_UART
@@ -1056,7 +1061,7 @@ config DEBUG_UART_8250_FLOW_CONTROL
1056 1061
1057config DEBUG_UNCOMPRESS 1062config DEBUG_UNCOMPRESS
1058 bool 1063 bool
1059 depends on ARCH_MULTIPLATFORM 1064 depends on ARCH_MULTIPLATFORM || ARCH_MSM
1060 default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ 1065 default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
1061 (!DEBUG_TEGRA_UART || !ZBOOT_ROM) 1066 (!DEBUG_TEGRA_UART || !ZBOOT_ROM)
1062 help 1067 help
@@ -1072,7 +1077,7 @@ config DEBUG_UNCOMPRESS
1072 1077
1073config UNCOMPRESS_INCLUDE 1078config UNCOMPRESS_INCLUDE
1074 string 1079 string
1075 default "debug/uncompress.h" if ARCH_MULTIPLATFORM 1080 default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM
1076 default "mach/uncompress.h" 1081 default "mach/uncompress.h"
1077 1082
1078config EARLY_PRINTK 1083config EARLY_PRINTK
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi
index b7f358a93bcb..53e25273ca74 100644
--- a/arch/arm/boot/dts/exynos4210.dtsi
+++ b/arch/arm/boot/dts/exynos4210.dtsi
@@ -72,7 +72,7 @@
72 }; 72 };
73 }; 73 };
74 74
75 clock: clock-controller@0x10030000 { 75 clock: clock-controller@10030000 {
76 compatible = "samsung,exynos4210-clock"; 76 compatible = "samsung,exynos4210-clock";
77 reg = <0x10030000 0x20000>; 77 reg = <0x10030000 0x20000>;
78 #clock-cells = <1>; 78 #clock-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi
index 01da194ba329..3aa2f060ba61 100644
--- a/arch/arm/boot/dts/exynos4x12.dtsi
+++ b/arch/arm/boot/dts/exynos4x12.dtsi
@@ -28,7 +28,7 @@
28 pinctrl3 = &pinctrl_3; 28 pinctrl3 = &pinctrl_3;
29 }; 29 };
30 30
31 clock: clock-controller@0x10030000 { 31 clock: clock-controller@10030000 {
32 compatible = "samsung,exynos4412-clock"; 32 compatible = "samsung,exynos4412-clock";
33 reg = <0x10030000 0x20000>; 33 reg = <0x10030000 0x20000>;
34 #clock-cells = <1>; 34 #clock-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 376090f07231..f2dfa6b1f1a1 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -68,17 +68,17 @@
68 }; 68 };
69 }; 69 };
70 70
71 pd_gsc: gsc-power-domain@0x10044000 { 71 pd_gsc: gsc-power-domain@10044000 {
72 compatible = "samsung,exynos4210-pd"; 72 compatible = "samsung,exynos4210-pd";
73 reg = <0x10044000 0x20>; 73 reg = <0x10044000 0x20>;
74 }; 74 };
75 75
76 pd_mfc: mfc-power-domain@0x10044040 { 76 pd_mfc: mfc-power-domain@10044040 {
77 compatible = "samsung,exynos4210-pd"; 77 compatible = "samsung,exynos4210-pd";
78 reg = <0x10044040 0x20>; 78 reg = <0x10044040 0x20>;
79 }; 79 };
80 80
81 clock: clock-controller@0x10010000 { 81 clock: clock-controller@10010000 {
82 compatible = "samsung,exynos5250-clock"; 82 compatible = "samsung,exynos5250-clock";
83 reg = <0x10010000 0x30000>; 83 reg = <0x10010000 0x30000>;
84 #clock-cells = <1>; 84 #clock-cells = <1>;
@@ -559,7 +559,7 @@
559 }; 559 };
560 }; 560 };
561 561
562 gsc_0: gsc@0x13e00000 { 562 gsc_0: gsc@13e00000 {
563 compatible = "samsung,exynos5-gsc"; 563 compatible = "samsung,exynos5-gsc";
564 reg = <0x13e00000 0x1000>; 564 reg = <0x13e00000 0x1000>;
565 interrupts = <0 85 0>; 565 interrupts = <0 85 0>;
@@ -568,7 +568,7 @@
568 clock-names = "gscl"; 568 clock-names = "gscl";
569 }; 569 };
570 570
571 gsc_1: gsc@0x13e10000 { 571 gsc_1: gsc@13e10000 {
572 compatible = "samsung,exynos5-gsc"; 572 compatible = "samsung,exynos5-gsc";
573 reg = <0x13e10000 0x1000>; 573 reg = <0x13e10000 0x1000>;
574 interrupts = <0 86 0>; 574 interrupts = <0 86 0>;
@@ -577,7 +577,7 @@
577 clock-names = "gscl"; 577 clock-names = "gscl";
578 }; 578 };
579 579
580 gsc_2: gsc@0x13e20000 { 580 gsc_2: gsc@13e20000 {
581 compatible = "samsung,exynos5-gsc"; 581 compatible = "samsung,exynos5-gsc";
582 reg = <0x13e20000 0x1000>; 582 reg = <0x13e20000 0x1000>;
583 interrupts = <0 87 0>; 583 interrupts = <0 87 0>;
@@ -586,7 +586,7 @@
586 clock-names = "gscl"; 586 clock-names = "gscl";
587 }; 587 };
588 588
589 gsc_3: gsc@0x13e30000 { 589 gsc_3: gsc@13e30000 {
590 compatible = "samsung,exynos5-gsc"; 590 compatible = "samsung,exynos5-gsc";
591 reg = <0x13e30000 0x1000>; 591 reg = <0x13e30000 0x1000>;
592 interrupts = <0 88 0>; 592 interrupts = <0 88 0>;
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 8c54c4b74f0e..9e90d1ec0c28 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -59,7 +59,7 @@
59 }; 59 };
60 }; 60 };
61 61
62 clock: clock-controller@0x10010000 { 62 clock: clock-controller@10010000 {
63 compatible = "samsung,exynos5420-clock"; 63 compatible = "samsung,exynos5420-clock";
64 reg = <0x10010000 0x30000>; 64 reg = <0x10010000 0x30000>;
65 #clock-cells = <1>; 65 #clock-cells = <1>;
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index 586134e2a382..1b81f36896bc 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -20,7 +20,7 @@
20 spi0 = &spi_0; 20 spi0 = &spi_0;
21 }; 21 };
22 22
23 clock: clock-controller@0x160000 { 23 clock: clock-controller@160000 {
24 compatible = "samsung,exynos5440-clock"; 24 compatible = "samsung,exynos5440-clock";
25 reg = <0x160000 0x1000>; 25 reg = <0x160000 0x1000>;
26 #clock-cells = <1>; 26 #clock-cells = <1>;
diff --git a/arch/arm/configs/exynos4_defconfig b/arch/arm/configs/exynos4_defconfig
deleted file mode 100644
index bffe68e190a3..000000000000
--- a/arch/arm/configs/exynos4_defconfig
+++ /dev/null
@@ -1,68 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_BLK_DEV_INITRD=y
3CONFIG_KALLSYMS_ALL=y
4CONFIG_MODULES=y
5CONFIG_MODULE_UNLOAD=y
6# CONFIG_BLK_DEV_BSG is not set
7CONFIG_ARCH_EXYNOS=y
8CONFIG_S3C_LOWLEVEL_UART_PORT=1
9CONFIG_MACH_SMDKC210=y
10CONFIG_MACH_ARMLEX4210=y
11CONFIG_MACH_UNIVERSAL_C210=y
12CONFIG_MACH_NURI=y
13CONFIG_MACH_ORIGEN=y
14CONFIG_MACH_SMDK4412=y
15CONFIG_NO_HZ=y
16CONFIG_HIGH_RES_TIMERS=y
17CONFIG_SMP=y
18CONFIG_NR_CPUS=2
19CONFIG_PREEMPT=y
20CONFIG_AEABI=y
21CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M"
22CONFIG_VFP=y
23CONFIG_NEON=y
24CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
25CONFIG_BLK_DEV_LOOP=y
26CONFIG_BLK_DEV_RAM=y
27CONFIG_BLK_DEV_RAM_SIZE=8192
28CONFIG_SCSI=y
29CONFIG_BLK_DEV_SD=y
30CONFIG_CHR_DEV_SG=y
31CONFIG_INPUT_EVDEV=y
32# CONFIG_INPUT_KEYBOARD is not set
33# CONFIG_INPUT_MOUSE is not set
34CONFIG_INPUT_TOUCHSCREEN=y
35CONFIG_SERIAL_8250=y
36CONFIG_SERIAL_SAMSUNG=y
37CONFIG_SERIAL_SAMSUNG_CONSOLE=y
38CONFIG_HW_RANDOM=y
39CONFIG_I2C=y
40# CONFIG_HWMON is not set
41# CONFIG_MFD_SUPPORT is not set
42# CONFIG_HID_SUPPORT is not set
43# CONFIG_USB_SUPPORT is not set
44CONFIG_EXT2_FS=y
45CONFIG_MSDOS_FS=y
46CONFIG_VFAT_FS=y
47CONFIG_TMPFS=y
48CONFIG_TMPFS_POSIX_ACL=y
49CONFIG_CRAMFS=y
50CONFIG_ROMFS_FS=y
51CONFIG_PARTITION_ADVANCED=y
52CONFIG_BSD_DISKLABEL=y
53CONFIG_SOLARIS_X86_PARTITION=y
54CONFIG_NLS_CODEPAGE_437=y
55CONFIG_NLS_ASCII=y
56CONFIG_NLS_ISO8859_1=y
57CONFIG_MAGIC_SYSRQ=y
58CONFIG_DEBUG_KERNEL=y
59CONFIG_DETECT_HUNG_TASK=y
60CONFIG_DEBUG_RT_MUTEXES=y
61CONFIG_DEBUG_SPINLOCK=y
62CONFIG_DEBUG_MUTEXES=y
63CONFIG_DEBUG_INFO=y
64CONFIG_SYSCTL_SYSCALL_CHECK=y
65CONFIG_DEBUG_USER=y
66CONFIG_DEBUG_LL=y
67CONFIG_EARLY_PRINTK=y
68CONFIG_CRC_CCITT=y
diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h
deleted file mode 100644
index f77ffc1eb0c2..000000000000
--- a/arch/arm/include/asm/localtimer.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * arch/arm/include/asm/localtimer.h
3 *
4 * Copyright (C) 2004-2005 ARM Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARM_LOCALTIMER_H
11#define __ASM_ARM_LOCALTIMER_H
12
13#include <linux/errno.h>
14
15struct clock_event_device;
16
17struct local_timer_ops {
18 int (*setup)(struct clock_event_device *);
19 void (*stop)(struct clock_event_device *);
20};
21
22#ifdef CONFIG_LOCAL_TIMERS
23/*
24 * Register a local timer driver
25 */
26int local_timer_register(struct local_timer_ops *);
27#else
28static inline int local_timer_register(struct local_timer_ops *ops)
29{
30 return -ENXIO;
31}
32#endif
33
34#endif
diff --git a/arch/arm/mach-msm/include/mach/debug-macro.S b/arch/arm/include/debug/msm.S
index 0e05f88abcd5..9166e1bc470e 100644
--- a/arch/arm/mach-msm/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/msm.S
@@ -15,8 +15,36 @@
15 * 15 *
16 */ 16 */
17 17
18#include <mach/hardware.h> 18#if defined(CONFIG_ARCH_MSM7X00A) || defined(CONFIG_ARCH_QSD8X50)
19#include <mach/msm_iomap.h> 19#define MSM_UART1_PHYS 0xA9A00000
20#define MSM_UART2_PHYS 0xA9B00000
21#define MSM_UART3_PHYS 0xA9C00000
22#elif defined(CONFIG_ARCH_MSM7X30)
23#define MSM_UART1_PHYS 0xACA00000
24#define MSM_UART2_PHYS 0xACB00000
25#define MSM_UART3_PHYS 0xACC00000
26#endif
27
28#if defined(CONFIG_DEBUG_MSM_UART1)
29#define MSM_DEBUG_UART_BASE 0xE1000000
30#define MSM_DEBUG_UART_PHYS MSM_UART1_PHYS
31#elif defined(CONFIG_DEBUG_MSM_UART2)
32#define MSM_DEBUG_UART_BASE 0xE1000000
33#define MSM_DEBUG_UART_PHYS MSM_UART2_PHYS
34#elif defined(CONFIG_DEBUG_MSM_UART3)
35#define MSM_DEBUG_UART_BASE 0xE1000000
36#define MSM_DEBUG_UART_PHYS MSM_UART3_PHYS
37#endif
38
39#ifdef CONFIG_DEBUG_MSM8660_UART
40#define MSM_DEBUG_UART_BASE 0xF0040000
41#define MSM_DEBUG_UART_PHYS 0x19C40000
42#endif
43
44#ifdef CONFIG_DEBUG_MSM8960_UART
45#define MSM_DEBUG_UART_BASE 0xF0040000
46#define MSM_DEBUG_UART_PHYS 0x16440000
47#endif
20 48
21 .macro addruart, rp, rv, tmp 49 .macro addruart, rp, rv, tmp
22#ifdef MSM_DEBUG_UART_PHYS 50#ifdef MSM_DEBUG_UART_PHYS
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 92d10e503746..72024ea8a3a6 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -41,7 +41,6 @@
41#include <asm/sections.h> 41#include <asm/sections.h>
42#include <asm/tlbflush.h> 42#include <asm/tlbflush.h>
43#include <asm/ptrace.h> 43#include <asm/ptrace.h>
44#include <asm/localtimer.h>
45#include <asm/smp_plat.h> 44#include <asm/smp_plat.h>
46#include <asm/virt.h> 45#include <asm/virt.h>
47#include <asm/mach/arch.h> 46#include <asm/mach/arch.h>
@@ -156,8 +155,6 @@ int platform_can_cpu_hotplug(void)
156} 155}
157 156
158#ifdef CONFIG_HOTPLUG_CPU 157#ifdef CONFIG_HOTPLUG_CPU
159static void percpu_timer_stop(void);
160
161static int platform_cpu_kill(unsigned int cpu) 158static int platform_cpu_kill(unsigned int cpu)
162{ 159{
163 if (smp_ops.cpu_kill) 160 if (smp_ops.cpu_kill)
@@ -201,11 +198,6 @@ int __cpu_disable(void)
201 migrate_irqs(); 198 migrate_irqs();
202 199
203 /* 200 /*
204 * Stop the local timer for this CPU.
205 */
206 percpu_timer_stop();
207
208 /*
209 * Flush user cache and TLB mappings, and then remove this CPU 201 * Flush user cache and TLB mappings, and then remove this CPU
210 * from the vm mask set of all processes. 202 * from the vm mask set of all processes.
211 * 203 *
@@ -326,8 +318,6 @@ static void smp_store_cpu_info(unsigned int cpuid)
326 store_cpu_topology(cpuid); 318 store_cpu_topology(cpuid);
327} 319}
328 320
329static void percpu_timer_setup(void);
330
331/* 321/*
332 * This is the secondary CPU boot entry. We're using this CPUs 322 * This is the secondary CPU boot entry. We're using this CPUs
333 * idle thread stack, but a set of temporary page tables. 323 * idle thread stack, but a set of temporary page tables.
@@ -382,11 +372,6 @@ asmlinkage void secondary_start_kernel(void)
382 set_cpu_online(cpu, true); 372 set_cpu_online(cpu, true);
383 complete(&cpu_running); 373 complete(&cpu_running);
384 374
385 /*
386 * Setup the percpu timer for this CPU.
387 */
388 percpu_timer_setup();
389
390 local_irq_enable(); 375 local_irq_enable();
391 local_fiq_enable(); 376 local_fiq_enable();
392 377
@@ -424,12 +409,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
424 max_cpus = ncores; 409 max_cpus = ncores;
425 if (ncores > 1 && max_cpus) { 410 if (ncores > 1 && max_cpus) {
426 /* 411 /*
427 * Enable the local timer or broadcast device for the
428 * boot CPU, but only if we have more than one CPU.
429 */
430 percpu_timer_setup();
431
432 /*
433 * Initialise the present map, which describes the set of CPUs 412 * Initialise the present map, which describes the set of CPUs
434 * actually populated at the present time. A platform should 413 * actually populated at the present time. A platform should
435 * re-initialize the map in the platforms smp_prepare_cpus() 414 * re-initialize the map in the platforms smp_prepare_cpus()
@@ -505,11 +484,6 @@ u64 smp_irq_stat_cpu(unsigned int cpu)
505 return sum; 484 return sum;
506} 485}
507 486
508/*
509 * Timer (local or broadcast) support
510 */
511static DEFINE_PER_CPU(struct clock_event_device, percpu_clockevent);
512
513#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST 487#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
514void tick_broadcast(const struct cpumask *mask) 488void tick_broadcast(const struct cpumask *mask)
515{ 489{
@@ -517,67 +491,6 @@ void tick_broadcast(const struct cpumask *mask)
517} 491}
518#endif 492#endif
519 493
520static void broadcast_timer_set_mode(enum clock_event_mode mode,
521 struct clock_event_device *evt)
522{
523}
524
525static void broadcast_timer_setup(struct clock_event_device *evt)
526{
527 evt->name = "dummy_timer";
528 evt->features = CLOCK_EVT_FEAT_ONESHOT |
529 CLOCK_EVT_FEAT_PERIODIC |
530 CLOCK_EVT_FEAT_DUMMY;
531 evt->rating = 100;
532 evt->mult = 1;
533 evt->set_mode = broadcast_timer_set_mode;
534
535 clockevents_register_device(evt);
536}
537
538static struct local_timer_ops *lt_ops;
539
540#ifdef CONFIG_LOCAL_TIMERS
541int local_timer_register(struct local_timer_ops *ops)
542{
543 if (!is_smp() || !setup_max_cpus)
544 return -ENXIO;
545
546 if (lt_ops)
547 return -EBUSY;
548
549 lt_ops = ops;
550 return 0;
551}
552#endif
553
554static void percpu_timer_setup(void)
555{
556 unsigned int cpu = smp_processor_id();
557 struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu);
558
559 evt->cpumask = cpumask_of(cpu);
560
561 if (!lt_ops || lt_ops->setup(evt))
562 broadcast_timer_setup(evt);
563}
564
565#ifdef CONFIG_HOTPLUG_CPU
566/*
567 * The generic clock events code purposely does not stop the local timer
568 * on CPU_DEAD/CPU_DEAD_FROZEN hotplug events, so we have to do it
569 * manually here.
570 */
571static void percpu_timer_stop(void)
572{
573 unsigned int cpu = smp_processor_id();
574 struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu);
575
576 if (lt_ops)
577 lt_ops->stop(evt);
578}
579#endif
580
581static DEFINE_RAW_SPINLOCK(stop_lock); 494static DEFINE_RAW_SPINLOCK(stop_lock);
582 495
583/* 496/*
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index 25956204ef23..2985c9f0905d 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -11,6 +11,7 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/clk.h> 13#include <linux/clk.h>
14#include <linux/cpu.h>
14#include <linux/delay.h> 15#include <linux/delay.h>
15#include <linux/device.h> 16#include <linux/device.h>
16#include <linux/err.h> 17#include <linux/err.h>
@@ -24,7 +25,6 @@
24 25
25#include <asm/smp_plat.h> 26#include <asm/smp_plat.h>
26#include <asm/smp_twd.h> 27#include <asm/smp_twd.h>
27#include <asm/localtimer.h>
28 28
29/* set up by the platform code */ 29/* set up by the platform code */
30static void __iomem *twd_base; 30static void __iomem *twd_base;
@@ -33,7 +33,7 @@ static struct clk *twd_clk;
33static unsigned long twd_timer_rate; 33static unsigned long twd_timer_rate;
34static DEFINE_PER_CPU(bool, percpu_setup_called); 34static DEFINE_PER_CPU(bool, percpu_setup_called);
35 35
36static struct clock_event_device __percpu **twd_evt; 36static struct clock_event_device __percpu *twd_evt;
37static int twd_ppi; 37static int twd_ppi;
38 38
39static void twd_set_mode(enum clock_event_mode mode, 39static void twd_set_mode(enum clock_event_mode mode,
@@ -90,8 +90,10 @@ static int twd_timer_ack(void)
90 return 0; 90 return 0;
91} 91}
92 92
93static void twd_timer_stop(struct clock_event_device *clk) 93static void twd_timer_stop(void)
94{ 94{
95 struct clock_event_device *clk = __this_cpu_ptr(twd_evt);
96
95 twd_set_mode(CLOCK_EVT_MODE_UNUSED, clk); 97 twd_set_mode(CLOCK_EVT_MODE_UNUSED, clk);
96 disable_percpu_irq(clk->irq); 98 disable_percpu_irq(clk->irq);
97} 99}
@@ -106,7 +108,7 @@ static void twd_update_frequency(void *new_rate)
106{ 108{
107 twd_timer_rate = *((unsigned long *) new_rate); 109 twd_timer_rate = *((unsigned long *) new_rate);
108 110
109 clockevents_update_freq(*__this_cpu_ptr(twd_evt), twd_timer_rate); 111 clockevents_update_freq(__this_cpu_ptr(twd_evt), twd_timer_rate);
110} 112}
111 113
112static int twd_rate_change(struct notifier_block *nb, 114static int twd_rate_change(struct notifier_block *nb,
@@ -132,7 +134,7 @@ static struct notifier_block twd_clk_nb = {
132 134
133static int twd_clk_init(void) 135static int twd_clk_init(void)
134{ 136{
135 if (twd_evt && *__this_cpu_ptr(twd_evt) && !IS_ERR(twd_clk)) 137 if (twd_evt && __this_cpu_ptr(twd_evt) && !IS_ERR(twd_clk))
136 return clk_notifier_register(twd_clk, &twd_clk_nb); 138 return clk_notifier_register(twd_clk, &twd_clk_nb);
137 139
138 return 0; 140 return 0;
@@ -151,7 +153,7 @@ static void twd_update_frequency(void *data)
151{ 153{
152 twd_timer_rate = clk_get_rate(twd_clk); 154 twd_timer_rate = clk_get_rate(twd_clk);
153 155
154 clockevents_update_freq(*__this_cpu_ptr(twd_evt), twd_timer_rate); 156 clockevents_update_freq(__this_cpu_ptr(twd_evt), twd_timer_rate);
155} 157}
156 158
157static int twd_cpufreq_transition(struct notifier_block *nb, 159static int twd_cpufreq_transition(struct notifier_block *nb,
@@ -177,7 +179,7 @@ static struct notifier_block twd_cpufreq_nb = {
177 179
178static int twd_cpufreq_init(void) 180static int twd_cpufreq_init(void)
179{ 181{
180 if (twd_evt && *__this_cpu_ptr(twd_evt) && !IS_ERR(twd_clk)) 182 if (twd_evt && __this_cpu_ptr(twd_evt) && !IS_ERR(twd_clk))
181 return cpufreq_register_notifier(&twd_cpufreq_nb, 183 return cpufreq_register_notifier(&twd_cpufreq_nb,
182 CPUFREQ_TRANSITION_NOTIFIER); 184 CPUFREQ_TRANSITION_NOTIFIER);
183 185
@@ -228,7 +230,7 @@ static void twd_calibrate_rate(void)
228 230
229static irqreturn_t twd_handler(int irq, void *dev_id) 231static irqreturn_t twd_handler(int irq, void *dev_id)
230{ 232{
231 struct clock_event_device *evt = *(struct clock_event_device **)dev_id; 233 struct clock_event_device *evt = dev_id;
232 234
233 if (twd_timer_ack()) { 235 if (twd_timer_ack()) {
234 evt->event_handler(evt); 236 evt->event_handler(evt);
@@ -265,9 +267,9 @@ static void twd_get_clock(struct device_node *np)
265/* 267/*
266 * Setup the local clock events for a CPU. 268 * Setup the local clock events for a CPU.
267 */ 269 */
268static int twd_timer_setup(struct clock_event_device *clk) 270static void twd_timer_setup(void)
269{ 271{
270 struct clock_event_device **this_cpu_clk; 272 struct clock_event_device *clk = __this_cpu_ptr(twd_evt);
271 int cpu = smp_processor_id(); 273 int cpu = smp_processor_id();
272 274
273 /* 275 /*
@@ -276,9 +278,9 @@ static int twd_timer_setup(struct clock_event_device *clk)
276 */ 278 */
277 if (per_cpu(percpu_setup_called, cpu)) { 279 if (per_cpu(percpu_setup_called, cpu)) {
278 __raw_writel(0, twd_base + TWD_TIMER_CONTROL); 280 __raw_writel(0, twd_base + TWD_TIMER_CONTROL);
279 clockevents_register_device(*__this_cpu_ptr(twd_evt)); 281 clockevents_register_device(clk);
280 enable_percpu_irq(clk->irq, 0); 282 enable_percpu_irq(clk->irq, 0);
281 return 0; 283 return;
282 } 284 }
283 per_cpu(percpu_setup_called, cpu) = true; 285 per_cpu(percpu_setup_called, cpu) = true;
284 286
@@ -297,27 +299,37 @@ static int twd_timer_setup(struct clock_event_device *clk)
297 clk->set_mode = twd_set_mode; 299 clk->set_mode = twd_set_mode;
298 clk->set_next_event = twd_set_next_event; 300 clk->set_next_event = twd_set_next_event;
299 clk->irq = twd_ppi; 301 clk->irq = twd_ppi;
300 302 clk->cpumask = cpumask_of(cpu);
301 this_cpu_clk = __this_cpu_ptr(twd_evt);
302 *this_cpu_clk = clk;
303 303
304 clockevents_config_and_register(clk, twd_timer_rate, 304 clockevents_config_and_register(clk, twd_timer_rate,
305 0xf, 0xffffffff); 305 0xf, 0xffffffff);
306 enable_percpu_irq(clk->irq, 0); 306 enable_percpu_irq(clk->irq, 0);
307}
307 308
308 return 0; 309static int twd_timer_cpu_notify(struct notifier_block *self,
310 unsigned long action, void *hcpu)
311{
312 switch (action & ~CPU_TASKS_FROZEN) {
313 case CPU_STARTING:
314 twd_timer_setup();
315 break;
316 case CPU_DYING:
317 twd_timer_stop();
318 break;
319 }
320
321 return NOTIFY_OK;
309} 322}
310 323
311static struct local_timer_ops twd_lt_ops = { 324static struct notifier_block twd_timer_cpu_nb = {
312 .setup = twd_timer_setup, 325 .notifier_call = twd_timer_cpu_notify,
313 .stop = twd_timer_stop,
314}; 326};
315 327
316static int __init twd_local_timer_common_register(struct device_node *np) 328static int __init twd_local_timer_common_register(struct device_node *np)
317{ 329{
318 int err; 330 int err;
319 331
320 twd_evt = alloc_percpu(struct clock_event_device *); 332 twd_evt = alloc_percpu(struct clock_event_device);
321 if (!twd_evt) { 333 if (!twd_evt) {
322 err = -ENOMEM; 334 err = -ENOMEM;
323 goto out_free; 335 goto out_free;
@@ -329,12 +341,22 @@ static int __init twd_local_timer_common_register(struct device_node *np)
329 goto out_free; 341 goto out_free;
330 } 342 }
331 343
332 err = local_timer_register(&twd_lt_ops); 344 err = register_cpu_notifier(&twd_timer_cpu_nb);
333 if (err) 345 if (err)
334 goto out_irq; 346 goto out_irq;
335 347
336 twd_get_clock(np); 348 twd_get_clock(np);
337 349
350 /*
351 * Immediately configure the timer on the boot CPU, unless we need
352 * jiffies to be incrementing to calibrate the rate in which case
353 * setup the timer in late_time_init.
354 */
355 if (twd_timer_rate)
356 twd_timer_setup();
357 else
358 late_time_init = twd_timer_setup;
359
338 return 0; 360 return 0;
339 361
340out_irq: 362out_irq:
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c
index 3aaa9784cf0e..f1d49e929ccb 100644
--- a/arch/arm/mach-at91/board-snapper9260.c
+++ b/arch/arm/mach-at91/board-snapper9260.c
@@ -26,7 +26,7 @@
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
29#include <linux/i2c/pca953x.h> 29#include <linux/platform_data/pca953x.h>
30 30
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 9f09f45835f8..f5c228190fdd 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -19,7 +19,7 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include <linux/i2c/at24.h> 21#include <linux/i2c/at24.h>
22#include <linux/i2c/pca953x.h> 22#include <linux/platform_data/pca953x.h>
23#include <linux/input.h> 23#include <linux/input.h>
24#include <linux/input/tps6507x-ts.h> 24#include <linux/input/tps6507x-ts.h>
25#include <linux/mfd/tps6507x.h> 25#include <linux/mfd/tps6507x.h>
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index 605956fd07a2..64f2e50e19ca 100644
--- a/arch/arm/mach-ep93xx/vision_ep9307.c
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -23,7 +23,7 @@
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/i2c.h> 24#include <linux/i2c.h>
25#include <linux/i2c-gpio.h> 25#include <linux/i2c-gpio.h>
26#include <linux/i2c/pca953x.h> 26#include <linux/platform_data/pca953x.h>
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/spi/flash.h> 28#include <linux/spi/flash.h>
29#include <linux/spi/mmc_spi.h> 29#include <linux/spi/mmc_spi.h>
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 972490fc09d6..8646a141ae46 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -17,7 +17,6 @@
17 17
18void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); 18void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1);
19void exynos_init_time(void); 19void exynos_init_time(void);
20extern unsigned long xxti_f, xusbxti_f;
21 20
22struct map_desc; 21struct map_desc;
23void exynos_init_io(void); 22void exynos_init_io(void);
@@ -25,56 +24,14 @@ void exynos4_restart(enum reboot_mode mode, const char *cmd);
25void exynos5_restart(enum reboot_mode mode, const char *cmd); 24void exynos5_restart(enum reboot_mode mode, const char *cmd);
26void exynos_init_late(void); 25void exynos_init_late(void);
27 26
28/* ToDo: remove these after migrating legacy exynos4 platforms to dt */
29void exynos4_clk_init(struct device_node *np, int is_exynos4210, void __iomem *reg_base, unsigned long xom);
30void exynos4_clk_register_fixed_ext(unsigned long, unsigned long);
31
32void exynos_firmware_init(void); 27void exynos_firmware_init(void);
33 28
34void exynos_set_timer_source(u8 channels);
35
36#ifdef CONFIG_PM_GENERIC_DOMAINS 29#ifdef CONFIG_PM_GENERIC_DOMAINS
37int exynos_pm_late_initcall(void); 30int exynos_pm_late_initcall(void);
38#else 31#else
39static inline int exynos_pm_late_initcall(void) { return 0; } 32static inline int exynos_pm_late_initcall(void) { return 0; }
40#endif 33#endif
41 34
42#ifdef CONFIG_ARCH_EXYNOS4
43void exynos4_register_clocks(void);
44void exynos4_setup_clocks(void);
45
46#else
47#define exynos4_register_clocks()
48#define exynos4_setup_clocks()
49#endif
50
51#ifdef CONFIG_ARCH_EXYNOS5
52void exynos5_register_clocks(void);
53void exynos5_setup_clocks(void);
54
55#else
56#define exynos5_register_clocks()
57#define exynos5_setup_clocks()
58#endif
59
60#ifdef CONFIG_CPU_EXYNOS4210
61void exynos4210_register_clocks(void);
62
63#else
64#define exynos4210_register_clocks()
65#endif
66
67#ifdef CONFIG_SOC_EXYNOS4212
68void exynos4212_register_clocks(void);
69
70#else
71#define exynos4212_register_clocks()
72#endif
73
74struct device_node;
75void combiner_init(void __iomem *combiner_base, struct device_node *np,
76 unsigned int max_nr, int irq_base);
77
78extern struct smp_operations exynos_smp_ops; 35extern struct smp_operations exynos_smp_ops;
79 36
80extern void exynos_cpu_die(unsigned int cpu); 37extern void exynos_cpu_die(unsigned int cpu);
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index cd9fcb1cd7ab..6acbdabf6222 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -12,7 +12,7 @@ config ARCH_HIGHBANK
12 select CPU_V7 12 select CPU_V7
13 select GENERIC_CLOCKEVENTS 13 select GENERIC_CLOCKEVENTS
14 select HAVE_ARM_SCU 14 select HAVE_ARM_SCU
15 select HAVE_ARM_TWD if LOCAL_TIMERS 15 select HAVE_ARM_TWD if SMP
16 select HAVE_SMP 16 select HAVE_SMP
17 select MAILBOX 17 select MAILBOX
18 select PL320_MBOX 18 select PL320_MBOX
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index f54656091a9d..1303e334c343 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -793,7 +793,7 @@ config SOC_IMX6Q
793 select COMMON_CLK 793 select COMMON_CLK
794 select CPU_V7 794 select CPU_V7
795 select HAVE_ARM_SCU if SMP 795 select HAVE_ARM_SCU if SMP
796 select HAVE_ARM_TWD if LOCAL_TIMERS 796 select HAVE_ARM_TWD if SMP
797 select HAVE_IMX_ANATOP 797 select HAVE_IMX_ANATOP
798 select HAVE_IMX_GPC 798 select HAVE_IMX_GPC
799 select HAVE_IMX_MMDC 799 select HAVE_IMX_MMDC
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index 29ac8ee651d2..97f9c6297fcf 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -26,7 +26,7 @@
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/mtd/physmap.h> 27#include <linux/mtd/physmap.h>
28#include <linux/i2c.h> 28#include <linux/i2c.h>
29#include <linux/i2c/pca953x.h> 29#include <linux/platform_data/pca953x.h>
30#include <linux/input.h> 30#include <linux/input.h>
31#include <linux/gpio.h> 31#include <linux/gpio.h>
32#include <linux/delay.h> 32#include <linux/delay.h>
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c
index a27faaba98ec..c91894003da9 100644
--- a/arch/arm/mach-imx/mach-mxt_td60.c
+++ b/arch/arm/mach-imx/mach-mxt_td60.c
@@ -26,7 +26,7 @@
26#include <asm/mach/time.h> 26#include <asm/mach/time.h>
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28#include <linux/gpio.h> 28#include <linux/gpio.h>
29#include <linux/i2c/pca953x.h> 29#include <linux/platform_data/pca953x.h>
30 30
31#include "common.h" 31#include "common.h"
32#include "devices-imx27.h" 32#include "devices-imx27.h"
diff --git a/arch/arm/mach-ks8695/board-acs5k.c b/arch/arm/mach-ks8695/board-acs5k.c
index 456d6386edf8..9f9c0441a917 100644
--- a/arch/arm/mach-ks8695/board-acs5k.c
+++ b/arch/arm/mach-ks8695/board-acs5k.c
@@ -20,7 +20,7 @@
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include <linux/i2c-algo-bit.h> 21#include <linux/i2c-algo-bit.h>
22#include <linux/i2c-gpio.h> 22#include <linux/i2c-gpio.h>
23#include <linux/i2c/pca953x.h> 23#include <linux/platform_data/pca953x.h>
24 24
25#include <linux/mtd/mtd.h> 25#include <linux/mtd/mtd.h>
26#include <linux/mtd/map.h> 26#include <linux/mtd/map.h>
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
index 8483906d4308..702232996c8c 100644
--- a/arch/arm/mach-mmp/ttc_dkb.c
+++ b/arch/arm/mach-mmp/ttc_dkb.c
@@ -15,7 +15,7 @@
15#include <linux/mtd/partitions.h> 15#include <linux/mtd/partitions.h>
16#include <linux/mtd/onenand.h> 16#include <linux/mtd/onenand.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/i2c/pca953x.h> 18#include <linux/platform_data/pca953x.h>
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/gpio-pxa.h> 20#include <linux/gpio-pxa.h>
21#include <linux/mfd/88pm860x.h> 21#include <linux/mfd/88pm860x.h>
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index d257ff40e16b..d872634c2f85 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -1,17 +1,16 @@
1obj-y += io.o timer.o 1obj-y += timer.o
2obj-y += clock.o 2obj-y += clock.o
3 3
4obj-$(CONFIG_MSM_VIC) += irq-vic.o 4obj-$(CONFIG_MSM_VIC) += irq-vic.o
5obj-$(CONFIG_MSM_IOMMU) += devices-iommu.o
6 5
7obj-$(CONFIG_ARCH_MSM7X00A) += irq.o 6obj-$(CONFIG_ARCH_MSM7X00A) += irq.o
8obj-$(CONFIG_ARCH_QSD8X50) += sirc.o 7obj-$(CONFIG_ARCH_QSD8X50) += sirc.o
9 8
10obj-$(CONFIG_MSM_PROC_COMM) += proc_comm.o clock-pcom.o vreg.o 9obj-$(CONFIG_MSM_PROC_COMM) += proc_comm.o clock-pcom.o vreg.o
11 10
12obj-$(CONFIG_ARCH_MSM7X00A) += dma.o 11obj-$(CONFIG_ARCH_MSM7X00A) += dma.o io.o
13obj-$(CONFIG_ARCH_MSM7X30) += dma.o 12obj-$(CONFIG_ARCH_MSM7X30) += dma.o io.o
14obj-$(CONFIG_ARCH_QSD8X50) += dma.o 13obj-$(CONFIG_ARCH_QSD8X50) += dma.o io.o
15 14
16obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o 15obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o
17obj-$(CONFIG_MSM_SMD) += last_radio_log.o 16obj-$(CONFIG_MSM_SMD) += last_radio_log.o
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index 492f5cd87b0a..c2946892f5e3 100644
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ b/arch/arm/mach-msm/board-dt-8660.c
@@ -15,8 +15,8 @@
15#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16 16
17#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
18#include <asm/mach/map.h>
18 19
19#include <mach/board.h>
20#include "common.h" 20#include "common.h"
21 21
22static void __init msm8x60_init_late(void) 22static void __init msm8x60_init_late(void)
@@ -42,9 +42,7 @@ static const char *msm8x60_fluid_match[] __initdata = {
42 42
43DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") 43DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
44 .smp = smp_ops(msm_smp_ops), 44 .smp = smp_ops(msm_smp_ops),
45 .map_io = msm_map_msm8x60_io,
46 .init_machine = msm8x60_dt_init, 45 .init_machine = msm8x60_dt_init,
47 .init_late = msm8x60_init_late, 46 .init_late = msm8x60_init_late,
48 .init_time = msm_dt_timer_init,
49 .dt_compat = msm8x60_fluid_match, 47 .dt_compat = msm8x60_fluid_match,
50MACHINE_END 48MACHINE_END
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index bb5530957c4f..d4ca52c45111 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt-8960.c
@@ -14,6 +14,7 @@
14#include <linux/of_platform.h> 14#include <linux/of_platform.h>
15 15
16#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
17#include <asm/mach/map.h>
17 18
18#include "common.h" 19#include "common.h"
19 20
@@ -29,8 +30,6 @@ static const char * const msm8960_dt_match[] __initconst = {
29 30
30DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)") 31DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
31 .smp = smp_ops(msm_smp_ops), 32 .smp = smp_ops(msm_smp_ops),
32 .map_io = msm_map_msm8960_io,
33 .init_time = msm_dt_timer_init,
34 .init_machine = msm_dt_init, 33 .init_machine = msm_dt_init,
35 .dt_compat = msm8960_dt_match, 34 .dt_compat = msm8960_dt_match,
36MACHINE_END 35MACHINE_END
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
index 803651ad4f62..a77529887cbc 100644
--- a/arch/arm/mach-msm/board-halibut.c
+++ b/arch/arm/mach-msm/board-halibut.c
@@ -29,7 +29,6 @@
29#include <asm/setup.h> 29#include <asm/setup.h>
30 30
31#include <mach/irqs.h> 31#include <mach/irqs.h>
32#include <mach/board.h>
33#include <mach/msm_iomap.h> 32#include <mach/msm_iomap.h>
34 33
35#include <linux/mtd/nand.h> 34#include <linux/mtd/nand.h>
diff --git a/arch/arm/mach-msm/board-mahimahi.c b/arch/arm/mach-msm/board-mahimahi.c
index 30c3496db593..7d9981cb400e 100644
--- a/arch/arm/mach-msm/board-mahimahi.c
+++ b/arch/arm/mach-msm/board-mahimahi.c
@@ -28,12 +28,12 @@
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/setup.h> 29#include <asm/setup.h>
30 30
31#include <mach/board.h>
32#include <mach/hardware.h> 31#include <mach/hardware.h>
33 32
34#include "board-mahimahi.h" 33#include "board-mahimahi.h"
35#include "devices.h" 34#include "devices.h"
36#include "proc_comm.h" 35#include "proc_comm.h"
36#include "common.h"
37 37
38static uint debug_uart; 38static uint debug_uart;
39 39
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index db3d8c0bc8a4..f9af5a46e8b6 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -30,7 +30,6 @@
30#include <asm/memory.h> 30#include <asm/memory.h>
31#include <asm/setup.h> 31#include <asm/setup.h>
32 32
33#include <mach/board.h>
34#include <mach/msm_iomap.h> 33#include <mach/msm_iomap.h>
35#include <mach/dma.h> 34#include <mach/dma.h>
36 35
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index f14a73d86bc0..5f933bc50783 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -28,7 +28,6 @@
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/setup.h> 29#include <asm/setup.h>
30 30
31#include <mach/board.h>
32#include <mach/irqs.h> 31#include <mach/irqs.h>
33#include <mach/sirc.h> 32#include <mach/sirc.h>
34#include <mach/vreg.h> 33#include <mach/vreg.h>
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c
index 70730111b37c..327605174d63 100644
--- a/arch/arm/mach-msm/board-sapphire.c
+++ b/arch/arm/mach-msm/board-sapphire.c
@@ -28,7 +28,6 @@
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/mach/flash.h> 29#include <asm/mach/flash.h>
30#include <mach/vreg.h> 30#include <mach/vreg.h>
31#include <mach/board.h>
32 31
33#include <asm/io.h> 32#include <asm/io.h>
34#include <asm/delay.h> 33#include <asm/delay.h>
@@ -41,6 +40,7 @@
41#include "board-sapphire.h" 40#include "board-sapphire.h"
42#include "proc_comm.h" 41#include "proc_comm.h"
43#include "devices.h" 42#include "devices.h"
43#include "common.h"
44 44
45void msm_init_irq(void); 45void msm_init_irq(void);
46void msm_init_gpio(void); 46void msm_init_gpio(void);
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index 64a46eb4fc49..ccf6621bc664 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -25,7 +25,6 @@
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/setup.h> 26#include <asm/setup.h>
27 27
28#include <mach/board.h>
29#include <mach/hardware.h> 28#include <mach/hardware.h>
30#include <mach/msm_iomap.h> 29#include <mach/msm_iomap.h>
31 30
diff --git a/arch/arm/mach-msm/board-trout.h b/arch/arm/mach-msm/board-trout.h
index 651851c3e1dd..b2379ede43bc 100644
--- a/arch/arm/mach-msm/board-trout.h
+++ b/arch/arm/mach-msm/board-trout.h
@@ -4,7 +4,7 @@
4#ifndef __ARCH_ARM_MACH_MSM_BOARD_TROUT_H 4#ifndef __ARCH_ARM_MACH_MSM_BOARD_TROUT_H
5#define __ARCH_ARM_MACH_MSM_BOARD_TROUT_H 5#define __ARCH_ARM_MACH_MSM_BOARD_TROUT_H
6 6
7#include <mach/board.h> 7#include "common.h"
8 8
9#define MSM_SMI_BASE 0x00000000 9#define MSM_SMI_BASE 0x00000000
10#define MSM_SMI_SIZE 0x00800000 10#define MSM_SMI_SIZE 0x00800000
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
index 421cf7751a80..33c7725adae2 100644
--- a/arch/arm/mach-msm/common.h
+++ b/arch/arm/mach-msm/common.h
@@ -14,13 +14,10 @@
14 14
15extern void msm7x01_timer_init(void); 15extern void msm7x01_timer_init(void);
16extern void msm7x30_timer_init(void); 16extern void msm7x30_timer_init(void);
17extern void msm_dt_timer_init(void);
18extern void qsd8x50_timer_init(void); 17extern void qsd8x50_timer_init(void);
19 18
20extern void msm_map_common_io(void); 19extern void msm_map_common_io(void);
21extern void msm_map_msm7x30_io(void); 20extern void msm_map_msm7x30_io(void);
22extern void msm_map_msm8x60_io(void);
23extern void msm_map_msm8960_io(void);
24extern void msm_map_qsd8x50_io(void); 21extern void msm_map_qsd8x50_io(void);
25 22
26extern void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size, 23extern void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
@@ -29,4 +26,19 @@ extern void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
29extern struct smp_operations msm_smp_ops; 26extern struct smp_operations msm_smp_ops;
30extern void msm_cpu_die(unsigned int cpu); 27extern void msm_cpu_die(unsigned int cpu);
31 28
29struct msm_mmc_platform_data;
30
31extern void msm_add_devices(void);
32extern void msm_init_irq(void);
33extern void msm_init_gpio(void);
34extern int msm_add_sdcc(unsigned int controller,
35 struct msm_mmc_platform_data *plat,
36 unsigned int stat_irq, unsigned long stat_irq_flags);
37
38#if defined(CONFIG_MSM_SMD) && defined(CONFIG_DEBUG_FS)
39extern int smd_debugfs_init(void);
40#else
41static inline int smd_debugfs_init(void) { return 0; }
42#endif
43
32#endif 44#endif
diff --git a/arch/arm/mach-msm/devices-iommu.c b/arch/arm/mach-msm/devices-iommu.c
deleted file mode 100644
index 0fb7a17df398..000000000000
--- a/arch/arm/mach-msm/devices-iommu.c
+++ /dev/null
@@ -1,912 +0,0 @@
1/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18#include <linux/kernel.h>
19#include <linux/platform_device.h>
20#include <linux/bootmem.h>
21#include <linux/module.h>
22#include <mach/irqs.h>
23#include <mach/iommu.h>
24
25static struct resource msm_iommu_jpegd_resources[] = {
26 {
27 .start = 0x07300000,
28 .end = 0x07300000 + SZ_1M - 1,
29 .name = "physbase",
30 .flags = IORESOURCE_MEM,
31 },
32 {
33 .name = "nonsecure_irq",
34 .start = SMMU_JPEGD_CB_SC_NON_SECURE_IRQ,
35 .end = SMMU_JPEGD_CB_SC_NON_SECURE_IRQ,
36 .flags = IORESOURCE_IRQ,
37 },
38 {
39 .name = "secure_irq",
40 .start = SMMU_JPEGD_CB_SC_SECURE_IRQ,
41 .end = SMMU_JPEGD_CB_SC_SECURE_IRQ,
42 .flags = IORESOURCE_IRQ,
43 },
44};
45
46static struct resource msm_iommu_vpe_resources[] = {
47 {
48 .start = 0x07400000,
49 .end = 0x07400000 + SZ_1M - 1,
50 .name = "physbase",
51 .flags = IORESOURCE_MEM,
52 },
53 {
54 .name = "nonsecure_irq",
55 .start = SMMU_VPE_CB_SC_NON_SECURE_IRQ,
56 .end = SMMU_VPE_CB_SC_NON_SECURE_IRQ,
57 .flags = IORESOURCE_IRQ,
58 },
59 {
60 .name = "secure_irq",
61 .start = SMMU_VPE_CB_SC_SECURE_IRQ,
62 .end = SMMU_VPE_CB_SC_SECURE_IRQ,
63 .flags = IORESOURCE_IRQ,
64 },
65};
66
67static struct resource msm_iommu_mdp0_resources[] = {
68 {
69 .start = 0x07500000,
70 .end = 0x07500000 + SZ_1M - 1,
71 .name = "physbase",
72 .flags = IORESOURCE_MEM,
73 },
74 {
75 .name = "nonsecure_irq",
76 .start = SMMU_MDP0_CB_SC_NON_SECURE_IRQ,
77 .end = SMMU_MDP0_CB_SC_NON_SECURE_IRQ,
78 .flags = IORESOURCE_IRQ,
79 },
80 {
81 .name = "secure_irq",
82 .start = SMMU_MDP0_CB_SC_SECURE_IRQ,
83 .end = SMMU_MDP0_CB_SC_SECURE_IRQ,
84 .flags = IORESOURCE_IRQ,
85 },
86};
87
88static struct resource msm_iommu_mdp1_resources[] = {
89 {
90 .start = 0x07600000,
91 .end = 0x07600000 + SZ_1M - 1,
92 .name = "physbase",
93 .flags = IORESOURCE_MEM,
94 },
95 {
96 .name = "nonsecure_irq",
97 .start = SMMU_MDP1_CB_SC_NON_SECURE_IRQ,
98 .end = SMMU_MDP1_CB_SC_NON_SECURE_IRQ,
99 .flags = IORESOURCE_IRQ,
100 },
101 {
102 .name = "secure_irq",
103 .start = SMMU_MDP1_CB_SC_SECURE_IRQ,
104 .end = SMMU_MDP1_CB_SC_SECURE_IRQ,
105 .flags = IORESOURCE_IRQ,
106 },
107};
108
109static struct resource msm_iommu_rot_resources[] = {
110 {
111 .start = 0x07700000,
112 .end = 0x07700000 + SZ_1M - 1,
113 .name = "physbase",
114 .flags = IORESOURCE_MEM,
115 },
116 {
117 .name = "nonsecure_irq",
118 .start = SMMU_ROT_CB_SC_NON_SECURE_IRQ,
119 .end = SMMU_ROT_CB_SC_NON_SECURE_IRQ,
120 .flags = IORESOURCE_IRQ,
121 },
122 {
123 .name = "secure_irq",
124 .start = SMMU_ROT_CB_SC_SECURE_IRQ,
125 .end = SMMU_ROT_CB_SC_SECURE_IRQ,
126 .flags = IORESOURCE_IRQ,
127 },
128};
129
130static struct resource msm_iommu_ijpeg_resources[] = {
131 {
132 .start = 0x07800000,
133 .end = 0x07800000 + SZ_1M - 1,
134 .name = "physbase",
135 .flags = IORESOURCE_MEM,
136 },
137 {
138 .name = "nonsecure_irq",
139 .start = SMMU_IJPEG_CB_SC_NON_SECURE_IRQ,
140 .end = SMMU_IJPEG_CB_SC_NON_SECURE_IRQ,
141 .flags = IORESOURCE_IRQ,
142 },
143 {
144 .name = "secure_irq",
145 .start = SMMU_IJPEG_CB_SC_SECURE_IRQ,
146 .end = SMMU_IJPEG_CB_SC_SECURE_IRQ,
147 .flags = IORESOURCE_IRQ,
148 },
149};
150
151static struct resource msm_iommu_vfe_resources[] = {
152 {
153 .start = 0x07900000,
154 .end = 0x07900000 + SZ_1M - 1,
155 .name = "physbase",
156 .flags = IORESOURCE_MEM,
157 },
158 {
159 .name = "nonsecure_irq",
160 .start = SMMU_VFE_CB_SC_NON_SECURE_IRQ,
161 .end = SMMU_VFE_CB_SC_NON_SECURE_IRQ,
162 .flags = IORESOURCE_IRQ,
163 },
164 {
165 .name = "secure_irq",
166 .start = SMMU_VFE_CB_SC_SECURE_IRQ,
167 .end = SMMU_VFE_CB_SC_SECURE_IRQ,
168 .flags = IORESOURCE_IRQ,
169 },
170};
171
172static struct resource msm_iommu_vcodec_a_resources[] = {
173 {
174 .start = 0x07A00000,
175 .end = 0x07A00000 + SZ_1M - 1,
176 .name = "physbase",
177 .flags = IORESOURCE_MEM,
178 },
179 {
180 .name = "nonsecure_irq",
181 .start = SMMU_VCODEC_A_CB_SC_NON_SECURE_IRQ,
182 .end = SMMU_VCODEC_A_CB_SC_NON_SECURE_IRQ,
183 .flags = IORESOURCE_IRQ,
184 },
185 {
186 .name = "secure_irq",
187 .start = SMMU_VCODEC_A_CB_SC_SECURE_IRQ,
188 .end = SMMU_VCODEC_A_CB_SC_SECURE_IRQ,
189 .flags = IORESOURCE_IRQ,
190 },
191};
192
193static struct resource msm_iommu_vcodec_b_resources[] = {
194 {
195 .start = 0x07B00000,
196 .end = 0x07B00000 + SZ_1M - 1,
197 .name = "physbase",
198 .flags = IORESOURCE_MEM,
199 },
200 {
201 .name = "nonsecure_irq",
202 .start = SMMU_VCODEC_B_CB_SC_NON_SECURE_IRQ,
203 .end = SMMU_VCODEC_B_CB_SC_NON_SECURE_IRQ,
204 .flags = IORESOURCE_IRQ,
205 },
206 {
207 .name = "secure_irq",
208 .start = SMMU_VCODEC_B_CB_SC_SECURE_IRQ,
209 .end = SMMU_VCODEC_B_CB_SC_SECURE_IRQ,
210 .flags = IORESOURCE_IRQ,
211 },
212};
213
214static struct resource msm_iommu_gfx3d_resources[] = {
215 {
216 .start = 0x07C00000,
217 .end = 0x07C00000 + SZ_1M - 1,
218 .name = "physbase",
219 .flags = IORESOURCE_MEM,
220 },
221 {
222 .name = "nonsecure_irq",
223 .start = SMMU_GFX3D_CB_SC_NON_SECURE_IRQ,
224 .end = SMMU_GFX3D_CB_SC_NON_SECURE_IRQ,
225 .flags = IORESOURCE_IRQ,
226 },
227 {
228 .name = "secure_irq",
229 .start = SMMU_GFX3D_CB_SC_SECURE_IRQ,
230 .end = SMMU_GFX3D_CB_SC_SECURE_IRQ,
231 .flags = IORESOURCE_IRQ,
232 },
233};
234
235static struct resource msm_iommu_gfx2d0_resources[] = {
236 {
237 .start = 0x07D00000,
238 .end = 0x07D00000 + SZ_1M - 1,
239 .name = "physbase",
240 .flags = IORESOURCE_MEM,
241 },
242 {
243 .name = "nonsecure_irq",
244 .start = SMMU_GFX2D0_CB_SC_NON_SECURE_IRQ,
245 .end = SMMU_GFX2D0_CB_SC_NON_SECURE_IRQ,
246 .flags = IORESOURCE_IRQ,
247 },
248 {
249 .name = "secure_irq",
250 .start = SMMU_GFX2D0_CB_SC_SECURE_IRQ,
251 .end = SMMU_GFX2D0_CB_SC_SECURE_IRQ,
252 .flags = IORESOURCE_IRQ,
253 },
254};
255
256static struct resource msm_iommu_gfx2d1_resources[] = {
257 {
258 .start = 0x07E00000,
259 .end = 0x07E00000 + SZ_1M - 1,
260 .name = "physbase",
261 .flags = IORESOURCE_MEM,
262 },
263 {
264 .name = "nonsecure_irq",
265 .start = SMMU_GFX2D1_CB_SC_NON_SECURE_IRQ,
266 .end = SMMU_GFX2D1_CB_SC_NON_SECURE_IRQ,
267 .flags = IORESOURCE_IRQ,
268 },
269 {
270 .name = "secure_irq",
271 .start = SMMU_GFX2D1_CB_SC_SECURE_IRQ,
272 .end = SMMU_GFX2D1_CB_SC_SECURE_IRQ,
273 .flags = IORESOURCE_IRQ,
274 },
275};
276
277static struct platform_device msm_root_iommu_dev = {
278 .name = "msm_iommu",
279 .id = -1,
280};
281
282static struct msm_iommu_dev jpegd_iommu = {
283 .name = "jpegd",
284 .ncb = 2,
285};
286
287static struct msm_iommu_dev vpe_iommu = {
288 .name = "vpe",
289 .ncb = 2,
290};
291
292static struct msm_iommu_dev mdp0_iommu = {
293 .name = "mdp0",
294 .ncb = 2,
295};
296
297static struct msm_iommu_dev mdp1_iommu = {
298 .name = "mdp1",
299 .ncb = 2,
300};
301
302static struct msm_iommu_dev rot_iommu = {
303 .name = "rot",
304 .ncb = 2,
305};
306
307static struct msm_iommu_dev ijpeg_iommu = {
308 .name = "ijpeg",
309 .ncb = 2,
310};
311
312static struct msm_iommu_dev vfe_iommu = {
313 .name = "vfe",
314 .ncb = 2,
315};
316
317static struct msm_iommu_dev vcodec_a_iommu = {
318 .name = "vcodec_a",
319 .ncb = 2,
320};
321
322static struct msm_iommu_dev vcodec_b_iommu = {
323 .name = "vcodec_b",
324 .ncb = 2,
325};
326
327static struct msm_iommu_dev gfx3d_iommu = {
328 .name = "gfx3d",
329 .ncb = 3,
330};
331
332static struct msm_iommu_dev gfx2d0_iommu = {
333 .name = "gfx2d0",
334 .ncb = 2,
335};
336
337static struct msm_iommu_dev gfx2d1_iommu = {
338 .name = "gfx2d1",
339 .ncb = 2,
340};
341
342static struct platform_device msm_device_iommu_jpegd = {
343 .name = "msm_iommu",
344 .id = 0,
345 .dev = {
346 .parent = &msm_root_iommu_dev.dev,
347 },
348 .num_resources = ARRAY_SIZE(msm_iommu_jpegd_resources),
349 .resource = msm_iommu_jpegd_resources,
350};
351
352static struct platform_device msm_device_iommu_vpe = {
353 .name = "msm_iommu",
354 .id = 1,
355 .dev = {
356 .parent = &msm_root_iommu_dev.dev,
357 },
358 .num_resources = ARRAY_SIZE(msm_iommu_vpe_resources),
359 .resource = msm_iommu_vpe_resources,
360};
361
362static struct platform_device msm_device_iommu_mdp0 = {
363 .name = "msm_iommu",
364 .id = 2,
365 .dev = {
366 .parent = &msm_root_iommu_dev.dev,
367 },
368 .num_resources = ARRAY_SIZE(msm_iommu_mdp0_resources),
369 .resource = msm_iommu_mdp0_resources,
370};
371
372static struct platform_device msm_device_iommu_mdp1 = {
373 .name = "msm_iommu",
374 .id = 3,
375 .dev = {
376 .parent = &msm_root_iommu_dev.dev,
377 },
378 .num_resources = ARRAY_SIZE(msm_iommu_mdp1_resources),
379 .resource = msm_iommu_mdp1_resources,
380};
381
382static struct platform_device msm_device_iommu_rot = {
383 .name = "msm_iommu",
384 .id = 4,
385 .dev = {
386 .parent = &msm_root_iommu_dev.dev,
387 },
388 .num_resources = ARRAY_SIZE(msm_iommu_rot_resources),
389 .resource = msm_iommu_rot_resources,
390};
391
392static struct platform_device msm_device_iommu_ijpeg = {
393 .name = "msm_iommu",
394 .id = 5,
395 .dev = {
396 .parent = &msm_root_iommu_dev.dev,
397 },
398 .num_resources = ARRAY_SIZE(msm_iommu_ijpeg_resources),
399 .resource = msm_iommu_ijpeg_resources,
400};
401
402static struct platform_device msm_device_iommu_vfe = {
403 .name = "msm_iommu",
404 .id = 6,
405 .dev = {
406 .parent = &msm_root_iommu_dev.dev,
407 },
408 .num_resources = ARRAY_SIZE(msm_iommu_vfe_resources),
409 .resource = msm_iommu_vfe_resources,
410};
411
412static struct platform_device msm_device_iommu_vcodec_a = {
413 .name = "msm_iommu",
414 .id = 7,
415 .dev = {
416 .parent = &msm_root_iommu_dev.dev,
417 },
418 .num_resources = ARRAY_SIZE(msm_iommu_vcodec_a_resources),
419 .resource = msm_iommu_vcodec_a_resources,
420};
421
422static struct platform_device msm_device_iommu_vcodec_b = {
423 .name = "msm_iommu",
424 .id = 8,
425 .dev = {
426 .parent = &msm_root_iommu_dev.dev,
427 },
428 .num_resources = ARRAY_SIZE(msm_iommu_vcodec_b_resources),
429 .resource = msm_iommu_vcodec_b_resources,
430};
431
432static struct platform_device msm_device_iommu_gfx3d = {
433 .name = "msm_iommu",
434 .id = 9,
435 .dev = {
436 .parent = &msm_root_iommu_dev.dev,
437 },
438 .num_resources = ARRAY_SIZE(msm_iommu_gfx3d_resources),
439 .resource = msm_iommu_gfx3d_resources,
440};
441
442static struct platform_device msm_device_iommu_gfx2d0 = {
443 .name = "msm_iommu",
444 .id = 10,
445 .dev = {
446 .parent = &msm_root_iommu_dev.dev,
447 },
448 .num_resources = ARRAY_SIZE(msm_iommu_gfx2d0_resources),
449 .resource = msm_iommu_gfx2d0_resources,
450};
451
452struct platform_device msm_device_iommu_gfx2d1 = {
453 .name = "msm_iommu",
454 .id = 11,
455 .dev = {
456 .parent = &msm_root_iommu_dev.dev,
457 },
458 .num_resources = ARRAY_SIZE(msm_iommu_gfx2d1_resources),
459 .resource = msm_iommu_gfx2d1_resources,
460};
461
462static struct msm_iommu_ctx_dev jpegd_src_ctx = {
463 .name = "jpegd_src",
464 .num = 0,
465 .mids = {0, -1}
466};
467
468static struct msm_iommu_ctx_dev jpegd_dst_ctx = {
469 .name = "jpegd_dst",
470 .num = 1,
471 .mids = {1, -1}
472};
473
474static struct msm_iommu_ctx_dev vpe_src_ctx = {
475 .name = "vpe_src",
476 .num = 0,
477 .mids = {0, -1}
478};
479
480static struct msm_iommu_ctx_dev vpe_dst_ctx = {
481 .name = "vpe_dst",
482 .num = 1,
483 .mids = {1, -1}
484};
485
486static struct msm_iommu_ctx_dev mdp_vg1_ctx = {
487 .name = "mdp_vg1",
488 .num = 0,
489 .mids = {0, 2, -1}
490};
491
492static struct msm_iommu_ctx_dev mdp_rgb1_ctx = {
493 .name = "mdp_rgb1",
494 .num = 1,
495 .mids = {1, 3, 4, 5, 6, 7, 8, 9, 10, -1}
496};
497
498static struct msm_iommu_ctx_dev mdp_vg2_ctx = {
499 .name = "mdp_vg2",
500 .num = 0,
501 .mids = {0, 2, -1}
502};
503
504static struct msm_iommu_ctx_dev mdp_rgb2_ctx = {
505 .name = "mdp_rgb2",
506 .num = 1,
507 .mids = {1, 3, 4, 5, 6, 7, 8, 9, 10, -1}
508};
509
510static struct msm_iommu_ctx_dev rot_src_ctx = {
511 .name = "rot_src",
512 .num = 0,
513 .mids = {0, -1}
514};
515
516static struct msm_iommu_ctx_dev rot_dst_ctx = {
517 .name = "rot_dst",
518 .num = 1,
519 .mids = {1, -1}
520};
521
522static struct msm_iommu_ctx_dev ijpeg_src_ctx = {
523 .name = "ijpeg_src",
524 .num = 0,
525 .mids = {0, -1}
526};
527
528static struct msm_iommu_ctx_dev ijpeg_dst_ctx = {
529 .name = "ijpeg_dst",
530 .num = 1,
531 .mids = {1, -1}
532};
533
534static struct msm_iommu_ctx_dev vfe_imgwr_ctx = {
535 .name = "vfe_imgwr",
536 .num = 0,
537 .mids = {2, 3, 4, 5, 6, 7, 8, -1}
538};
539
540static struct msm_iommu_ctx_dev vfe_misc_ctx = {
541 .name = "vfe_misc",
542 .num = 1,
543 .mids = {0, 1, 9, -1}
544};
545
546static struct msm_iommu_ctx_dev vcodec_a_stream_ctx = {
547 .name = "vcodec_a_stream",
548 .num = 0,
549 .mids = {2, 5, -1}
550};
551
552static struct msm_iommu_ctx_dev vcodec_a_mm1_ctx = {
553 .name = "vcodec_a_mm1",
554 .num = 1,
555 .mids = {0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -1}
556};
557
558static struct msm_iommu_ctx_dev vcodec_b_mm2_ctx = {
559 .name = "vcodec_b_mm2",
560 .num = 0,
561 .mids = {0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -1}
562};
563
564static struct msm_iommu_ctx_dev gfx3d_user_ctx = {
565 .name = "gfx3d_user",
566 .num = 0,
567 .mids = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -1}
568};
569
570static struct msm_iommu_ctx_dev gfx3d_priv_ctx = {
571 .name = "gfx3d_priv",
572 .num = 1,
573 .mids = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
574 31, -1}
575};
576
577static struct msm_iommu_ctx_dev gfx2d0_2d0_ctx = {
578 .name = "gfx2d0_2d0",
579 .num = 0,
580 .mids = {0, 1, 2, 3, 4, 5, 6, 7, -1}
581};
582
583static struct msm_iommu_ctx_dev gfx2d1_2d1_ctx = {
584 .name = "gfx2d1_2d1",
585 .num = 0,
586 .mids = {0, 1, 2, 3, 4, 5, 6, 7, -1}
587};
588
589static struct platform_device msm_device_jpegd_src_ctx = {
590 .name = "msm_iommu_ctx",
591 .id = 0,
592 .dev = {
593 .parent = &msm_device_iommu_jpegd.dev,
594 },
595};
596
597static struct platform_device msm_device_jpegd_dst_ctx = {
598 .name = "msm_iommu_ctx",
599 .id = 1,
600 .dev = {
601 .parent = &msm_device_iommu_jpegd.dev,
602 },
603};
604
605static struct platform_device msm_device_vpe_src_ctx = {
606 .name = "msm_iommu_ctx",
607 .id = 2,
608 .dev = {
609 .parent = &msm_device_iommu_vpe.dev,
610 },
611};
612
613static struct platform_device msm_device_vpe_dst_ctx = {
614 .name = "msm_iommu_ctx",
615 .id = 3,
616 .dev = {
617 .parent = &msm_device_iommu_vpe.dev,
618 },
619};
620
621static struct platform_device msm_device_mdp_vg1_ctx = {
622 .name = "msm_iommu_ctx",
623 .id = 4,
624 .dev = {
625 .parent = &msm_device_iommu_mdp0.dev,
626 },
627};
628
629static struct platform_device msm_device_mdp_rgb1_ctx = {
630 .name = "msm_iommu_ctx",
631 .id = 5,
632 .dev = {
633 .parent = &msm_device_iommu_mdp0.dev,
634 },
635};
636
637static struct platform_device msm_device_mdp_vg2_ctx = {
638 .name = "msm_iommu_ctx",
639 .id = 6,
640 .dev = {
641 .parent = &msm_device_iommu_mdp1.dev,
642 },
643};
644
645static struct platform_device msm_device_mdp_rgb2_ctx = {
646 .name = "msm_iommu_ctx",
647 .id = 7,
648 .dev = {
649 .parent = &msm_device_iommu_mdp1.dev,
650 },
651};
652
653static struct platform_device msm_device_rot_src_ctx = {
654 .name = "msm_iommu_ctx",
655 .id = 8,
656 .dev = {
657 .parent = &msm_device_iommu_rot.dev,
658 },
659};
660
661static struct platform_device msm_device_rot_dst_ctx = {
662 .name = "msm_iommu_ctx",
663 .id = 9,
664 .dev = {
665 .parent = &msm_device_iommu_rot.dev,
666 },
667};
668
669static struct platform_device msm_device_ijpeg_src_ctx = {
670 .name = "msm_iommu_ctx",
671 .id = 10,
672 .dev = {
673 .parent = &msm_device_iommu_ijpeg.dev,
674 },
675};
676
677static struct platform_device msm_device_ijpeg_dst_ctx = {
678 .name = "msm_iommu_ctx",
679 .id = 11,
680 .dev = {
681 .parent = &msm_device_iommu_ijpeg.dev,
682 },
683};
684
685static struct platform_device msm_device_vfe_imgwr_ctx = {
686 .name = "msm_iommu_ctx",
687 .id = 12,
688 .dev = {
689 .parent = &msm_device_iommu_vfe.dev,
690 },
691};
692
693static struct platform_device msm_device_vfe_misc_ctx = {
694 .name = "msm_iommu_ctx",
695 .id = 13,
696 .dev = {
697 .parent = &msm_device_iommu_vfe.dev,
698 },
699};
700
701static struct platform_device msm_device_vcodec_a_stream_ctx = {
702 .name = "msm_iommu_ctx",
703 .id = 14,
704 .dev = {
705 .parent = &msm_device_iommu_vcodec_a.dev,
706 },
707};
708
709static struct platform_device msm_device_vcodec_a_mm1_ctx = {
710 .name = "msm_iommu_ctx",
711 .id = 15,
712 .dev = {
713 .parent = &msm_device_iommu_vcodec_a.dev,
714 },
715};
716
717static struct platform_device msm_device_vcodec_b_mm2_ctx = {
718 .name = "msm_iommu_ctx",
719 .id = 16,
720 .dev = {
721 .parent = &msm_device_iommu_vcodec_b.dev,
722 },
723};
724
725static struct platform_device msm_device_gfx3d_user_ctx = {
726 .name = "msm_iommu_ctx",
727 .id = 17,
728 .dev = {
729 .parent = &msm_device_iommu_gfx3d.dev,
730 },
731};
732
733static struct platform_device msm_device_gfx3d_priv_ctx = {
734 .name = "msm_iommu_ctx",
735 .id = 18,
736 .dev = {
737 .parent = &msm_device_iommu_gfx3d.dev,
738 },
739};
740
741static struct platform_device msm_device_gfx2d0_2d0_ctx = {
742 .name = "msm_iommu_ctx",
743 .id = 19,
744 .dev = {
745 .parent = &msm_device_iommu_gfx2d0.dev,
746 },
747};
748
749static struct platform_device msm_device_gfx2d1_2d1_ctx = {
750 .name = "msm_iommu_ctx",
751 .id = 20,
752 .dev = {
753 .parent = &msm_device_iommu_gfx2d1.dev,
754 },
755};
756
757static struct platform_device *msm_iommu_devs[] = {
758 &msm_device_iommu_jpegd,
759 &msm_device_iommu_vpe,
760 &msm_device_iommu_mdp0,
761 &msm_device_iommu_mdp1,
762 &msm_device_iommu_rot,
763 &msm_device_iommu_ijpeg,
764 &msm_device_iommu_vfe,
765 &msm_device_iommu_vcodec_a,
766 &msm_device_iommu_vcodec_b,
767 &msm_device_iommu_gfx3d,
768 &msm_device_iommu_gfx2d0,
769 &msm_device_iommu_gfx2d1,
770};
771
772static struct msm_iommu_dev *msm_iommu_data[] = {
773 &jpegd_iommu,
774 &vpe_iommu,
775 &mdp0_iommu,
776 &mdp1_iommu,
777 &rot_iommu,
778 &ijpeg_iommu,
779 &vfe_iommu,
780 &vcodec_a_iommu,
781 &vcodec_b_iommu,
782 &gfx3d_iommu,
783 &gfx2d0_iommu,
784 &gfx2d1_iommu,
785};
786
787static struct platform_device *msm_iommu_ctx_devs[] = {
788 &msm_device_jpegd_src_ctx,
789 &msm_device_jpegd_dst_ctx,
790 &msm_device_vpe_src_ctx,
791 &msm_device_vpe_dst_ctx,
792 &msm_device_mdp_vg1_ctx,
793 &msm_device_mdp_rgb1_ctx,
794 &msm_device_mdp_vg2_ctx,
795 &msm_device_mdp_rgb2_ctx,
796 &msm_device_rot_src_ctx,
797 &msm_device_rot_dst_ctx,
798 &msm_device_ijpeg_src_ctx,
799 &msm_device_ijpeg_dst_ctx,
800 &msm_device_vfe_imgwr_ctx,
801 &msm_device_vfe_misc_ctx,
802 &msm_device_vcodec_a_stream_ctx,
803 &msm_device_vcodec_a_mm1_ctx,
804 &msm_device_vcodec_b_mm2_ctx,
805 &msm_device_gfx3d_user_ctx,
806 &msm_device_gfx3d_priv_ctx,
807 &msm_device_gfx2d0_2d0_ctx,
808 &msm_device_gfx2d1_2d1_ctx,
809};
810
811static struct msm_iommu_ctx_dev *msm_iommu_ctx_data[] = {
812 &jpegd_src_ctx,
813 &jpegd_dst_ctx,
814 &vpe_src_ctx,
815 &vpe_dst_ctx,
816 &mdp_vg1_ctx,
817 &mdp_rgb1_ctx,
818 &mdp_vg2_ctx,
819 &mdp_rgb2_ctx,
820 &rot_src_ctx,
821 &rot_dst_ctx,
822 &ijpeg_src_ctx,
823 &ijpeg_dst_ctx,
824 &vfe_imgwr_ctx,
825 &vfe_misc_ctx,
826 &vcodec_a_stream_ctx,
827 &vcodec_a_mm1_ctx,
828 &vcodec_b_mm2_ctx,
829 &gfx3d_user_ctx,
830 &gfx3d_priv_ctx,
831 &gfx2d0_2d0_ctx,
832 &gfx2d1_2d1_ctx,
833};
834
835static int __init msm8x60_iommu_init(void)
836{
837 int ret, i;
838
839 ret = platform_device_register(&msm_root_iommu_dev);
840 if (ret != 0) {
841 pr_err("Failed to register root IOMMU device!\n");
842 goto failure;
843 }
844
845 for (i = 0; i < ARRAY_SIZE(msm_iommu_devs); i++) {
846 ret = platform_device_add_data(msm_iommu_devs[i],
847 msm_iommu_data[i],
848 sizeof(struct msm_iommu_dev));
849 if (ret != 0) {
850 pr_err("platform_device_add_data failed, "
851 "i = %d\n", i);
852 goto failure_unwind;
853 }
854
855 ret = platform_device_register(msm_iommu_devs[i]);
856
857 if (ret != 0) {
858 pr_err("platform_device_register iommu failed, "
859 "i = %d\n", i);
860 goto failure_unwind;
861 }
862 }
863
864 for (i = 0; i < ARRAY_SIZE(msm_iommu_ctx_devs); i++) {
865 ret = platform_device_add_data(msm_iommu_ctx_devs[i],
866 msm_iommu_ctx_data[i],
867 sizeof(*msm_iommu_ctx_devs[i]));
868 if (ret != 0) {
869 pr_err("platform_device_add_data iommu failed, "
870 "i = %d\n", i);
871 goto failure_unwind2;
872 }
873
874 ret = platform_device_register(msm_iommu_ctx_devs[i]);
875 if (ret != 0) {
876 pr_err("platform_device_register ctx failed, "
877 "i = %d\n", i);
878 goto failure_unwind2;
879 }
880 }
881 return 0;
882
883failure_unwind2:
884 while (--i >= 0)
885 platform_device_unregister(msm_iommu_ctx_devs[i]);
886failure_unwind:
887 while (--i >= 0)
888 platform_device_unregister(msm_iommu_devs[i]);
889
890 platform_device_unregister(&msm_root_iommu_dev);
891failure:
892 return ret;
893}
894
895static void __exit msm8x60_iommu_exit(void)
896{
897 int i;
898
899 for (i = 0; i < ARRAY_SIZE(msm_iommu_ctx_devs); i++)
900 platform_device_unregister(msm_iommu_ctx_devs[i]);
901
902 for (i = 0; i < ARRAY_SIZE(msm_iommu_devs); ++i)
903 platform_device_unregister(msm_iommu_devs[i]);
904
905 platform_device_unregister(&msm_root_iommu_dev);
906}
907
908subsys_initcall(msm8x60_iommu_init);
909module_exit(msm8x60_iommu_exit);
910
911MODULE_LICENSE("GPL v2");
912MODULE_AUTHOR("Stepan Moskovchenko <stepanm@codeaurora.org>");
diff --git a/arch/arm/mach-msm/devices-msm7x30.c b/arch/arm/mach-msm/devices-msm7x30.c
index 14e286948f69..c15ea8ab20a7 100644
--- a/arch/arm/mach-msm/devices-msm7x30.c
+++ b/arch/arm/mach-msm/devices-msm7x30.c
@@ -21,10 +21,10 @@
21#include <mach/irqs.h> 21#include <mach/irqs.h>
22#include <mach/msm_iomap.h> 22#include <mach/msm_iomap.h>
23#include <mach/dma.h> 23#include <mach/dma.h>
24#include <mach/board.h>
25 24
26#include "devices.h" 25#include "devices.h"
27#include "smd_private.h" 26#include "smd_private.h"
27#include "common.h"
28 28
29#include <asm/mach/flash.h> 29#include <asm/mach/flash.h>
30 30
diff --git a/arch/arm/mach-msm/devices-qsd8x50.c b/arch/arm/mach-msm/devices-qsd8x50.c
index 2ed89b25d304..9e1e9ce07b1a 100644
--- a/arch/arm/mach-msm/devices-qsd8x50.c
+++ b/arch/arm/mach-msm/devices-qsd8x50.c
@@ -21,9 +21,9 @@
21#include <mach/irqs.h> 21#include <mach/irqs.h>
22#include <mach/msm_iomap.h> 22#include <mach/msm_iomap.h>
23#include <mach/dma.h> 23#include <mach/dma.h>
24#include <mach/board.h>
25 24
26#include "devices.h" 25#include "devices.h"
26#include "common.h"
27 27
28#include <asm/mach/flash.h> 28#include <asm/mach/flash.h>
29 29
diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h
deleted file mode 100644
index c34e246a3e07..000000000000
--- a/arch/arm/mach-msm/include/mach/board.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/* arch/arm/mach-msm/include/mach/board.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef __ASM_ARCH_MSM_BOARD_H
18#define __ASM_ARCH_MSM_BOARD_H
19
20#include <linux/types.h>
21#include <linux/platform_data/mmc-msm_sdcc.h>
22
23/* common init routines for use by arch/arm/mach-msm/board-*.c */
24
25void __init msm_add_devices(void);
26void __init msm_init_irq(void);
27void __init msm_init_gpio(void);
28int __init msm_add_sdcc(unsigned int controller,
29 struct msm_mmc_platform_data *plat,
30 unsigned int stat_irq, unsigned long stat_irq_flags);
31
32#if defined(CONFIG_MSM_SMD) && defined(CONFIG_DEBUG_FS)
33int smd_debugfs_init(void);
34#else
35static inline int smd_debugfs_init(void) { return 0; }
36#endif
37
38#endif
diff --git a/arch/arm/mach-msm/include/mach/iommu.h b/arch/arm/mach-msm/include/mach/iommu.h
deleted file mode 100644
index 5c7c955e6d25..000000000000
--- a/arch/arm/mach-msm/include/mach/iommu.h
+++ /dev/null
@@ -1,120 +0,0 @@
1/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18#ifndef MSM_IOMMU_H
19#define MSM_IOMMU_H
20
21#include <linux/interrupt.h>
22#include <linux/clk.h>
23
24/* Sharability attributes of MSM IOMMU mappings */
25#define MSM_IOMMU_ATTR_NON_SH 0x0
26#define MSM_IOMMU_ATTR_SH 0x4
27
28/* Cacheability attributes of MSM IOMMU mappings */
29#define MSM_IOMMU_ATTR_NONCACHED 0x0
30#define MSM_IOMMU_ATTR_CACHED_WB_WA 0x1
31#define MSM_IOMMU_ATTR_CACHED_WB_NWA 0x2
32#define MSM_IOMMU_ATTR_CACHED_WT 0x3
33
34/* Mask for the cache policy attribute */
35#define MSM_IOMMU_CP_MASK 0x03
36
37/* Maximum number of Machine IDs that we are allowing to be mapped to the same
38 * context bank. The number of MIDs mapped to the same CB does not affect
39 * performance, but there is a practical limit on how many distinct MIDs may
40 * be present. These mappings are typically determined at design time and are
41 * not expected to change at run time.
42 */
43#define MAX_NUM_MIDS 32
44
45/**
46 * struct msm_iommu_dev - a single IOMMU hardware instance
47 * name Human-readable name given to this IOMMU HW instance
48 * ncb Number of context banks present on this IOMMU HW instance
49 */
50struct msm_iommu_dev {
51 const char *name;
52 int ncb;
53};
54
55/**
56 * struct msm_iommu_ctx_dev - an IOMMU context bank instance
57 * name Human-readable name given to this context bank
58 * num Index of this context bank within the hardware
59 * mids List of Machine IDs that are to be mapped into this context
60 * bank, terminated by -1. The MID is a set of signals on the
61 * AXI bus that identifies the function associated with a specific
62 * memory request. (See ARM spec).
63 */
64struct msm_iommu_ctx_dev {
65 const char *name;
66 int num;
67 int mids[MAX_NUM_MIDS];
68};
69
70
71/**
72 * struct msm_iommu_drvdata - A single IOMMU hardware instance
73 * @base: IOMMU config port base address (VA)
74 * @ncb The number of contexts on this IOMMU
75 * @irq: Interrupt number
76 * @clk: The bus clock for this IOMMU hardware instance
77 * @pclk: The clock for the IOMMU bus interconnect
78 *
79 * A msm_iommu_drvdata holds the global driver data about a single piece
80 * of an IOMMU hardware instance.
81 */
82struct msm_iommu_drvdata {
83 void __iomem *base;
84 int irq;
85 int ncb;
86 struct clk *clk;
87 struct clk *pclk;
88};
89
90/**
91 * struct msm_iommu_ctx_drvdata - an IOMMU context bank instance
92 * @num: Hardware context number of this context
93 * @pdev: Platform device associated wit this HW instance
94 * @attached_elm: List element for domains to track which devices are
95 * attached to them
96 *
97 * A msm_iommu_ctx_drvdata holds the driver data for a single context bank
98 * within each IOMMU hardware instance
99 */
100struct msm_iommu_ctx_drvdata {
101 int num;
102 struct platform_device *pdev;
103 struct list_head attached_elm;
104};
105
106/*
107 * Look up an IOMMU context device by its context name. NULL if none found.
108 * Useful for testing and drivers that do not yet fully have IOMMU stuff in
109 * their platform devices.
110 */
111struct device *msm_iommu_get_ctx(const char *ctx_name);
112
113/*
114 * Interrupt handler for the IOMMU context fault interrupt. Hooking the
115 * interrupt is not supported in the API yet, but this will print an error
116 * message and dump useful IOMMU registers.
117 */
118irqreturn_t msm_iommu_fault_handler(int irq, void *dev_id);
119
120#endif
diff --git a/arch/arm/mach-msm/include/mach/iommu_hw-8xxx.h b/arch/arm/mach-msm/include/mach/iommu_hw-8xxx.h
deleted file mode 100644
index fc160101dead..000000000000
--- a/arch/arm/mach-msm/include/mach/iommu_hw-8xxx.h
+++ /dev/null
@@ -1,1865 +0,0 @@
1/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18#ifndef __ARCH_ARM_MACH_MSM_IOMMU_HW_8XXX_H
19#define __ARCH_ARM_MACH_MSM_IOMMU_HW_8XXX_H
20
21#define CTX_SHIFT 12
22
23#define GET_GLOBAL_REG(reg, base) (readl((base) + (reg)))
24#define GET_CTX_REG(reg, base, ctx) \
25 (readl((base) + (reg) + ((ctx) << CTX_SHIFT)))
26
27#define SET_GLOBAL_REG(reg, base, val) writel((val), ((base) + (reg)))
28
29#define SET_CTX_REG(reg, base, ctx, val) \
30 writel((val), ((base) + (reg) + ((ctx) << CTX_SHIFT)))
31
32/* Wrappers for numbered registers */
33#define SET_GLOBAL_REG_N(b, n, r, v) SET_GLOBAL_REG(b, ((r) + (n << 2)), (v))
34#define GET_GLOBAL_REG_N(b, n, r) GET_GLOBAL_REG(b, ((r) + (n << 2)))
35
36/* Field wrappers */
37#define GET_GLOBAL_FIELD(b, r, F) GET_FIELD(((b) + (r)), F##_MASK, F##_SHIFT)
38#define GET_CONTEXT_FIELD(b, c, r, F) \
39 GET_FIELD(((b) + (r) + ((c) << CTX_SHIFT)), F##_MASK, F##_SHIFT)
40
41#define SET_GLOBAL_FIELD(b, r, F, v) \
42 SET_FIELD(((b) + (r)), F##_MASK, F##_SHIFT, (v))
43#define SET_CONTEXT_FIELD(b, c, r, F, v) \
44 SET_FIELD(((b) + (r) + ((c) << CTX_SHIFT)), F##_MASK, F##_SHIFT, (v))
45
46#define GET_FIELD(addr, mask, shift) ((readl(addr) >> (shift)) & (mask))
47
48#define SET_FIELD(addr, mask, shift, v) \
49do { \
50 int t = readl(addr); \
51 writel((t & ~((mask) << (shift))) + (((v) & (mask)) << (shift)), addr);\
52} while (0)
53
54
55#define NUM_FL_PTE 4096
56#define NUM_SL_PTE 256
57#define NUM_TEX_CLASS 8
58
59/* First-level page table bits */
60#define FL_BASE_MASK 0xFFFFFC00
61#define FL_TYPE_TABLE (1 << 0)
62#define FL_TYPE_SECT (2 << 0)
63#define FL_SUPERSECTION (1 << 18)
64#define FL_AP_WRITE (1 << 10)
65#define FL_AP_READ (1 << 11)
66#define FL_SHARED (1 << 16)
67#define FL_BUFFERABLE (1 << 2)
68#define FL_CACHEABLE (1 << 3)
69#define FL_TEX0 (1 << 12)
70#define FL_OFFSET(va) (((va) & 0xFFF00000) >> 20)
71#define FL_NG (1 << 17)
72
73/* Second-level page table bits */
74#define SL_BASE_MASK_LARGE 0xFFFF0000
75#define SL_BASE_MASK_SMALL 0xFFFFF000
76#define SL_TYPE_LARGE (1 << 0)
77#define SL_TYPE_SMALL (2 << 0)
78#define SL_AP0 (1 << 4)
79#define SL_AP1 (2 << 4)
80#define SL_SHARED (1 << 10)
81#define SL_BUFFERABLE (1 << 2)
82#define SL_CACHEABLE (1 << 3)
83#define SL_TEX0 (1 << 6)
84#define SL_OFFSET(va) (((va) & 0xFF000) >> 12)
85#define SL_NG (1 << 11)
86
87/* Memory type and cache policy attributes */
88#define MT_SO 0
89#define MT_DEV 1
90#define MT_NORMAL 2
91#define CP_NONCACHED 0
92#define CP_WB_WA 1
93#define CP_WT 2
94#define CP_WB_NWA 3
95
96/* Global register setters / getters */
97#define SET_M2VCBR_N(b, N, v) SET_GLOBAL_REG_N(M2VCBR_N, N, (b), (v))
98#define SET_CBACR_N(b, N, v) SET_GLOBAL_REG_N(CBACR_N, N, (b), (v))
99#define SET_TLBRSW(b, v) SET_GLOBAL_REG(TLBRSW, (b), (v))
100#define SET_TLBTR0(b, v) SET_GLOBAL_REG(TLBTR0, (b), (v))
101#define SET_TLBTR1(b, v) SET_GLOBAL_REG(TLBTR1, (b), (v))
102#define SET_TLBTR2(b, v) SET_GLOBAL_REG(TLBTR2, (b), (v))
103#define SET_TESTBUSCR(b, v) SET_GLOBAL_REG(TESTBUSCR, (b), (v))
104#define SET_GLOBAL_TLBIALL(b, v) SET_GLOBAL_REG(GLOBAL_TLBIALL, (b), (v))
105#define SET_TLBIVMID(b, v) SET_GLOBAL_REG(TLBIVMID, (b), (v))
106#define SET_CR(b, v) SET_GLOBAL_REG(CR, (b), (v))
107#define SET_EAR(b, v) SET_GLOBAL_REG(EAR, (b), (v))
108#define SET_ESR(b, v) SET_GLOBAL_REG(ESR, (b), (v))
109#define SET_ESRRESTORE(b, v) SET_GLOBAL_REG(ESRRESTORE, (b), (v))
110#define SET_ESYNR0(b, v) SET_GLOBAL_REG(ESYNR0, (b), (v))
111#define SET_ESYNR1(b, v) SET_GLOBAL_REG(ESYNR1, (b), (v))
112#define SET_RPU_ACR(b, v) SET_GLOBAL_REG(RPU_ACR, (b), (v))
113
114#define GET_M2VCBR_N(b, N) GET_GLOBAL_REG_N(M2VCBR_N, N, (b))
115#define GET_CBACR_N(b, N) GET_GLOBAL_REG_N(CBACR_N, N, (b))
116#define GET_TLBTR0(b) GET_GLOBAL_REG(TLBTR0, (b))
117#define GET_TLBTR1(b) GET_GLOBAL_REG(TLBTR1, (b))
118#define GET_TLBTR2(b) GET_GLOBAL_REG(TLBTR2, (b))
119#define GET_TESTBUSCR(b) GET_GLOBAL_REG(TESTBUSCR, (b))
120#define GET_GLOBAL_TLBIALL(b) GET_GLOBAL_REG(GLOBAL_TLBIALL, (b))
121#define GET_TLBIVMID(b) GET_GLOBAL_REG(TLBIVMID, (b))
122#define GET_CR(b) GET_GLOBAL_REG(CR, (b))
123#define GET_EAR(b) GET_GLOBAL_REG(EAR, (b))
124#define GET_ESR(b) GET_GLOBAL_REG(ESR, (b))
125#define GET_ESRRESTORE(b) GET_GLOBAL_REG(ESRRESTORE, (b))
126#define GET_ESYNR0(b) GET_GLOBAL_REG(ESYNR0, (b))
127#define GET_ESYNR1(b) GET_GLOBAL_REG(ESYNR1, (b))
128#define GET_REV(b) GET_GLOBAL_REG(REV, (b))
129#define GET_IDR(b) GET_GLOBAL_REG(IDR, (b))
130#define GET_RPU_ACR(b) GET_GLOBAL_REG(RPU_ACR, (b))
131
132
133/* Context register setters/getters */
134#define SET_SCTLR(b, c, v) SET_CTX_REG(SCTLR, (b), (c), (v))
135#define SET_ACTLR(b, c, v) SET_CTX_REG(ACTLR, (b), (c), (v))
136#define SET_CONTEXTIDR(b, c, v) SET_CTX_REG(CONTEXTIDR, (b), (c), (v))
137#define SET_TTBR0(b, c, v) SET_CTX_REG(TTBR0, (b), (c), (v))
138#define SET_TTBR1(b, c, v) SET_CTX_REG(TTBR1, (b), (c), (v))
139#define SET_TTBCR(b, c, v) SET_CTX_REG(TTBCR, (b), (c), (v))
140#define SET_PAR(b, c, v) SET_CTX_REG(PAR, (b), (c), (v))
141#define SET_FSR(b, c, v) SET_CTX_REG(FSR, (b), (c), (v))
142#define SET_FSRRESTORE(b, c, v) SET_CTX_REG(FSRRESTORE, (b), (c), (v))
143#define SET_FAR(b, c, v) SET_CTX_REG(FAR, (b), (c), (v))
144#define SET_FSYNR0(b, c, v) SET_CTX_REG(FSYNR0, (b), (c), (v))
145#define SET_FSYNR1(b, c, v) SET_CTX_REG(FSYNR1, (b), (c), (v))
146#define SET_PRRR(b, c, v) SET_CTX_REG(PRRR, (b), (c), (v))
147#define SET_NMRR(b, c, v) SET_CTX_REG(NMRR, (b), (c), (v))
148#define SET_TLBLKCR(b, c, v) SET_CTX_REG(TLBLCKR, (b), (c), (v))
149#define SET_V2PSR(b, c, v) SET_CTX_REG(V2PSR, (b), (c), (v))
150#define SET_TLBFLPTER(b, c, v) SET_CTX_REG(TLBFLPTER, (b), (c), (v))
151#define SET_TLBSLPTER(b, c, v) SET_CTX_REG(TLBSLPTER, (b), (c), (v))
152#define SET_BFBCR(b, c, v) SET_CTX_REG(BFBCR, (b), (c), (v))
153#define SET_CTX_TLBIALL(b, c, v) SET_CTX_REG(CTX_TLBIALL, (b), (c), (v))
154#define SET_TLBIASID(b, c, v) SET_CTX_REG(TLBIASID, (b), (c), (v))
155#define SET_TLBIVA(b, c, v) SET_CTX_REG(TLBIVA, (b), (c), (v))
156#define SET_TLBIVAA(b, c, v) SET_CTX_REG(TLBIVAA, (b), (c), (v))
157#define SET_V2PPR(b, c, v) SET_CTX_REG(V2PPR, (b), (c), (v))
158#define SET_V2PPW(b, c, v) SET_CTX_REG(V2PPW, (b), (c), (v))
159#define SET_V2PUR(b, c, v) SET_CTX_REG(V2PUR, (b), (c), (v))
160#define SET_V2PUW(b, c, v) SET_CTX_REG(V2PUW, (b), (c), (v))
161#define SET_RESUME(b, c, v) SET_CTX_REG(RESUME, (b), (c), (v))
162
163#define GET_SCTLR(b, c) GET_CTX_REG(SCTLR, (b), (c))
164#define GET_ACTLR(b, c) GET_CTX_REG(ACTLR, (b), (c))
165#define GET_CONTEXTIDR(b, c) GET_CTX_REG(CONTEXTIDR, (b), (c))
166#define GET_TTBR0(b, c) GET_CTX_REG(TTBR0, (b), (c))
167#define GET_TTBR1(b, c) GET_CTX_REG(TTBR1, (b), (c))
168#define GET_TTBCR(b, c) GET_CTX_REG(TTBCR, (b), (c))
169#define GET_PAR(b, c) GET_CTX_REG(PAR, (b), (c))
170#define GET_FSR(b, c) GET_CTX_REG(FSR, (b), (c))
171#define GET_FSRRESTORE(b, c) GET_CTX_REG(FSRRESTORE, (b), (c))
172#define GET_FAR(b, c) GET_CTX_REG(FAR, (b), (c))
173#define GET_FSYNR0(b, c) GET_CTX_REG(FSYNR0, (b), (c))
174#define GET_FSYNR1(b, c) GET_CTX_REG(FSYNR1, (b), (c))
175#define GET_PRRR(b, c) GET_CTX_REG(PRRR, (b), (c))
176#define GET_NMRR(b, c) GET_CTX_REG(NMRR, (b), (c))
177#define GET_TLBLCKR(b, c) GET_CTX_REG(TLBLCKR, (b), (c))
178#define GET_V2PSR(b, c) GET_CTX_REG(V2PSR, (b), (c))
179#define GET_TLBFLPTER(b, c) GET_CTX_REG(TLBFLPTER, (b), (c))
180#define GET_TLBSLPTER(b, c) GET_CTX_REG(TLBSLPTER, (b), (c))
181#define GET_BFBCR(b, c) GET_CTX_REG(BFBCR, (b), (c))
182#define GET_CTX_TLBIALL(b, c) GET_CTX_REG(CTX_TLBIALL, (b), (c))
183#define GET_TLBIASID(b, c) GET_CTX_REG(TLBIASID, (b), (c))
184#define GET_TLBIVA(b, c) GET_CTX_REG(TLBIVA, (b), (c))
185#define GET_TLBIVAA(b, c) GET_CTX_REG(TLBIVAA, (b), (c))
186#define GET_V2PPR(b, c) GET_CTX_REG(V2PPR, (b), (c))
187#define GET_V2PPW(b, c) GET_CTX_REG(V2PPW, (b), (c))
188#define GET_V2PUR(b, c) GET_CTX_REG(V2PUR, (b), (c))
189#define GET_V2PUW(b, c) GET_CTX_REG(V2PUW, (b), (c))
190#define GET_RESUME(b, c) GET_CTX_REG(RESUME, (b), (c))
191
192
193/* Global field setters / getters */
194/* Global Field Setters: */
195/* CBACR_N */
196#define SET_RWVMID(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWVMID, v)
197#define SET_RWE(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWE, v)
198#define SET_RWGE(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWGE, v)
199#define SET_CBVMID(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), CBVMID, v)
200#define SET_IRPTNDX(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), IRPTNDX, v)
201
202
203/* M2VCBR_N */
204#define SET_VMID(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), VMID, v)
205#define SET_CBNDX(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), CBNDX, v)
206#define SET_BYPASSD(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BYPASSD, v)
207#define SET_BPRCOSH(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCOSH, v)
208#define SET_BPRCISH(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCISH, v)
209#define SET_BPRCNSH(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCNSH, v)
210#define SET_BPSHCFG(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPSHCFG, v)
211#define SET_NSCFG(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), NSCFG, v)
212#define SET_BPMTCFG(b, n, v) SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMTCFG, v)
213#define SET_BPMEMTYPE(b, n, v) \
214 SET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMEMTYPE, v)
215
216
217/* CR */
218#define SET_RPUE(b, v) SET_GLOBAL_FIELD(b, CR, RPUE, v)
219#define SET_RPUERE(b, v) SET_GLOBAL_FIELD(b, CR, RPUERE, v)
220#define SET_RPUEIE(b, v) SET_GLOBAL_FIELD(b, CR, RPUEIE, v)
221#define SET_DCDEE(b, v) SET_GLOBAL_FIELD(b, CR, DCDEE, v)
222#define SET_CLIENTPD(b, v) SET_GLOBAL_FIELD(b, CR, CLIENTPD, v)
223#define SET_STALLD(b, v) SET_GLOBAL_FIELD(b, CR, STALLD, v)
224#define SET_TLBLKCRWE(b, v) SET_GLOBAL_FIELD(b, CR, TLBLKCRWE, v)
225#define SET_CR_TLBIALLCFG(b, v) SET_GLOBAL_FIELD(b, CR, CR_TLBIALLCFG, v)
226#define SET_TLBIVMIDCFG(b, v) SET_GLOBAL_FIELD(b, CR, TLBIVMIDCFG, v)
227#define SET_CR_HUME(b, v) SET_GLOBAL_FIELD(b, CR, CR_HUME, v)
228
229
230/* ESR */
231#define SET_CFG(b, v) SET_GLOBAL_FIELD(b, ESR, CFG, v)
232#define SET_BYPASS(b, v) SET_GLOBAL_FIELD(b, ESR, BYPASS, v)
233#define SET_ESR_MULTI(b, v) SET_GLOBAL_FIELD(b, ESR, ESR_MULTI, v)
234
235
236/* ESYNR0 */
237#define SET_ESYNR0_AMID(b, v) SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AMID, v)
238#define SET_ESYNR0_APID(b, v) SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_APID, v)
239#define SET_ESYNR0_ABID(b, v) SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ABID, v)
240#define SET_ESYNR0_AVMID(b, v) SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AVMID, v)
241#define SET_ESYNR0_ATID(b, v) SET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ATID, v)
242
243
244/* ESYNR1 */
245#define SET_ESYNR1_AMEMTYPE(b, v) \
246 SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AMEMTYPE, v)
247#define SET_ESYNR1_ASHARED(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASHARED, v)
248#define SET_ESYNR1_AINNERSHARED(b, v) \
249 SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINNERSHARED, v)
250#define SET_ESYNR1_APRIV(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APRIV, v)
251#define SET_ESYNR1_APROTNS(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APROTNS, v)
252#define SET_ESYNR1_AINST(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINST, v)
253#define SET_ESYNR1_AWRITE(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AWRITE, v)
254#define SET_ESYNR1_ABURST(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ABURST, v)
255#define SET_ESYNR1_ALEN(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALEN, v)
256#define SET_ESYNR1_ASIZE(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASIZE, v)
257#define SET_ESYNR1_ALOCK(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALOCK, v)
258#define SET_ESYNR1_AOOO(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AOOO, v)
259#define SET_ESYNR1_AFULL(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AFULL, v)
260#define SET_ESYNR1_AC(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AC, v)
261#define SET_ESYNR1_DCD(b, v) SET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_DCD, v)
262
263
264/* TESTBUSCR */
265#define SET_TBE(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, TBE, v)
266#define SET_SPDMBE(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, SPDMBE, v)
267#define SET_WGSEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, WGSEL, v)
268#define SET_TBLSEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, TBLSEL, v)
269#define SET_TBHSEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, TBHSEL, v)
270#define SET_SPDM0SEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM0SEL, v)
271#define SET_SPDM1SEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM1SEL, v)
272#define SET_SPDM2SEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM2SEL, v)
273#define SET_SPDM3SEL(b, v) SET_GLOBAL_FIELD(b, TESTBUSCR, SPDM3SEL, v)
274
275
276/* TLBIVMID */
277#define SET_TLBIVMID_VMID(b, v) SET_GLOBAL_FIELD(b, TLBIVMID, TLBIVMID_VMID, v)
278
279
280/* TLBRSW */
281#define SET_TLBRSW_INDEX(b, v) SET_GLOBAL_FIELD(b, TLBRSW, TLBRSW_INDEX, v)
282#define SET_TLBBFBS(b, v) SET_GLOBAL_FIELD(b, TLBRSW, TLBBFBS, v)
283
284
285/* TLBTR0 */
286#define SET_PR(b, v) SET_GLOBAL_FIELD(b, TLBTR0, PR, v)
287#define SET_PW(b, v) SET_GLOBAL_FIELD(b, TLBTR0, PW, v)
288#define SET_UR(b, v) SET_GLOBAL_FIELD(b, TLBTR0, UR, v)
289#define SET_UW(b, v) SET_GLOBAL_FIELD(b, TLBTR0, UW, v)
290#define SET_XN(b, v) SET_GLOBAL_FIELD(b, TLBTR0, XN, v)
291#define SET_NSDESC(b, v) SET_GLOBAL_FIELD(b, TLBTR0, NSDESC, v)
292#define SET_ISH(b, v) SET_GLOBAL_FIELD(b, TLBTR0, ISH, v)
293#define SET_SH(b, v) SET_GLOBAL_FIELD(b, TLBTR0, SH, v)
294#define SET_MT(b, v) SET_GLOBAL_FIELD(b, TLBTR0, MT, v)
295#define SET_DPSIZR(b, v) SET_GLOBAL_FIELD(b, TLBTR0, DPSIZR, v)
296#define SET_DPSIZC(b, v) SET_GLOBAL_FIELD(b, TLBTR0, DPSIZC, v)
297
298
299/* TLBTR1 */
300#define SET_TLBTR1_VMID(b, v) SET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_VMID, v)
301#define SET_TLBTR1_PA(b, v) SET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_PA, v)
302
303
304/* TLBTR2 */
305#define SET_TLBTR2_ASID(b, v) SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_ASID, v)
306#define SET_TLBTR2_V(b, v) SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_V, v)
307#define SET_TLBTR2_NSTID(b, v) SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NSTID, v)
308#define SET_TLBTR2_NV(b, v) SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NV, v)
309#define SET_TLBTR2_VA(b, v) SET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_VA, v)
310
311
312/* Global Field Getters */
313/* CBACR_N */
314#define GET_RWVMID(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWVMID)
315#define GET_RWE(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWE)
316#define GET_RWGE(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), RWGE)
317#define GET_CBVMID(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), CBVMID)
318#define GET_IRPTNDX(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(CBACR_N), IRPTNDX)
319
320
321/* M2VCBR_N */
322#define GET_VMID(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), VMID)
323#define GET_CBNDX(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), CBNDX)
324#define GET_BYPASSD(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BYPASSD)
325#define GET_BPRCOSH(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCOSH)
326#define GET_BPRCISH(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCISH)
327#define GET_BPRCNSH(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPRCNSH)
328#define GET_BPSHCFG(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPSHCFG)
329#define GET_NSCFG(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), NSCFG)
330#define GET_BPMTCFG(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMTCFG)
331#define GET_BPMEMTYPE(b, n) GET_GLOBAL_FIELD(b, (n<<2)|(M2VCBR_N), BPMEMTYPE)
332
333
334/* CR */
335#define GET_RPUE(b) GET_GLOBAL_FIELD(b, CR, RPUE)
336#define GET_RPUERE(b) GET_GLOBAL_FIELD(b, CR, RPUERE)
337#define GET_RPUEIE(b) GET_GLOBAL_FIELD(b, CR, RPUEIE)
338#define GET_DCDEE(b) GET_GLOBAL_FIELD(b, CR, DCDEE)
339#define GET_CLIENTPD(b) GET_GLOBAL_FIELD(b, CR, CLIENTPD)
340#define GET_STALLD(b) GET_GLOBAL_FIELD(b, CR, STALLD)
341#define GET_TLBLKCRWE(b) GET_GLOBAL_FIELD(b, CR, TLBLKCRWE)
342#define GET_CR_TLBIALLCFG(b) GET_GLOBAL_FIELD(b, CR, CR_TLBIALLCFG)
343#define GET_TLBIVMIDCFG(b) GET_GLOBAL_FIELD(b, CR, TLBIVMIDCFG)
344#define GET_CR_HUME(b) GET_GLOBAL_FIELD(b, CR, CR_HUME)
345
346
347/* ESR */
348#define GET_CFG(b) GET_GLOBAL_FIELD(b, ESR, CFG)
349#define GET_BYPASS(b) GET_GLOBAL_FIELD(b, ESR, BYPASS)
350#define GET_ESR_MULTI(b) GET_GLOBAL_FIELD(b, ESR, ESR_MULTI)
351
352
353/* ESYNR0 */
354#define GET_ESYNR0_AMID(b) GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AMID)
355#define GET_ESYNR0_APID(b) GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_APID)
356#define GET_ESYNR0_ABID(b) GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ABID)
357#define GET_ESYNR0_AVMID(b) GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_AVMID)
358#define GET_ESYNR0_ATID(b) GET_GLOBAL_FIELD(b, ESYNR0, ESYNR0_ATID)
359
360
361/* ESYNR1 */
362#define GET_ESYNR1_AMEMTYPE(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AMEMTYPE)
363#define GET_ESYNR1_ASHARED(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASHARED)
364#define GET_ESYNR1_AINNERSHARED(b) \
365 GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINNERSHARED)
366#define GET_ESYNR1_APRIV(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APRIV)
367#define GET_ESYNR1_APROTNS(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_APROTNS)
368#define GET_ESYNR1_AINST(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AINST)
369#define GET_ESYNR1_AWRITE(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AWRITE)
370#define GET_ESYNR1_ABURST(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ABURST)
371#define GET_ESYNR1_ALEN(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALEN)
372#define GET_ESYNR1_ASIZE(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ASIZE)
373#define GET_ESYNR1_ALOCK(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_ALOCK)
374#define GET_ESYNR1_AOOO(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AOOO)
375#define GET_ESYNR1_AFULL(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AFULL)
376#define GET_ESYNR1_AC(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_AC)
377#define GET_ESYNR1_DCD(b) GET_GLOBAL_FIELD(b, ESYNR1, ESYNR1_DCD)
378
379
380/* IDR */
381#define GET_NM2VCBMT(b) GET_GLOBAL_FIELD(b, IDR, NM2VCBMT)
382#define GET_HTW(b) GET_GLOBAL_FIELD(b, IDR, HTW)
383#define GET_HUM(b) GET_GLOBAL_FIELD(b, IDR, HUM)
384#define GET_TLBSIZE(b) GET_GLOBAL_FIELD(b, IDR, TLBSIZE)
385#define GET_NCB(b) GET_GLOBAL_FIELD(b, IDR, NCB)
386#define GET_NIRPT(b) GET_GLOBAL_FIELD(b, IDR, NIRPT)
387
388
389/* REV */
390#define GET_MAJOR(b) GET_GLOBAL_FIELD(b, REV, MAJOR)
391#define GET_MINOR(b) GET_GLOBAL_FIELD(b, REV, MINOR)
392
393
394/* TESTBUSCR */
395#define GET_TBE(b) GET_GLOBAL_FIELD(b, TESTBUSCR, TBE)
396#define GET_SPDMBE(b) GET_GLOBAL_FIELD(b, TESTBUSCR, SPDMBE)
397#define GET_WGSEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, WGSEL)
398#define GET_TBLSEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, TBLSEL)
399#define GET_TBHSEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, TBHSEL)
400#define GET_SPDM0SEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM0SEL)
401#define GET_SPDM1SEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM1SEL)
402#define GET_SPDM2SEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM2SEL)
403#define GET_SPDM3SEL(b) GET_GLOBAL_FIELD(b, TESTBUSCR, SPDM3SEL)
404
405
406/* TLBIVMID */
407#define GET_TLBIVMID_VMID(b) GET_GLOBAL_FIELD(b, TLBIVMID, TLBIVMID_VMID)
408
409
410/* TLBTR0 */
411#define GET_PR(b) GET_GLOBAL_FIELD(b, TLBTR0, PR)
412#define GET_PW(b) GET_GLOBAL_FIELD(b, TLBTR0, PW)
413#define GET_UR(b) GET_GLOBAL_FIELD(b, TLBTR0, UR)
414#define GET_UW(b) GET_GLOBAL_FIELD(b, TLBTR0, UW)
415#define GET_XN(b) GET_GLOBAL_FIELD(b, TLBTR0, XN)
416#define GET_NSDESC(b) GET_GLOBAL_FIELD(b, TLBTR0, NSDESC)
417#define GET_ISH(b) GET_GLOBAL_FIELD(b, TLBTR0, ISH)
418#define GET_SH(b) GET_GLOBAL_FIELD(b, TLBTR0, SH)
419#define GET_MT(b) GET_GLOBAL_FIELD(b, TLBTR0, MT)
420#define GET_DPSIZR(b) GET_GLOBAL_FIELD(b, TLBTR0, DPSIZR)
421#define GET_DPSIZC(b) GET_GLOBAL_FIELD(b, TLBTR0, DPSIZC)
422
423
424/* TLBTR1 */
425#define GET_TLBTR1_VMID(b) GET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_VMID)
426#define GET_TLBTR1_PA(b) GET_GLOBAL_FIELD(b, TLBTR1, TLBTR1_PA)
427
428
429/* TLBTR2 */
430#define GET_TLBTR2_ASID(b) GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_ASID)
431#define GET_TLBTR2_V(b) GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_V)
432#define GET_TLBTR2_NSTID(b) GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NSTID)
433#define GET_TLBTR2_NV(b) GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_NV)
434#define GET_TLBTR2_VA(b) GET_GLOBAL_FIELD(b, TLBTR2, TLBTR2_VA)
435
436
437/* Context Register setters / getters */
438/* Context Register setters */
439/* ACTLR */
440#define SET_CFERE(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, CFERE, v)
441#define SET_CFEIE(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, CFEIE, v)
442#define SET_PTSHCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, PTSHCFG, v)
443#define SET_RCOSH(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, RCOSH, v)
444#define SET_RCISH(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, RCISH, v)
445#define SET_RCNSH(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, RCNSH, v)
446#define SET_PRIVCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, PRIVCFG, v)
447#define SET_DNA(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, DNA, v)
448#define SET_DNLV2PA(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, DNLV2PA, v)
449#define SET_TLBMCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, TLBMCFG, v)
450#define SET_CFCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, CFCFG, v)
451#define SET_TIPCF(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, TIPCF, v)
452#define SET_V2PCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, V2PCFG, v)
453#define SET_HUME(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, HUME, v)
454#define SET_PTMTCFG(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, PTMTCFG, v)
455#define SET_PTMEMTYPE(b, c, v) SET_CONTEXT_FIELD(b, c, ACTLR, PTMEMTYPE, v)
456
457
458/* BFBCR */
459#define SET_BFBDFE(b, c, v) SET_CONTEXT_FIELD(b, c, BFBCR, BFBDFE, v)
460#define SET_BFBSFE(b, c, v) SET_CONTEXT_FIELD(b, c, BFBCR, BFBSFE, v)
461#define SET_SFVS(b, c, v) SET_CONTEXT_FIELD(b, c, BFBCR, SFVS, v)
462#define SET_FLVIC(b, c, v) SET_CONTEXT_FIELD(b, c, BFBCR, FLVIC, v)
463#define SET_SLVIC(b, c, v) SET_CONTEXT_FIELD(b, c, BFBCR, SLVIC, v)
464
465
466/* CONTEXTIDR */
467#define SET_CONTEXTIDR_ASID(b, c, v) \
468 SET_CONTEXT_FIELD(b, c, CONTEXTIDR, CONTEXTIDR_ASID, v)
469#define SET_CONTEXTIDR_PROCID(b, c, v) \
470 SET_CONTEXT_FIELD(b, c, CONTEXTIDR, PROCID, v)
471
472
473/* FSR */
474#define SET_TF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, TF, v)
475#define SET_AFF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, AFF, v)
476#define SET_APF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, APF, v)
477#define SET_TLBMF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, TLBMF, v)
478#define SET_HTWDEEF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, HTWDEEF, v)
479#define SET_HTWSEEF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, HTWSEEF, v)
480#define SET_MHF(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, MHF, v)
481#define SET_SL(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, SL, v)
482#define SET_SS(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, SS, v)
483#define SET_MULTI(b, c, v) SET_CONTEXT_FIELD(b, c, FSR, MULTI, v)
484
485
486/* FSYNR0 */
487#define SET_AMID(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR0, AMID, v)
488#define SET_APID(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR0, APID, v)
489#define SET_ABID(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR0, ABID, v)
490#define SET_ATID(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR0, ATID, v)
491
492
493/* FSYNR1 */
494#define SET_AMEMTYPE(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, AMEMTYPE, v)
495#define SET_ASHARED(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, ASHARED, v)
496#define SET_AINNERSHARED(b, c, v) \
497 SET_CONTEXT_FIELD(b, c, FSYNR1, AINNERSHARED, v)
498#define SET_APRIV(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, APRIV, v)
499#define SET_APROTNS(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, APROTNS, v)
500#define SET_AINST(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, AINST, v)
501#define SET_AWRITE(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, AWRITE, v)
502#define SET_ABURST(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, ABURST, v)
503#define SET_ALEN(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, ALEN, v)
504#define SET_FSYNR1_ASIZE(b, c, v) \
505 SET_CONTEXT_FIELD(b, c, FSYNR1, FSYNR1_ASIZE, v)
506#define SET_ALOCK(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, ALOCK, v)
507#define SET_AFULL(b, c, v) SET_CONTEXT_FIELD(b, c, FSYNR1, AFULL, v)
508
509
510/* NMRR */
511#define SET_ICPC0(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC0, v)
512#define SET_ICPC1(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC1, v)
513#define SET_ICPC2(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC2, v)
514#define SET_ICPC3(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC3, v)
515#define SET_ICPC4(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC4, v)
516#define SET_ICPC5(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC5, v)
517#define SET_ICPC6(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC6, v)
518#define SET_ICPC7(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, ICPC7, v)
519#define SET_OCPC0(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC0, v)
520#define SET_OCPC1(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC1, v)
521#define SET_OCPC2(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC2, v)
522#define SET_OCPC3(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC3, v)
523#define SET_OCPC4(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC4, v)
524#define SET_OCPC5(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC5, v)
525#define SET_OCPC6(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC6, v)
526#define SET_OCPC7(b, c, v) SET_CONTEXT_FIELD(b, c, NMRR, OCPC7, v)
527
528
529/* PAR */
530#define SET_FAULT(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT, v)
531
532#define SET_FAULT_TF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_TF, v)
533#define SET_FAULT_AFF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_AFF, v)
534#define SET_FAULT_APF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_APF, v)
535#define SET_FAULT_TLBMF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_TLBMF, v)
536#define SET_FAULT_HTWDEEF(b, c, v) \
537 SET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWDEEF, v)
538#define SET_FAULT_HTWSEEF(b, c, v) \
539 SET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWSEEF, v)
540#define SET_FAULT_MHF(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_MHF, v)
541#define SET_FAULT_SL(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_SL, v)
542#define SET_FAULT_SS(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, FAULT_SS, v)
543
544#define SET_NOFAULT_SS(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_SS, v)
545#define SET_NOFAULT_MT(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_MT, v)
546#define SET_NOFAULT_SH(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_SH, v)
547#define SET_NOFAULT_NS(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_NS, v)
548#define SET_NOFAULT_NOS(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NOFAULT_NOS, v)
549#define SET_NPFAULT_PA(b, c, v) SET_CONTEXT_FIELD(b, c, PAR, NPFAULT_PA, v)
550
551
552/* PRRR */
553#define SET_MTC0(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC0, v)
554#define SET_MTC1(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC1, v)
555#define SET_MTC2(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC2, v)
556#define SET_MTC3(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC3, v)
557#define SET_MTC4(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC4, v)
558#define SET_MTC5(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC5, v)
559#define SET_MTC6(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC6, v)
560#define SET_MTC7(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, MTC7, v)
561#define SET_SHDSH0(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, SHDSH0, v)
562#define SET_SHDSH1(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, SHDSH1, v)
563#define SET_SHNMSH0(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, SHNMSH0, v)
564#define SET_SHNMSH1(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, SHNMSH1, v)
565#define SET_NOS0(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS0, v)
566#define SET_NOS1(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS1, v)
567#define SET_NOS2(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS2, v)
568#define SET_NOS3(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS3, v)
569#define SET_NOS4(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS4, v)
570#define SET_NOS5(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS5, v)
571#define SET_NOS6(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS6, v)
572#define SET_NOS7(b, c, v) SET_CONTEXT_FIELD(b, c, PRRR, NOS7, v)
573
574
575/* RESUME */
576#define SET_TNR(b, c, v) SET_CONTEXT_FIELD(b, c, RESUME, TNR, v)
577
578
579/* SCTLR */
580#define SET_M(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, M, v)
581#define SET_TRE(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, TRE, v)
582#define SET_AFE(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, AFE, v)
583#define SET_HAF(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, HAF, v)
584#define SET_BE(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, BE, v)
585#define SET_AFFD(b, c, v) SET_CONTEXT_FIELD(b, c, SCTLR, AFFD, v)
586
587
588/* TLBLKCR */
589#define SET_LKE(b, c, v) SET_CONTEXT_FIELD(b, c, TLBLKCR, LKE, v)
590#define SET_TLBLKCR_TLBIALLCFG(b, c, v) \
591 SET_CONTEXT_FIELD(b, c, TLBLKCR, TLBLCKR_TLBIALLCFG, v)
592#define SET_TLBIASIDCFG(b, c, v) \
593 SET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIASIDCFG, v)
594#define SET_TLBIVAACFG(b, c, v) SET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIVAACFG, v)
595#define SET_FLOOR(b, c, v) SET_CONTEXT_FIELD(b, c, TLBLKCR, FLOOR, v)
596#define SET_VICTIM(b, c, v) SET_CONTEXT_FIELD(b, c, TLBLKCR, VICTIM, v)
597
598
599/* TTBCR */
600#define SET_N(b, c, v) SET_CONTEXT_FIELD(b, c, TTBCR, N, v)
601#define SET_PD0(b, c, v) SET_CONTEXT_FIELD(b, c, TTBCR, PD0, v)
602#define SET_PD1(b, c, v) SET_CONTEXT_FIELD(b, c, TTBCR, PD1, v)
603
604
605/* TTBR0 */
606#define SET_TTBR0_IRGNH(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNH, v)
607#define SET_TTBR0_SH(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_SH, v)
608#define SET_TTBR0_ORGN(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_ORGN, v)
609#define SET_TTBR0_NOS(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_NOS, v)
610#define SET_TTBR0_IRGNL(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNL, v)
611#define SET_TTBR0_PA(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_PA, v)
612
613
614/* TTBR1 */
615#define SET_TTBR1_IRGNH(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNH, v)
616#define SET_TTBR1_SH(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_SH, v)
617#define SET_TTBR1_ORGN(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_ORGN, v)
618#define SET_TTBR1_NOS(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_NOS, v)
619#define SET_TTBR1_IRGNL(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNL, v)
620#define SET_TTBR1_PA(b, c, v) SET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_PA, v)
621
622
623/* V2PSR */
624#define SET_HIT(b, c, v) SET_CONTEXT_FIELD(b, c, V2PSR, HIT, v)
625#define SET_INDEX(b, c, v) SET_CONTEXT_FIELD(b, c, V2PSR, INDEX, v)
626
627
628/* Context Register getters */
629/* ACTLR */
630#define GET_CFERE(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, CFERE)
631#define GET_CFEIE(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, CFEIE)
632#define GET_PTSHCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, PTSHCFG)
633#define GET_RCOSH(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, RCOSH)
634#define GET_RCISH(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, RCISH)
635#define GET_RCNSH(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, RCNSH)
636#define GET_PRIVCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, PRIVCFG)
637#define GET_DNA(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, DNA)
638#define GET_DNLV2PA(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, DNLV2PA)
639#define GET_TLBMCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, TLBMCFG)
640#define GET_CFCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, CFCFG)
641#define GET_TIPCF(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, TIPCF)
642#define GET_V2PCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, V2PCFG)
643#define GET_HUME(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, HUME)
644#define GET_PTMTCFG(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, PTMTCFG)
645#define GET_PTMEMTYPE(b, c) GET_CONTEXT_FIELD(b, c, ACTLR, PTMEMTYPE)
646
647/* BFBCR */
648#define GET_BFBDFE(b, c) GET_CONTEXT_FIELD(b, c, BFBCR, BFBDFE)
649#define GET_BFBSFE(b, c) GET_CONTEXT_FIELD(b, c, BFBCR, BFBSFE)
650#define GET_SFVS(b, c) GET_CONTEXT_FIELD(b, c, BFBCR, SFVS)
651#define GET_FLVIC(b, c) GET_CONTEXT_FIELD(b, c, BFBCR, FLVIC)
652#define GET_SLVIC(b, c) GET_CONTEXT_FIELD(b, c, BFBCR, SLVIC)
653
654
655/* CONTEXTIDR */
656#define GET_CONTEXTIDR_ASID(b, c) \
657 GET_CONTEXT_FIELD(b, c, CONTEXTIDR, CONTEXTIDR_ASID)
658#define GET_CONTEXTIDR_PROCID(b, c) GET_CONTEXT_FIELD(b, c, CONTEXTIDR, PROCID)
659
660
661/* FSR */
662#define GET_TF(b, c) GET_CONTEXT_FIELD(b, c, FSR, TF)
663#define GET_AFF(b, c) GET_CONTEXT_FIELD(b, c, FSR, AFF)
664#define GET_APF(b, c) GET_CONTEXT_FIELD(b, c, FSR, APF)
665#define GET_TLBMF(b, c) GET_CONTEXT_FIELD(b, c, FSR, TLBMF)
666#define GET_HTWDEEF(b, c) GET_CONTEXT_FIELD(b, c, FSR, HTWDEEF)
667#define GET_HTWSEEF(b, c) GET_CONTEXT_FIELD(b, c, FSR, HTWSEEF)
668#define GET_MHF(b, c) GET_CONTEXT_FIELD(b, c, FSR, MHF)
669#define GET_SL(b, c) GET_CONTEXT_FIELD(b, c, FSR, SL)
670#define GET_SS(b, c) GET_CONTEXT_FIELD(b, c, FSR, SS)
671#define GET_MULTI(b, c) GET_CONTEXT_FIELD(b, c, FSR, MULTI)
672
673
674/* FSYNR0 */
675#define GET_AMID(b, c) GET_CONTEXT_FIELD(b, c, FSYNR0, AMID)
676#define GET_APID(b, c) GET_CONTEXT_FIELD(b, c, FSYNR0, APID)
677#define GET_ABID(b, c) GET_CONTEXT_FIELD(b, c, FSYNR0, ABID)
678#define GET_ATID(b, c) GET_CONTEXT_FIELD(b, c, FSYNR0, ATID)
679
680
681/* FSYNR1 */
682#define GET_AMEMTYPE(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, AMEMTYPE)
683#define GET_ASHARED(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, ASHARED)
684#define GET_AINNERSHARED(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, AINNERSHARED)
685#define GET_APRIV(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, APRIV)
686#define GET_APROTNS(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, APROTNS)
687#define GET_AINST(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, AINST)
688#define GET_AWRITE(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, AWRITE)
689#define GET_ABURST(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, ABURST)
690#define GET_ALEN(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, ALEN)
691#define GET_FSYNR1_ASIZE(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, FSYNR1_ASIZE)
692#define GET_ALOCK(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, ALOCK)
693#define GET_AFULL(b, c) GET_CONTEXT_FIELD(b, c, FSYNR1, AFULL)
694
695
696/* NMRR */
697#define GET_ICPC0(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC0)
698#define GET_ICPC1(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC1)
699#define GET_ICPC2(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC2)
700#define GET_ICPC3(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC3)
701#define GET_ICPC4(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC4)
702#define GET_ICPC5(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC5)
703#define GET_ICPC6(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC6)
704#define GET_ICPC7(b, c) GET_CONTEXT_FIELD(b, c, NMRR, ICPC7)
705#define GET_OCPC0(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC0)
706#define GET_OCPC1(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC1)
707#define GET_OCPC2(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC2)
708#define GET_OCPC3(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC3)
709#define GET_OCPC4(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC4)
710#define GET_OCPC5(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC5)
711#define GET_OCPC6(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC6)
712#define GET_OCPC7(b, c) GET_CONTEXT_FIELD(b, c, NMRR, OCPC7)
713#define NMRR_ICP(nmrr, n) (((nmrr) & (3 << ((n) * 2))) >> ((n) * 2))
714#define NMRR_OCP(nmrr, n) (((nmrr) & (3 << ((n) * 2 + 16))) >> \
715 ((n) * 2 + 16))
716
717/* PAR */
718#define GET_FAULT(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT)
719
720#define GET_FAULT_TF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_TF)
721#define GET_FAULT_AFF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_AFF)
722#define GET_FAULT_APF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_APF)
723#define GET_FAULT_TLBMF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_TLBMF)
724#define GET_FAULT_HTWDEEF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWDEEF)
725#define GET_FAULT_HTWSEEF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_HTWSEEF)
726#define GET_FAULT_MHF(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_MHF)
727#define GET_FAULT_SL(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_SL)
728#define GET_FAULT_SS(b, c) GET_CONTEXT_FIELD(b, c, PAR, FAULT_SS)
729
730#define GET_NOFAULT_SS(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_SS)
731#define GET_NOFAULT_MT(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_MT)
732#define GET_NOFAULT_SH(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_SH)
733#define GET_NOFAULT_NS(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_NS)
734#define GET_NOFAULT_NOS(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NOFAULT_NOS)
735#define GET_NPFAULT_PA(b, c) GET_CONTEXT_FIELD(b, c, PAR, PAR_NPFAULT_PA)
736
737
738/* PRRR */
739#define GET_MTC0(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC0)
740#define GET_MTC1(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC1)
741#define GET_MTC2(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC2)
742#define GET_MTC3(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC3)
743#define GET_MTC4(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC4)
744#define GET_MTC5(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC5)
745#define GET_MTC6(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC6)
746#define GET_MTC7(b, c) GET_CONTEXT_FIELD(b, c, PRRR, MTC7)
747#define GET_SHDSH0(b, c) GET_CONTEXT_FIELD(b, c, PRRR, SHDSH0)
748#define GET_SHDSH1(b, c) GET_CONTEXT_FIELD(b, c, PRRR, SHDSH1)
749#define GET_SHNMSH0(b, c) GET_CONTEXT_FIELD(b, c, PRRR, SHNMSH0)
750#define GET_SHNMSH1(b, c) GET_CONTEXT_FIELD(b, c, PRRR, SHNMSH1)
751#define GET_NOS0(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS0)
752#define GET_NOS1(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS1)
753#define GET_NOS2(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS2)
754#define GET_NOS3(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS3)
755#define GET_NOS4(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS4)
756#define GET_NOS5(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS5)
757#define GET_NOS6(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS6)
758#define GET_NOS7(b, c) GET_CONTEXT_FIELD(b, c, PRRR, NOS7)
759#define PRRR_NOS(prrr, n) ((prrr) & (1 << ((n) + 24)) ? 1 : 0)
760#define PRRR_MT(prrr, n) ((((prrr) & (3 << ((n) * 2))) >> ((n) * 2)))
761
762
763/* RESUME */
764#define GET_TNR(b, c) GET_CONTEXT_FIELD(b, c, RESUME, TNR)
765
766
767/* SCTLR */
768#define GET_M(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, M)
769#define GET_TRE(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, TRE)
770#define GET_AFE(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, AFE)
771#define GET_HAF(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, HAF)
772#define GET_BE(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, BE)
773#define GET_AFFD(b, c) GET_CONTEXT_FIELD(b, c, SCTLR, AFFD)
774
775
776/* TLBLKCR */
777#define GET_LKE(b, c) GET_CONTEXT_FIELD(b, c, TLBLKCR, LKE)
778#define GET_TLBLCKR_TLBIALLCFG(b, c) \
779 GET_CONTEXT_FIELD(b, c, TLBLKCR, TLBLCKR_TLBIALLCFG)
780#define GET_TLBIASIDCFG(b, c) GET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIASIDCFG)
781#define GET_TLBIVAACFG(b, c) GET_CONTEXT_FIELD(b, c, TLBLKCR, TLBIVAACFG)
782#define GET_FLOOR(b, c) GET_CONTEXT_FIELD(b, c, TLBLKCR, FLOOR)
783#define GET_VICTIM(b, c) GET_CONTEXT_FIELD(b, c, TLBLKCR, VICTIM)
784
785
786/* TTBCR */
787#define GET_N(b, c) GET_CONTEXT_FIELD(b, c, TTBCR, N)
788#define GET_PD0(b, c) GET_CONTEXT_FIELD(b, c, TTBCR, PD0)
789#define GET_PD1(b, c) GET_CONTEXT_FIELD(b, c, TTBCR, PD1)
790
791
792/* TTBR0 */
793#define GET_TTBR0_IRGNH(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNH)
794#define GET_TTBR0_SH(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_SH)
795#define GET_TTBR0_ORGN(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_ORGN)
796#define GET_TTBR0_NOS(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_NOS)
797#define GET_TTBR0_IRGNL(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_IRGNL)
798#define GET_TTBR0_PA(b, c) GET_CONTEXT_FIELD(b, c, TTBR0, TTBR0_PA)
799
800
801/* TTBR1 */
802#define GET_TTBR1_IRGNH(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNH)
803#define GET_TTBR1_SH(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_SH)
804#define GET_TTBR1_ORGN(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_ORGN)
805#define GET_TTBR1_NOS(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_NOS)
806#define GET_TTBR1_IRGNL(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_IRGNL)
807#define GET_TTBR1_PA(b, c) GET_CONTEXT_FIELD(b, c, TTBR1, TTBR1_PA)
808
809
810/* V2PSR */
811#define GET_HIT(b, c) GET_CONTEXT_FIELD(b, c, V2PSR, HIT)
812#define GET_INDEX(b, c) GET_CONTEXT_FIELD(b, c, V2PSR, INDEX)
813
814
815/* Global Registers */
816#define M2VCBR_N (0xFF000)
817#define CBACR_N (0xFF800)
818#define TLBRSW (0xFFE00)
819#define TLBTR0 (0xFFE80)
820#define TLBTR1 (0xFFE84)
821#define TLBTR2 (0xFFE88)
822#define TESTBUSCR (0xFFE8C)
823#define GLOBAL_TLBIALL (0xFFF00)
824#define TLBIVMID (0xFFF04)
825#define CR (0xFFF80)
826#define EAR (0xFFF84)
827#define ESR (0xFFF88)
828#define ESRRESTORE (0xFFF8C)
829#define ESYNR0 (0xFFF90)
830#define ESYNR1 (0xFFF94)
831#define REV (0xFFFF4)
832#define IDR (0xFFFF8)
833#define RPU_ACR (0xFFFFC)
834
835
836/* Context Bank Registers */
837#define SCTLR (0x000)
838#define ACTLR (0x004)
839#define CONTEXTIDR (0x008)
840#define TTBR0 (0x010)
841#define TTBR1 (0x014)
842#define TTBCR (0x018)
843#define PAR (0x01C)
844#define FSR (0x020)
845#define FSRRESTORE (0x024)
846#define FAR (0x028)
847#define FSYNR0 (0x02C)
848#define FSYNR1 (0x030)
849#define PRRR (0x034)
850#define NMRR (0x038)
851#define TLBLCKR (0x03C)
852#define V2PSR (0x040)
853#define TLBFLPTER (0x044)
854#define TLBSLPTER (0x048)
855#define BFBCR (0x04C)
856#define CTX_TLBIALL (0x800)
857#define TLBIASID (0x804)
858#define TLBIVA (0x808)
859#define TLBIVAA (0x80C)
860#define V2PPR (0x810)
861#define V2PPW (0x814)
862#define V2PUR (0x818)
863#define V2PUW (0x81C)
864#define RESUME (0x820)
865
866
867/* Global Register Fields */
868/* CBACRn */
869#define RWVMID (RWVMID_MASK << RWVMID_SHIFT)
870#define RWE (RWE_MASK << RWE_SHIFT)
871#define RWGE (RWGE_MASK << RWGE_SHIFT)
872#define CBVMID (CBVMID_MASK << CBVMID_SHIFT)
873#define IRPTNDX (IRPTNDX_MASK << IRPTNDX_SHIFT)
874
875
876/* CR */
877#define RPUE (RPUE_MASK << RPUE_SHIFT)
878#define RPUERE (RPUERE_MASK << RPUERE_SHIFT)
879#define RPUEIE (RPUEIE_MASK << RPUEIE_SHIFT)
880#define DCDEE (DCDEE_MASK << DCDEE_SHIFT)
881#define CLIENTPD (CLIENTPD_MASK << CLIENTPD_SHIFT)
882#define STALLD (STALLD_MASK << STALLD_SHIFT)
883#define TLBLKCRWE (TLBLKCRWE_MASK << TLBLKCRWE_SHIFT)
884#define CR_TLBIALLCFG (CR_TLBIALLCFG_MASK << CR_TLBIALLCFG_SHIFT)
885#define TLBIVMIDCFG (TLBIVMIDCFG_MASK << TLBIVMIDCFG_SHIFT)
886#define CR_HUME (CR_HUME_MASK << CR_HUME_SHIFT)
887
888
889/* ESR */
890#define CFG (CFG_MASK << CFG_SHIFT)
891#define BYPASS (BYPASS_MASK << BYPASS_SHIFT)
892#define ESR_MULTI (ESR_MULTI_MASK << ESR_MULTI_SHIFT)
893
894
895/* ESYNR0 */
896#define ESYNR0_AMID (ESYNR0_AMID_MASK << ESYNR0_AMID_SHIFT)
897#define ESYNR0_APID (ESYNR0_APID_MASK << ESYNR0_APID_SHIFT)
898#define ESYNR0_ABID (ESYNR0_ABID_MASK << ESYNR0_ABID_SHIFT)
899#define ESYNR0_AVMID (ESYNR0_AVMID_MASK << ESYNR0_AVMID_SHIFT)
900#define ESYNR0_ATID (ESYNR0_ATID_MASK << ESYNR0_ATID_SHIFT)
901
902
903/* ESYNR1 */
904#define ESYNR1_AMEMTYPE (ESYNR1_AMEMTYPE_MASK << ESYNR1_AMEMTYPE_SHIFT)
905#define ESYNR1_ASHARED (ESYNR1_ASHARED_MASK << ESYNR1_ASHARED_SHIFT)
906#define ESYNR1_AINNERSHARED (ESYNR1_AINNERSHARED_MASK<< \
907 ESYNR1_AINNERSHARED_SHIFT)
908#define ESYNR1_APRIV (ESYNR1_APRIV_MASK << ESYNR1_APRIV_SHIFT)
909#define ESYNR1_APROTNS (ESYNR1_APROTNS_MASK << ESYNR1_APROTNS_SHIFT)
910#define ESYNR1_AINST (ESYNR1_AINST_MASK << ESYNR1_AINST_SHIFT)
911#define ESYNR1_AWRITE (ESYNR1_AWRITE_MASK << ESYNR1_AWRITE_SHIFT)
912#define ESYNR1_ABURST (ESYNR1_ABURST_MASK << ESYNR1_ABURST_SHIFT)
913#define ESYNR1_ALEN (ESYNR1_ALEN_MASK << ESYNR1_ALEN_SHIFT)
914#define ESYNR1_ASIZE (ESYNR1_ASIZE_MASK << ESYNR1_ASIZE_SHIFT)
915#define ESYNR1_ALOCK (ESYNR1_ALOCK_MASK << ESYNR1_ALOCK_SHIFT)
916#define ESYNR1_AOOO (ESYNR1_AOOO_MASK << ESYNR1_AOOO_SHIFT)
917#define ESYNR1_AFULL (ESYNR1_AFULL_MASK << ESYNR1_AFULL_SHIFT)
918#define ESYNR1_AC (ESYNR1_AC_MASK << ESYNR1_AC_SHIFT)
919#define ESYNR1_DCD (ESYNR1_DCD_MASK << ESYNR1_DCD_SHIFT)
920
921
922/* IDR */
923#define NM2VCBMT (NM2VCBMT_MASK << NM2VCBMT_SHIFT)
924#define HTW (HTW_MASK << HTW_SHIFT)
925#define HUM (HUM_MASK << HUM_SHIFT)
926#define TLBSIZE (TLBSIZE_MASK << TLBSIZE_SHIFT)
927#define NCB (NCB_MASK << NCB_SHIFT)
928#define NIRPT (NIRPT_MASK << NIRPT_SHIFT)
929
930
931/* M2VCBRn */
932#define VMID (VMID_MASK << VMID_SHIFT)
933#define CBNDX (CBNDX_MASK << CBNDX_SHIFT)
934#define BYPASSD (BYPASSD_MASK << BYPASSD_SHIFT)
935#define BPRCOSH (BPRCOSH_MASK << BPRCOSH_SHIFT)
936#define BPRCISH (BPRCISH_MASK << BPRCISH_SHIFT)
937#define BPRCNSH (BPRCNSH_MASK << BPRCNSH_SHIFT)
938#define BPSHCFG (BPSHCFG_MASK << BPSHCFG_SHIFT)
939#define NSCFG (NSCFG_MASK << NSCFG_SHIFT)
940#define BPMTCFG (BPMTCFG_MASK << BPMTCFG_SHIFT)
941#define BPMEMTYPE (BPMEMTYPE_MASK << BPMEMTYPE_SHIFT)
942
943
944/* REV */
945#define IDR_MINOR (MINOR_MASK << MINOR_SHIFT)
946#define IDR_MAJOR (MAJOR_MASK << MAJOR_SHIFT)
947
948
949/* TESTBUSCR */
950#define TBE (TBE_MASK << TBE_SHIFT)
951#define SPDMBE (SPDMBE_MASK << SPDMBE_SHIFT)
952#define WGSEL (WGSEL_MASK << WGSEL_SHIFT)
953#define TBLSEL (TBLSEL_MASK << TBLSEL_SHIFT)
954#define TBHSEL (TBHSEL_MASK << TBHSEL_SHIFT)
955#define SPDM0SEL (SPDM0SEL_MASK << SPDM0SEL_SHIFT)
956#define SPDM1SEL (SPDM1SEL_MASK << SPDM1SEL_SHIFT)
957#define SPDM2SEL (SPDM2SEL_MASK << SPDM2SEL_SHIFT)
958#define SPDM3SEL (SPDM3SEL_MASK << SPDM3SEL_SHIFT)
959
960
961/* TLBIVMID */
962#define TLBIVMID_VMID (TLBIVMID_VMID_MASK << TLBIVMID_VMID_SHIFT)
963
964
965/* TLBRSW */
966#define TLBRSW_INDEX (TLBRSW_INDEX_MASK << TLBRSW_INDEX_SHIFT)
967#define TLBBFBS (TLBBFBS_MASK << TLBBFBS_SHIFT)
968
969
970/* TLBTR0 */
971#define PR (PR_MASK << PR_SHIFT)
972#define PW (PW_MASK << PW_SHIFT)
973#define UR (UR_MASK << UR_SHIFT)
974#define UW (UW_MASK << UW_SHIFT)
975#define XN (XN_MASK << XN_SHIFT)
976#define NSDESC (NSDESC_MASK << NSDESC_SHIFT)
977#define ISH (ISH_MASK << ISH_SHIFT)
978#define SH (SH_MASK << SH_SHIFT)
979#define MT (MT_MASK << MT_SHIFT)
980#define DPSIZR (DPSIZR_MASK << DPSIZR_SHIFT)
981#define DPSIZC (DPSIZC_MASK << DPSIZC_SHIFT)
982
983
984/* TLBTR1 */
985#define TLBTR1_VMID (TLBTR1_VMID_MASK << TLBTR1_VMID_SHIFT)
986#define TLBTR1_PA (TLBTR1_PA_MASK << TLBTR1_PA_SHIFT)
987
988
989/* TLBTR2 */
990#define TLBTR2_ASID (TLBTR2_ASID_MASK << TLBTR2_ASID_SHIFT)
991#define TLBTR2_V (TLBTR2_V_MASK << TLBTR2_V_SHIFT)
992#define TLBTR2_NSTID (TLBTR2_NSTID_MASK << TLBTR2_NSTID_SHIFT)
993#define TLBTR2_NV (TLBTR2_NV_MASK << TLBTR2_NV_SHIFT)
994#define TLBTR2_VA (TLBTR2_VA_MASK << TLBTR2_VA_SHIFT)
995
996
997/* Context Register Fields */
998/* ACTLR */
999#define CFERE (CFERE_MASK << CFERE_SHIFT)
1000#define CFEIE (CFEIE_MASK << CFEIE_SHIFT)
1001#define PTSHCFG (PTSHCFG_MASK << PTSHCFG_SHIFT)
1002#define RCOSH (RCOSH_MASK << RCOSH_SHIFT)
1003#define RCISH (RCISH_MASK << RCISH_SHIFT)
1004#define RCNSH (RCNSH_MASK << RCNSH_SHIFT)
1005#define PRIVCFG (PRIVCFG_MASK << PRIVCFG_SHIFT)
1006#define DNA (DNA_MASK << DNA_SHIFT)
1007#define DNLV2PA (DNLV2PA_MASK << DNLV2PA_SHIFT)
1008#define TLBMCFG (TLBMCFG_MASK << TLBMCFG_SHIFT)
1009#define CFCFG (CFCFG_MASK << CFCFG_SHIFT)
1010#define TIPCF (TIPCF_MASK << TIPCF_SHIFT)
1011#define V2PCFG (V2PCFG_MASK << V2PCFG_SHIFT)
1012#define HUME (HUME_MASK << HUME_SHIFT)
1013#define PTMTCFG (PTMTCFG_MASK << PTMTCFG_SHIFT)
1014#define PTMEMTYPE (PTMEMTYPE_MASK << PTMEMTYPE_SHIFT)
1015
1016
1017/* BFBCR */
1018#define BFBDFE (BFBDFE_MASK << BFBDFE_SHIFT)
1019#define BFBSFE (BFBSFE_MASK << BFBSFE_SHIFT)
1020#define SFVS (SFVS_MASK << SFVS_SHIFT)
1021#define FLVIC (FLVIC_MASK << FLVIC_SHIFT)
1022#define SLVIC (SLVIC_MASK << SLVIC_SHIFT)
1023
1024
1025/* CONTEXTIDR */
1026#define CONTEXTIDR_ASID (CONTEXTIDR_ASID_MASK << CONTEXTIDR_ASID_SHIFT)
1027#define PROCID (PROCID_MASK << PROCID_SHIFT)
1028
1029
1030/* FSR */
1031#define TF (TF_MASK << TF_SHIFT)
1032#define AFF (AFF_MASK << AFF_SHIFT)
1033#define APF (APF_MASK << APF_SHIFT)
1034#define TLBMF (TLBMF_MASK << TLBMF_SHIFT)
1035#define HTWDEEF (HTWDEEF_MASK << HTWDEEF_SHIFT)
1036#define HTWSEEF (HTWSEEF_MASK << HTWSEEF_SHIFT)
1037#define MHF (MHF_MASK << MHF_SHIFT)
1038#define SL (SL_MASK << SL_SHIFT)
1039#define SS (SS_MASK << SS_SHIFT)
1040#define MULTI (MULTI_MASK << MULTI_SHIFT)
1041
1042
1043/* FSYNR0 */
1044#define AMID (AMID_MASK << AMID_SHIFT)
1045#define APID (APID_MASK << APID_SHIFT)
1046#define ABID (ABID_MASK << ABID_SHIFT)
1047#define ATID (ATID_MASK << ATID_SHIFT)
1048
1049
1050/* FSYNR1 */
1051#define AMEMTYPE (AMEMTYPE_MASK << AMEMTYPE_SHIFT)
1052#define ASHARED (ASHARED_MASK << ASHARED_SHIFT)
1053#define AINNERSHARED (AINNERSHARED_MASK << AINNERSHARED_SHIFT)
1054#define APRIV (APRIV_MASK << APRIV_SHIFT)
1055#define APROTNS (APROTNS_MASK << APROTNS_SHIFT)
1056#define AINST (AINST_MASK << AINST_SHIFT)
1057#define AWRITE (AWRITE_MASK << AWRITE_SHIFT)
1058#define ABURST (ABURST_MASK << ABURST_SHIFT)
1059#define ALEN (ALEN_MASK << ALEN_SHIFT)
1060#define FSYNR1_ASIZE (FSYNR1_ASIZE_MASK << FSYNR1_ASIZE_SHIFT)
1061#define ALOCK (ALOCK_MASK << ALOCK_SHIFT)
1062#define AFULL (AFULL_MASK << AFULL_SHIFT)
1063
1064
1065/* NMRR */
1066#define ICPC0 (ICPC0_MASK << ICPC0_SHIFT)
1067#define ICPC1 (ICPC1_MASK << ICPC1_SHIFT)
1068#define ICPC2 (ICPC2_MASK << ICPC2_SHIFT)
1069#define ICPC3 (ICPC3_MASK << ICPC3_SHIFT)
1070#define ICPC4 (ICPC4_MASK << ICPC4_SHIFT)
1071#define ICPC5 (ICPC5_MASK << ICPC5_SHIFT)
1072#define ICPC6 (ICPC6_MASK << ICPC6_SHIFT)
1073#define ICPC7 (ICPC7_MASK << ICPC7_SHIFT)
1074#define OCPC0 (OCPC0_MASK << OCPC0_SHIFT)
1075#define OCPC1 (OCPC1_MASK << OCPC1_SHIFT)
1076#define OCPC2 (OCPC2_MASK << OCPC2_SHIFT)
1077#define OCPC3 (OCPC3_MASK << OCPC3_SHIFT)
1078#define OCPC4 (OCPC4_MASK << OCPC4_SHIFT)
1079#define OCPC5 (OCPC5_MASK << OCPC5_SHIFT)
1080#define OCPC6 (OCPC6_MASK << OCPC6_SHIFT)
1081#define OCPC7 (OCPC7_MASK << OCPC7_SHIFT)
1082
1083
1084/* PAR */
1085#define FAULT (FAULT_MASK << FAULT_SHIFT)
1086/* If a fault is present, these are the
1087same as the fault fields in the FAR */
1088#define FAULT_TF (FAULT_TF_MASK << FAULT_TF_SHIFT)
1089#define FAULT_AFF (FAULT_AFF_MASK << FAULT_AFF_SHIFT)
1090#define FAULT_APF (FAULT_APF_MASK << FAULT_APF_SHIFT)
1091#define FAULT_TLBMF (FAULT_TLBMF_MASK << FAULT_TLBMF_SHIFT)
1092#define FAULT_HTWDEEF (FAULT_HTWDEEF_MASK << FAULT_HTWDEEF_SHIFT)
1093#define FAULT_HTWSEEF (FAULT_HTWSEEF_MASK << FAULT_HTWSEEF_SHIFT)
1094#define FAULT_MHF (FAULT_MHF_MASK << FAULT_MHF_SHIFT)
1095#define FAULT_SL (FAULT_SL_MASK << FAULT_SL_SHIFT)
1096#define FAULT_SS (FAULT_SS_MASK << FAULT_SS_SHIFT)
1097
1098/* If NO fault is present, the following fields are in effect */
1099/* (FAULT remains as before) */
1100#define PAR_NOFAULT_SS (PAR_NOFAULT_SS_MASK << PAR_NOFAULT_SS_SHIFT)
1101#define PAR_NOFAULT_MT (PAR_NOFAULT_MT_MASK << PAR_NOFAULT_MT_SHIFT)
1102#define PAR_NOFAULT_SH (PAR_NOFAULT_SH_MASK << PAR_NOFAULT_SH_SHIFT)
1103#define PAR_NOFAULT_NS (PAR_NOFAULT_NS_MASK << PAR_NOFAULT_NS_SHIFT)
1104#define PAR_NOFAULT_NOS (PAR_NOFAULT_NOS_MASK << PAR_NOFAULT_NOS_SHIFT)
1105#define PAR_NPFAULT_PA (PAR_NPFAULT_PA_MASK << PAR_NPFAULT_PA_SHIFT)
1106
1107
1108/* PRRR */
1109#define MTC0 (MTC0_MASK << MTC0_SHIFT)
1110#define MTC1 (MTC1_MASK << MTC1_SHIFT)
1111#define MTC2 (MTC2_MASK << MTC2_SHIFT)
1112#define MTC3 (MTC3_MASK << MTC3_SHIFT)
1113#define MTC4 (MTC4_MASK << MTC4_SHIFT)
1114#define MTC5 (MTC5_MASK << MTC5_SHIFT)
1115#define MTC6 (MTC6_MASK << MTC6_SHIFT)
1116#define MTC7 (MTC7_MASK << MTC7_SHIFT)
1117#define SHDSH0 (SHDSH0_MASK << SHDSH0_SHIFT)
1118#define SHDSH1 (SHDSH1_MASK << SHDSH1_SHIFT)
1119#define SHNMSH0 (SHNMSH0_MASK << SHNMSH0_SHIFT)
1120#define SHNMSH1 (SHNMSH1_MASK << SHNMSH1_SHIFT)
1121#define NOS0 (NOS0_MASK << NOS0_SHIFT)
1122#define NOS1 (NOS1_MASK << NOS1_SHIFT)
1123#define NOS2 (NOS2_MASK << NOS2_SHIFT)
1124#define NOS3 (NOS3_MASK << NOS3_SHIFT)
1125#define NOS4 (NOS4_MASK << NOS4_SHIFT)
1126#define NOS5 (NOS5_MASK << NOS5_SHIFT)
1127#define NOS6 (NOS6_MASK << NOS6_SHIFT)
1128#define NOS7 (NOS7_MASK << NOS7_SHIFT)
1129
1130
1131/* RESUME */
1132#define TNR (TNR_MASK << TNR_SHIFT)
1133
1134
1135/* SCTLR */
1136#define M (M_MASK << M_SHIFT)
1137#define TRE (TRE_MASK << TRE_SHIFT)
1138#define AFE (AFE_MASK << AFE_SHIFT)
1139#define HAF (HAF_MASK << HAF_SHIFT)
1140#define BE (BE_MASK << BE_SHIFT)
1141#define AFFD (AFFD_MASK << AFFD_SHIFT)
1142
1143
1144/* TLBIASID */
1145#define TLBIASID_ASID (TLBIASID_ASID_MASK << TLBIASID_ASID_SHIFT)
1146
1147
1148/* TLBIVA */
1149#define TLBIVA_ASID (TLBIVA_ASID_MASK << TLBIVA_ASID_SHIFT)
1150#define TLBIVA_VA (TLBIVA_VA_MASK << TLBIVA_VA_SHIFT)
1151
1152
1153/* TLBIVAA */
1154#define TLBIVAA_VA (TLBIVAA_VA_MASK << TLBIVAA_VA_SHIFT)
1155
1156
1157/* TLBLCKR */
1158#define LKE (LKE_MASK << LKE_SHIFT)
1159#define TLBLCKR_TLBIALLCFG (TLBLCKR_TLBIALLCFG_MASK<<TLBLCKR_TLBIALLCFG_SHIFT)
1160#define TLBIASIDCFG (TLBIASIDCFG_MASK << TLBIASIDCFG_SHIFT)
1161#define TLBIVAACFG (TLBIVAACFG_MASK << TLBIVAACFG_SHIFT)
1162#define FLOOR (FLOOR_MASK << FLOOR_SHIFT)
1163#define VICTIM (VICTIM_MASK << VICTIM_SHIFT)
1164
1165
1166/* TTBCR */
1167#define N (N_MASK << N_SHIFT)
1168#define PD0 (PD0_MASK << PD0_SHIFT)
1169#define PD1 (PD1_MASK << PD1_SHIFT)
1170
1171
1172/* TTBR0 */
1173#define TTBR0_IRGNH (TTBR0_IRGNH_MASK << TTBR0_IRGNH_SHIFT)
1174#define TTBR0_SH (TTBR0_SH_MASK << TTBR0_SH_SHIFT)
1175#define TTBR0_ORGN (TTBR0_ORGN_MASK << TTBR0_ORGN_SHIFT)
1176#define TTBR0_NOS (TTBR0_NOS_MASK << TTBR0_NOS_SHIFT)
1177#define TTBR0_IRGNL (TTBR0_IRGNL_MASK << TTBR0_IRGNL_SHIFT)
1178#define TTBR0_PA (TTBR0_PA_MASK << TTBR0_PA_SHIFT)
1179
1180
1181/* TTBR1 */
1182#define TTBR1_IRGNH (TTBR1_IRGNH_MASK << TTBR1_IRGNH_SHIFT)
1183#define TTBR1_SH (TTBR1_SH_MASK << TTBR1_SH_SHIFT)
1184#define TTBR1_ORGN (TTBR1_ORGN_MASK << TTBR1_ORGN_SHIFT)
1185#define TTBR1_NOS (TTBR1_NOS_MASK << TTBR1_NOS_SHIFT)
1186#define TTBR1_IRGNL (TTBR1_IRGNL_MASK << TTBR1_IRGNL_SHIFT)
1187#define TTBR1_PA (TTBR1_PA_MASK << TTBR1_PA_SHIFT)
1188
1189
1190/* V2PSR */
1191#define HIT (HIT_MASK << HIT_SHIFT)
1192#define INDEX (INDEX_MASK << INDEX_SHIFT)
1193
1194
1195/* V2Pxx */
1196#define V2Pxx_INDEX (V2Pxx_INDEX_MASK << V2Pxx_INDEX_SHIFT)
1197#define V2Pxx_VA (V2Pxx_VA_MASK << V2Pxx_VA_SHIFT)
1198
1199
1200/* Global Register Masks */
1201/* CBACRn */
1202#define RWVMID_MASK 0x1F
1203#define RWE_MASK 0x01
1204#define RWGE_MASK 0x01
1205#define CBVMID_MASK 0x1F
1206#define IRPTNDX_MASK 0xFF
1207
1208
1209/* CR */
1210#define RPUE_MASK 0x01
1211#define RPUERE_MASK 0x01
1212#define RPUEIE_MASK 0x01
1213#define DCDEE_MASK 0x01
1214#define CLIENTPD_MASK 0x01
1215#define STALLD_MASK 0x01
1216#define TLBLKCRWE_MASK 0x01
1217#define CR_TLBIALLCFG_MASK 0x01
1218#define TLBIVMIDCFG_MASK 0x01
1219#define CR_HUME_MASK 0x01
1220
1221
1222/* ESR */
1223#define CFG_MASK 0x01
1224#define BYPASS_MASK 0x01
1225#define ESR_MULTI_MASK 0x01
1226
1227
1228/* ESYNR0 */
1229#define ESYNR0_AMID_MASK 0xFF
1230#define ESYNR0_APID_MASK 0x1F
1231#define ESYNR0_ABID_MASK 0x07
1232#define ESYNR0_AVMID_MASK 0x1F
1233#define ESYNR0_ATID_MASK 0xFF
1234
1235
1236/* ESYNR1 */
1237#define ESYNR1_AMEMTYPE_MASK 0x07
1238#define ESYNR1_ASHARED_MASK 0x01
1239#define ESYNR1_AINNERSHARED_MASK 0x01
1240#define ESYNR1_APRIV_MASK 0x01
1241#define ESYNR1_APROTNS_MASK 0x01
1242#define ESYNR1_AINST_MASK 0x01
1243#define ESYNR1_AWRITE_MASK 0x01
1244#define ESYNR1_ABURST_MASK 0x01
1245#define ESYNR1_ALEN_MASK 0x0F
1246#define ESYNR1_ASIZE_MASK 0x01
1247#define ESYNR1_ALOCK_MASK 0x03
1248#define ESYNR1_AOOO_MASK 0x01
1249#define ESYNR1_AFULL_MASK 0x01
1250#define ESYNR1_AC_MASK 0x01
1251#define ESYNR1_DCD_MASK 0x01
1252
1253
1254/* IDR */
1255#define NM2VCBMT_MASK 0x1FF
1256#define HTW_MASK 0x01
1257#define HUM_MASK 0x01
1258#define TLBSIZE_MASK 0x0F
1259#define NCB_MASK 0xFF
1260#define NIRPT_MASK 0xFF
1261
1262
1263/* M2VCBRn */
1264#define VMID_MASK 0x1F
1265#define CBNDX_MASK 0xFF
1266#define BYPASSD_MASK 0x01
1267#define BPRCOSH_MASK 0x01
1268#define BPRCISH_MASK 0x01
1269#define BPRCNSH_MASK 0x01
1270#define BPSHCFG_MASK 0x03
1271#define NSCFG_MASK 0x03
1272#define BPMTCFG_MASK 0x01
1273#define BPMEMTYPE_MASK 0x07
1274
1275
1276/* REV */
1277#define MINOR_MASK 0x0F
1278#define MAJOR_MASK 0x0F
1279
1280
1281/* TESTBUSCR */
1282#define TBE_MASK 0x01
1283#define SPDMBE_MASK 0x01
1284#define WGSEL_MASK 0x03
1285#define TBLSEL_MASK 0x03
1286#define TBHSEL_MASK 0x03
1287#define SPDM0SEL_MASK 0x0F
1288#define SPDM1SEL_MASK 0x0F
1289#define SPDM2SEL_MASK 0x0F
1290#define SPDM3SEL_MASK 0x0F
1291
1292
1293/* TLBIMID */
1294#define TLBIVMID_VMID_MASK 0x1F
1295
1296
1297/* TLBRSW */
1298#define TLBRSW_INDEX_MASK 0xFF
1299#define TLBBFBS_MASK 0x03
1300
1301
1302/* TLBTR0 */
1303#define PR_MASK 0x01
1304#define PW_MASK 0x01
1305#define UR_MASK 0x01
1306#define UW_MASK 0x01
1307#define XN_MASK 0x01
1308#define NSDESC_MASK 0x01
1309#define ISH_MASK 0x01
1310#define SH_MASK 0x01
1311#define MT_MASK 0x07
1312#define DPSIZR_MASK 0x07
1313#define DPSIZC_MASK 0x07
1314
1315
1316/* TLBTR1 */
1317#define TLBTR1_VMID_MASK 0x1F
1318#define TLBTR1_PA_MASK 0x000FFFFF
1319
1320
1321/* TLBTR2 */
1322#define TLBTR2_ASID_MASK 0xFF
1323#define TLBTR2_V_MASK 0x01
1324#define TLBTR2_NSTID_MASK 0x01
1325#define TLBTR2_NV_MASK 0x01
1326#define TLBTR2_VA_MASK 0x000FFFFF
1327
1328
1329/* Global Register Shifts */
1330/* CBACRn */
1331#define RWVMID_SHIFT 0
1332#define RWE_SHIFT 8
1333#define RWGE_SHIFT 9
1334#define CBVMID_SHIFT 16
1335#define IRPTNDX_SHIFT 24
1336
1337
1338/* CR */
1339#define RPUE_SHIFT 0
1340#define RPUERE_SHIFT 1
1341#define RPUEIE_SHIFT 2
1342#define DCDEE_SHIFT 3
1343#define CLIENTPD_SHIFT 4
1344#define STALLD_SHIFT 5
1345#define TLBLKCRWE_SHIFT 6
1346#define CR_TLBIALLCFG_SHIFT 7
1347#define TLBIVMIDCFG_SHIFT 8
1348#define CR_HUME_SHIFT 9
1349
1350
1351/* ESR */
1352#define CFG_SHIFT 0
1353#define BYPASS_SHIFT 1
1354#define ESR_MULTI_SHIFT 31
1355
1356
1357/* ESYNR0 */
1358#define ESYNR0_AMID_SHIFT 0
1359#define ESYNR0_APID_SHIFT 8
1360#define ESYNR0_ABID_SHIFT 13
1361#define ESYNR0_AVMID_SHIFT 16
1362#define ESYNR0_ATID_SHIFT 24
1363
1364
1365/* ESYNR1 */
1366#define ESYNR1_AMEMTYPE_SHIFT 0
1367#define ESYNR1_ASHARED_SHIFT 3
1368#define ESYNR1_AINNERSHARED_SHIFT 4
1369#define ESYNR1_APRIV_SHIFT 5
1370#define ESYNR1_APROTNS_SHIFT 6
1371#define ESYNR1_AINST_SHIFT 7
1372#define ESYNR1_AWRITE_SHIFT 8
1373#define ESYNR1_ABURST_SHIFT 10
1374#define ESYNR1_ALEN_SHIFT 12
1375#define ESYNR1_ASIZE_SHIFT 16
1376#define ESYNR1_ALOCK_SHIFT 20
1377#define ESYNR1_AOOO_SHIFT 22
1378#define ESYNR1_AFULL_SHIFT 24
1379#define ESYNR1_AC_SHIFT 30
1380#define ESYNR1_DCD_SHIFT 31
1381
1382
1383/* IDR */
1384#define NM2VCBMT_SHIFT 0
1385#define HTW_SHIFT 9
1386#define HUM_SHIFT 10
1387#define TLBSIZE_SHIFT 12
1388#define NCB_SHIFT 16
1389#define NIRPT_SHIFT 24
1390
1391
1392/* M2VCBRn */
1393#define VMID_SHIFT 0
1394#define CBNDX_SHIFT 8
1395#define BYPASSD_SHIFT 16
1396#define BPRCOSH_SHIFT 17
1397#define BPRCISH_SHIFT 18
1398#define BPRCNSH_SHIFT 19
1399#define BPSHCFG_SHIFT 20
1400#define NSCFG_SHIFT 22
1401#define BPMTCFG_SHIFT 24
1402#define BPMEMTYPE_SHIFT 25
1403
1404
1405/* REV */
1406#define MINOR_SHIFT 0
1407#define MAJOR_SHIFT 4
1408
1409
1410/* TESTBUSCR */
1411#define TBE_SHIFT 0
1412#define SPDMBE_SHIFT 1
1413#define WGSEL_SHIFT 8
1414#define TBLSEL_SHIFT 12
1415#define TBHSEL_SHIFT 14
1416#define SPDM0SEL_SHIFT 16
1417#define SPDM1SEL_SHIFT 20
1418#define SPDM2SEL_SHIFT 24
1419#define SPDM3SEL_SHIFT 28
1420
1421
1422/* TLBIMID */
1423#define TLBIVMID_VMID_SHIFT 0
1424
1425
1426/* TLBRSW */
1427#define TLBRSW_INDEX_SHIFT 0
1428#define TLBBFBS_SHIFT 8
1429
1430
1431/* TLBTR0 */
1432#define PR_SHIFT 0
1433#define PW_SHIFT 1
1434#define UR_SHIFT 2
1435#define UW_SHIFT 3
1436#define XN_SHIFT 4
1437#define NSDESC_SHIFT 6
1438#define ISH_SHIFT 7
1439#define SH_SHIFT 8
1440#define MT_SHIFT 9
1441#define DPSIZR_SHIFT 16
1442#define DPSIZC_SHIFT 20
1443
1444
1445/* TLBTR1 */
1446#define TLBTR1_VMID_SHIFT 0
1447#define TLBTR1_PA_SHIFT 12
1448
1449
1450/* TLBTR2 */
1451#define TLBTR2_ASID_SHIFT 0
1452#define TLBTR2_V_SHIFT 8
1453#define TLBTR2_NSTID_SHIFT 9
1454#define TLBTR2_NV_SHIFT 10
1455#define TLBTR2_VA_SHIFT 12
1456
1457
1458/* Context Register Masks */
1459/* ACTLR */
1460#define CFERE_MASK 0x01
1461#define CFEIE_MASK 0x01
1462#define PTSHCFG_MASK 0x03
1463#define RCOSH_MASK 0x01
1464#define RCISH_MASK 0x01
1465#define RCNSH_MASK 0x01
1466#define PRIVCFG_MASK 0x03
1467#define DNA_MASK 0x01
1468#define DNLV2PA_MASK 0x01
1469#define TLBMCFG_MASK 0x03
1470#define CFCFG_MASK 0x01
1471#define TIPCF_MASK 0x01
1472#define V2PCFG_MASK 0x03
1473#define HUME_MASK 0x01
1474#define PTMTCFG_MASK 0x01
1475#define PTMEMTYPE_MASK 0x07
1476
1477
1478/* BFBCR */
1479#define BFBDFE_MASK 0x01
1480#define BFBSFE_MASK 0x01
1481#define SFVS_MASK 0x01
1482#define FLVIC_MASK 0x0F
1483#define SLVIC_MASK 0x0F
1484
1485
1486/* CONTEXTIDR */
1487#define CONTEXTIDR_ASID_MASK 0xFF
1488#define PROCID_MASK 0x00FFFFFF
1489
1490
1491/* FSR */
1492#define TF_MASK 0x01
1493#define AFF_MASK 0x01
1494#define APF_MASK 0x01
1495#define TLBMF_MASK 0x01
1496#define HTWDEEF_MASK 0x01
1497#define HTWSEEF_MASK 0x01
1498#define MHF_MASK 0x01
1499#define SL_MASK 0x01
1500#define SS_MASK 0x01
1501#define MULTI_MASK 0x01
1502
1503
1504/* FSYNR0 */
1505#define AMID_MASK 0xFF
1506#define APID_MASK 0x1F
1507#define ABID_MASK 0x07
1508#define ATID_MASK 0xFF
1509
1510
1511/* FSYNR1 */
1512#define AMEMTYPE_MASK 0x07
1513#define ASHARED_MASK 0x01
1514#define AINNERSHARED_MASK 0x01
1515#define APRIV_MASK 0x01
1516#define APROTNS_MASK 0x01
1517#define AINST_MASK 0x01
1518#define AWRITE_MASK 0x01
1519#define ABURST_MASK 0x01
1520#define ALEN_MASK 0x0F
1521#define FSYNR1_ASIZE_MASK 0x07
1522#define ALOCK_MASK 0x03
1523#define AFULL_MASK 0x01
1524
1525
1526/* NMRR */
1527#define ICPC0_MASK 0x03
1528#define ICPC1_MASK 0x03
1529#define ICPC2_MASK 0x03
1530#define ICPC3_MASK 0x03
1531#define ICPC4_MASK 0x03
1532#define ICPC5_MASK 0x03
1533#define ICPC6_MASK 0x03
1534#define ICPC7_MASK 0x03
1535#define OCPC0_MASK 0x03
1536#define OCPC1_MASK 0x03
1537#define OCPC2_MASK 0x03
1538#define OCPC3_MASK 0x03
1539#define OCPC4_MASK 0x03
1540#define OCPC5_MASK 0x03
1541#define OCPC6_MASK 0x03
1542#define OCPC7_MASK 0x03
1543
1544
1545/* PAR */
1546#define FAULT_MASK 0x01
1547/* If a fault is present, these are the
1548same as the fault fields in the FAR */
1549#define FAULT_TF_MASK 0x01
1550#define FAULT_AFF_MASK 0x01
1551#define FAULT_APF_MASK 0x01
1552#define FAULT_TLBMF_MASK 0x01
1553#define FAULT_HTWDEEF_MASK 0x01
1554#define FAULT_HTWSEEF_MASK 0x01
1555#define FAULT_MHF_MASK 0x01
1556#define FAULT_SL_MASK 0x01
1557#define FAULT_SS_MASK 0x01
1558
1559/* If NO fault is present, the following
1560 * fields are in effect
1561 * (FAULT remains as before) */
1562#define PAR_NOFAULT_SS_MASK 0x01
1563#define PAR_NOFAULT_MT_MASK 0x07
1564#define PAR_NOFAULT_SH_MASK 0x01
1565#define PAR_NOFAULT_NS_MASK 0x01
1566#define PAR_NOFAULT_NOS_MASK 0x01
1567#define PAR_NPFAULT_PA_MASK 0x000FFFFF
1568
1569
1570/* PRRR */
1571#define MTC0_MASK 0x03
1572#define MTC1_MASK 0x03
1573#define MTC2_MASK 0x03
1574#define MTC3_MASK 0x03
1575#define MTC4_MASK 0x03
1576#define MTC5_MASK 0x03
1577#define MTC6_MASK 0x03
1578#define MTC7_MASK 0x03
1579#define SHDSH0_MASK 0x01
1580#define SHDSH1_MASK 0x01
1581#define SHNMSH0_MASK 0x01
1582#define SHNMSH1_MASK 0x01
1583#define NOS0_MASK 0x01
1584#define NOS1_MASK 0x01
1585#define NOS2_MASK 0x01
1586#define NOS3_MASK 0x01
1587#define NOS4_MASK 0x01
1588#define NOS5_MASK 0x01
1589#define NOS6_MASK 0x01
1590#define NOS7_MASK 0x01
1591
1592
1593/* RESUME */
1594#define TNR_MASK 0x01
1595
1596
1597/* SCTLR */
1598#define M_MASK 0x01
1599#define TRE_MASK 0x01
1600#define AFE_MASK 0x01
1601#define HAF_MASK 0x01
1602#define BE_MASK 0x01
1603#define AFFD_MASK 0x01
1604
1605
1606/* TLBIASID */
1607#define TLBIASID_ASID_MASK 0xFF
1608
1609
1610/* TLBIVA */
1611#define TLBIVA_ASID_MASK 0xFF
1612#define TLBIVA_VA_MASK 0x000FFFFF
1613
1614
1615/* TLBIVAA */
1616#define TLBIVAA_VA_MASK 0x000FFFFF
1617
1618
1619/* TLBLCKR */
1620#define LKE_MASK 0x01
1621#define TLBLCKR_TLBIALLCFG_MASK 0x01
1622#define TLBIASIDCFG_MASK 0x01
1623#define TLBIVAACFG_MASK 0x01
1624#define FLOOR_MASK 0xFF
1625#define VICTIM_MASK 0xFF
1626
1627
1628/* TTBCR */
1629#define N_MASK 0x07
1630#define PD0_MASK 0x01
1631#define PD1_MASK 0x01
1632
1633
1634/* TTBR0 */
1635#define TTBR0_IRGNH_MASK 0x01
1636#define TTBR0_SH_MASK 0x01
1637#define TTBR0_ORGN_MASK 0x03
1638#define TTBR0_NOS_MASK 0x01
1639#define TTBR0_IRGNL_MASK 0x01
1640#define TTBR0_PA_MASK 0x0003FFFF
1641
1642
1643/* TTBR1 */
1644#define TTBR1_IRGNH_MASK 0x01
1645#define TTBR1_SH_MASK 0x01
1646#define TTBR1_ORGN_MASK 0x03
1647#define TTBR1_NOS_MASK 0x01
1648#define TTBR1_IRGNL_MASK 0x01
1649#define TTBR1_PA_MASK 0x0003FFFF
1650
1651
1652/* V2PSR */
1653#define HIT_MASK 0x01
1654#define INDEX_MASK 0xFF
1655
1656
1657/* V2Pxx */
1658#define V2Pxx_INDEX_MASK 0xFF
1659#define V2Pxx_VA_MASK 0x000FFFFF
1660
1661
1662/* Context Register Shifts */
1663/* ACTLR */
1664#define CFERE_SHIFT 0
1665#define CFEIE_SHIFT 1
1666#define PTSHCFG_SHIFT 2
1667#define RCOSH_SHIFT 4
1668#define RCISH_SHIFT 5
1669#define RCNSH_SHIFT 6
1670#define PRIVCFG_SHIFT 8
1671#define DNA_SHIFT 10
1672#define DNLV2PA_SHIFT 11
1673#define TLBMCFG_SHIFT 12
1674#define CFCFG_SHIFT 14
1675#define TIPCF_SHIFT 15
1676#define V2PCFG_SHIFT 16
1677#define HUME_SHIFT 18
1678#define PTMTCFG_SHIFT 20
1679#define PTMEMTYPE_SHIFT 21
1680
1681
1682/* BFBCR */
1683#define BFBDFE_SHIFT 0
1684#define BFBSFE_SHIFT 1
1685#define SFVS_SHIFT 2
1686#define FLVIC_SHIFT 4
1687#define SLVIC_SHIFT 8
1688
1689
1690/* CONTEXTIDR */
1691#define CONTEXTIDR_ASID_SHIFT 0
1692#define PROCID_SHIFT 8
1693
1694
1695/* FSR */
1696#define TF_SHIFT 1
1697#define AFF_SHIFT 2
1698#define APF_SHIFT 3
1699#define TLBMF_SHIFT 4
1700#define HTWDEEF_SHIFT 5
1701#define HTWSEEF_SHIFT 6
1702#define MHF_SHIFT 7
1703#define SL_SHIFT 16
1704#define SS_SHIFT 30
1705#define MULTI_SHIFT 31
1706
1707
1708/* FSYNR0 */
1709#define AMID_SHIFT 0
1710#define APID_SHIFT 8
1711#define ABID_SHIFT 13
1712#define ATID_SHIFT 24
1713
1714
1715/* FSYNR1 */
1716#define AMEMTYPE_SHIFT 0
1717#define ASHARED_SHIFT 3
1718#define AINNERSHARED_SHIFT 4
1719#define APRIV_SHIFT 5
1720#define APROTNS_SHIFT 6
1721#define AINST_SHIFT 7
1722#define AWRITE_SHIFT 8
1723#define ABURST_SHIFT 10
1724#define ALEN_SHIFT 12
1725#define FSYNR1_ASIZE_SHIFT 16
1726#define ALOCK_SHIFT 20
1727#define AFULL_SHIFT 24
1728
1729
1730/* NMRR */
1731#define ICPC0_SHIFT 0
1732#define ICPC1_SHIFT 2
1733#define ICPC2_SHIFT 4
1734#define ICPC3_SHIFT 6
1735#define ICPC4_SHIFT 8
1736#define ICPC5_SHIFT 10
1737#define ICPC6_SHIFT 12
1738#define ICPC7_SHIFT 14
1739#define OCPC0_SHIFT 16
1740#define OCPC1_SHIFT 18
1741#define OCPC2_SHIFT 20
1742#define OCPC3_SHIFT 22
1743#define OCPC4_SHIFT 24
1744#define OCPC5_SHIFT 26
1745#define OCPC6_SHIFT 28
1746#define OCPC7_SHIFT 30
1747
1748
1749/* PAR */
1750#define FAULT_SHIFT 0
1751/* If a fault is present, these are the
1752same as the fault fields in the FAR */
1753#define FAULT_TF_SHIFT 1
1754#define FAULT_AFF_SHIFT 2
1755#define FAULT_APF_SHIFT 3
1756#define FAULT_TLBMF_SHIFT 4
1757#define FAULT_HTWDEEF_SHIFT 5
1758#define FAULT_HTWSEEF_SHIFT 6
1759#define FAULT_MHF_SHIFT 7
1760#define FAULT_SL_SHIFT 16
1761#define FAULT_SS_SHIFT 30
1762
1763/* If NO fault is present, the following
1764 * fields are in effect
1765 * (FAULT remains as before) */
1766#define PAR_NOFAULT_SS_SHIFT 1
1767#define PAR_NOFAULT_MT_SHIFT 4
1768#define PAR_NOFAULT_SH_SHIFT 7
1769#define PAR_NOFAULT_NS_SHIFT 9
1770#define PAR_NOFAULT_NOS_SHIFT 10
1771#define PAR_NPFAULT_PA_SHIFT 12
1772
1773
1774/* PRRR */
1775#define MTC0_SHIFT 0
1776#define MTC1_SHIFT 2
1777#define MTC2_SHIFT 4
1778#define MTC3_SHIFT 6
1779#define MTC4_SHIFT 8
1780#define MTC5_SHIFT 10
1781#define MTC6_SHIFT 12
1782#define MTC7_SHIFT 14
1783#define SHDSH0_SHIFT 16
1784#define SHDSH1_SHIFT 17
1785#define SHNMSH0_SHIFT 18
1786#define SHNMSH1_SHIFT 19
1787#define NOS0_SHIFT 24
1788#define NOS1_SHIFT 25
1789#define NOS2_SHIFT 26
1790#define NOS3_SHIFT 27
1791#define NOS4_SHIFT 28
1792#define NOS5_SHIFT 29
1793#define NOS6_SHIFT 30
1794#define NOS7_SHIFT 31
1795
1796
1797/* RESUME */
1798#define TNR_SHIFT 0
1799
1800
1801/* SCTLR */
1802#define M_SHIFT 0
1803#define TRE_SHIFT 1
1804#define AFE_SHIFT 2
1805#define HAF_SHIFT 3
1806#define BE_SHIFT 4
1807#define AFFD_SHIFT 5
1808
1809
1810/* TLBIASID */
1811#define TLBIASID_ASID_SHIFT 0
1812
1813
1814/* TLBIVA */
1815#define TLBIVA_ASID_SHIFT 0
1816#define TLBIVA_VA_SHIFT 12
1817
1818
1819/* TLBIVAA */
1820#define TLBIVAA_VA_SHIFT 12
1821
1822
1823/* TLBLCKR */
1824#define LKE_SHIFT 0
1825#define TLBLCKR_TLBIALLCFG_SHIFT 1
1826#define TLBIASIDCFG_SHIFT 2
1827#define TLBIVAACFG_SHIFT 3
1828#define FLOOR_SHIFT 8
1829#define VICTIM_SHIFT 8
1830
1831
1832/* TTBCR */
1833#define N_SHIFT 3
1834#define PD0_SHIFT 4
1835#define PD1_SHIFT 5
1836
1837
1838/* TTBR0 */
1839#define TTBR0_IRGNH_SHIFT 0
1840#define TTBR0_SH_SHIFT 1
1841#define TTBR0_ORGN_SHIFT 3
1842#define TTBR0_NOS_SHIFT 5
1843#define TTBR0_IRGNL_SHIFT 6
1844#define TTBR0_PA_SHIFT 14
1845
1846
1847/* TTBR1 */
1848#define TTBR1_IRGNH_SHIFT 0
1849#define TTBR1_SH_SHIFT 1
1850#define TTBR1_ORGN_SHIFT 3
1851#define TTBR1_NOS_SHIFT 5
1852#define TTBR1_IRGNL_SHIFT 6
1853#define TTBR1_PA_SHIFT 14
1854
1855
1856/* V2PSR */
1857#define HIT_SHIFT 0
1858#define INDEX_SHIFT 8
1859
1860
1861/* V2Pxx */
1862#define V2Pxx_INDEX_SHIFT 0
1863#define V2Pxx_VA_SHIFT 12
1864
1865#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8960.h b/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
deleted file mode 100644
index 7bca8d7108d6..000000000000
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 *
16 * The MSM peripherals are spread all over across 768MB of physical
17 * space, which makes just having a simple IO_ADDRESS macro to slide
18 * them into the right virtual location rough. Instead, we will
19 * provide a master phys->virt mapping for peripherals here.
20 *
21 */
22
23#ifndef __ASM_ARCH_MSM_IOMAP_8960_H
24#define __ASM_ARCH_MSM_IOMAP_8960_H
25
26/* Physical base address and size of peripherals.
27 * Ordered by the virtual base addresses they will be mapped at.
28 *
29 * If you add or remove entries here, you'll want to edit the
30 * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your
31 * changes.
32 *
33 */
34
35#define MSM8960_TMR_PHYS 0x0200A000
36#define MSM8960_TMR_SIZE SZ_4K
37
38#define MSM8960_TMR0_PHYS 0x0208A000
39#define MSM8960_TMR0_SIZE SZ_4K
40
41#ifdef CONFIG_DEBUG_MSM8960_UART
42#define MSM_DEBUG_UART_BASE 0xF0040000
43#define MSM_DEBUG_UART_PHYS 0x16440000
44#endif
45
46#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h b/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
deleted file mode 100644
index 75a7b62c1c74..000000000000
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 *
16 * The MSM peripherals are spread all over across 768MB of physical
17 * space, which makes just having a simple IO_ADDRESS macro to slide
18 * them into the right virtual location rough. Instead, we will
19 * provide a master phys->virt mapping for peripherals here.
20 *
21 */
22
23#ifndef __ASM_ARCH_MSM_IOMAP_8X60_H
24#define __ASM_ARCH_MSM_IOMAP_8X60_H
25
26/* Physical base address and size of peripherals.
27 * Ordered by the virtual base addresses they will be mapped at.
28 *
29 * MSM_VIC_BASE must be an value that can be loaded via a "mov"
30 * instruction, otherwise entry-macro.S will not compile.
31 *
32 * If you add or remove entries here, you'll want to edit the
33 * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your
34 * changes.
35 *
36 */
37
38#define MSM_TLMM_BASE IOMEM(0xF0004000)
39#define MSM_TLMM_PHYS 0x00800000
40#define MSM_TLMM_SIZE SZ_16K
41
42#define MSM8X60_TMR_PHYS 0x02000000
43#define MSM8X60_TMR_SIZE SZ_4K
44
45#define MSM8X60_TMR0_PHYS 0x02040000
46#define MSM8X60_TMR0_SIZE SZ_4K
47
48#ifdef CONFIG_DEBUG_MSM8660_UART
49#define MSM_DEBUG_UART_BASE 0xF0040000
50#define MSM_DEBUG_UART_PHYS 0x19C40000
51#endif
52
53#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h
index c56e81ffdcde..0e4f49157684 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap.h
@@ -45,25 +45,8 @@
45#include "msm_iomap-7x00.h" 45#include "msm_iomap-7x00.h"
46#endif 46#endif
47 47
48#include "msm_iomap-8x60.h"
49#include "msm_iomap-8960.h"
50
51#define MSM_DEBUG_UART_SIZE SZ_4K
52#if defined(CONFIG_DEBUG_MSM_UART1)
53#define MSM_DEBUG_UART_BASE 0xE1000000
54#define MSM_DEBUG_UART_PHYS MSM_UART1_PHYS
55#elif defined(CONFIG_DEBUG_MSM_UART2)
56#define MSM_DEBUG_UART_BASE 0xE1000000
57#define MSM_DEBUG_UART_PHYS MSM_UART2_PHYS
58#elif defined(CONFIG_DEBUG_MSM_UART3)
59#define MSM_DEBUG_UART_BASE 0xE1000000
60#define MSM_DEBUG_UART_PHYS MSM_UART3_PHYS
61#endif
62
63/* Virtual addresses shared across all MSM targets. */ 48/* Virtual addresses shared across all MSM targets. */
64#define MSM_CSR_BASE IOMEM(0xE0001000) 49#define MSM_CSR_BASE IOMEM(0xE0001000)
65#define MSM_TMR_BASE IOMEM(0xF0200000)
66#define MSM_TMR0_BASE IOMEM(0xF0201000)
67#define MSM_GPIO1_BASE IOMEM(0xE0003000) 50#define MSM_GPIO1_BASE IOMEM(0xE0003000)
68#define MSM_GPIO2_BASE IOMEM(0xE0004000) 51#define MSM_GPIO2_BASE IOMEM(0xE0004000)
69 52
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
deleted file mode 100644
index 94324870fb04..000000000000
--- a/arch/arm/mach-msm/include/mach/uncompress.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H
17#define __ASM_ARCH_MSM_UNCOMPRESS_H
18
19#include <asm/barrier.h>
20#include <asm/processor.h>
21#include <mach/msm_iomap.h>
22
23#define UART_CSR (*(volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x08))
24#define UART_TF (*(volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x0c))
25
26#define UART_DM_SR (*((volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x08)))
27#define UART_DM_CR (*((volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x10)))
28#define UART_DM_ISR (*((volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x14)))
29#define UART_DM_NCHAR (*((volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x40)))
30#define UART_DM_TF (*((volatile uint32_t *)(MSM_DEBUG_UART_PHYS + 0x70)))
31
32static void putc(int c)
33{
34#if defined(MSM_DEBUG_UART_PHYS)
35#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS
36 /*
37 * Wait for TX_READY to be set; but skip it if we have a
38 * TX underrun.
39 */
40 if (!(UART_DM_SR & 0x08))
41 while (!(UART_DM_ISR & 0x80))
42 cpu_relax();
43
44 UART_DM_CR = 0x300;
45 UART_DM_NCHAR = 0x1;
46 UART_DM_TF = c;
47#else
48 while (!(UART_CSR & 0x04))
49 cpu_relax();
50 UART_TF = c;
51#endif
52#endif
53}
54
55static inline void flush(void)
56{
57}
58
59static inline void arch_decomp_setup(void)
60{
61}
62
63#endif
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 3dc04ccaf59f..adc8971c7266 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -18,6 +18,7 @@
18 */ 18 */
19 19
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/bug.h>
21#include <linux/init.h> 22#include <linux/init.h>
22#include <linux/io.h> 23#include <linux/io.h>
23#include <linux/export.h> 24#include <linux/export.h>
@@ -27,8 +28,6 @@
27#include <mach/msm_iomap.h> 28#include <mach/msm_iomap.h>
28#include <asm/mach/map.h> 29#include <asm/mach/map.h>
29 30
30#include <mach/board.h>
31
32#include "common.h" 31#include "common.h"
33 32
34#define MSM_CHIP_DEVICE_TYPE(name, chip, mem_type) { \ 33#define MSM_CHIP_DEVICE_TYPE(name, chip, mem_type) { \
@@ -52,26 +51,38 @@ static struct map_desc msm_io_desc[] __initdata = {
52 MSM_CHIP_DEVICE_TYPE(GPIO1, MSM7X00, MT_DEVICE_NONSHARED), 51 MSM_CHIP_DEVICE_TYPE(GPIO1, MSM7X00, MT_DEVICE_NONSHARED),
53 MSM_CHIP_DEVICE_TYPE(GPIO2, MSM7X00, MT_DEVICE_NONSHARED), 52 MSM_CHIP_DEVICE_TYPE(GPIO2, MSM7X00, MT_DEVICE_NONSHARED),
54 MSM_DEVICE_TYPE(CLK_CTL, MT_DEVICE_NONSHARED), 53 MSM_DEVICE_TYPE(CLK_CTL, MT_DEVICE_NONSHARED),
55#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
56 defined(CONFIG_DEBUG_MSM_UART3)
57 MSM_DEVICE_TYPE(DEBUG_UART, MT_DEVICE_NONSHARED),
58#endif
59 { 54 {
60 .virtual = (unsigned long) MSM_SHARED_RAM_BASE, 55 .virtual = (unsigned long) MSM_SHARED_RAM_BASE,
61 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS), 56 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS),
62 .length = MSM_SHARED_RAM_SIZE, 57 .length = MSM_SHARED_RAM_SIZE,
63 .type = MT_DEVICE, 58 .type = MT_DEVICE,
64 }, 59 },
60#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
61 defined(CONFIG_DEBUG_MSM_UART3)
62 {
63 /* Must be last: virtual and pfn filled in by debug_ll_addr() */
64 .length = SZ_4K,
65 .type = MT_DEVICE_NONSHARED,
66 }
67#endif
65}; 68};
66 69
67void __init msm_map_common_io(void) 70void __init msm_map_common_io(void)
68{ 71{
72 size_t size = ARRAY_SIZE(msm_io_desc);
73
69 /* Make sure the peripheral register window is closed, since 74 /* Make sure the peripheral register window is closed, since
70 * we will use PTE flags (TEX[1]=1,B=0,C=1) to determine which 75 * we will use PTE flags (TEX[1]=1,B=0,C=1) to determine which
71 * pages are peripheral interface or not. 76 * pages are peripheral interface or not.
72 */ 77 */
73 asm("mcr p15, 0, %0, c15, c2, 4" : : "r" (0)); 78 asm("mcr p15, 0, %0, c15, c2, 4" : : "r" (0));
74 iotable_init(msm_io_desc, ARRAY_SIZE(msm_io_desc)); 79#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
80 defined(CONFIG_DEBUG_MSM_UART3)
81 debug_ll_addr(&msm_io_desc[size - 1].pfn,
82 &msm_io_desc[size - 1].virtual);
83 msm_io_desc[size - 1].pfn = __phys_to_pfn(msm_io_desc[size - 1].pfn);
84#endif
85 iotable_init(msm_io_desc, size);
75} 86}
76#endif 87#endif
77 88
@@ -87,10 +98,6 @@ static struct map_desc qsd8x50_io_desc[] __initdata = {
87 MSM_DEVICE(SCPLL), 98 MSM_DEVICE(SCPLL),
88 MSM_DEVICE(AD5), 99 MSM_DEVICE(AD5),
89 MSM_DEVICE(MDC), 100 MSM_DEVICE(MDC),
90#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
91 defined(CONFIG_DEBUG_MSM_UART3)
92 MSM_DEVICE(DEBUG_UART),
93#endif
94 { 101 {
95 .virtual = (unsigned long) MSM_SHARED_RAM_BASE, 102 .virtual = (unsigned long) MSM_SHARED_RAM_BASE,
96 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS), 103 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS),
@@ -101,40 +108,11 @@ static struct map_desc qsd8x50_io_desc[] __initdata = {
101 108
102void __init msm_map_qsd8x50_io(void) 109void __init msm_map_qsd8x50_io(void)
103{ 110{
111 debug_ll_io_init();
104 iotable_init(qsd8x50_io_desc, ARRAY_SIZE(qsd8x50_io_desc)); 112 iotable_init(qsd8x50_io_desc, ARRAY_SIZE(qsd8x50_io_desc));
105} 113}
106#endif /* CONFIG_ARCH_QSD8X50 */ 114#endif /* CONFIG_ARCH_QSD8X50 */
107 115
108#ifdef CONFIG_ARCH_MSM8X60
109static struct map_desc msm8x60_io_desc[] __initdata = {
110 MSM_CHIP_DEVICE(TMR, MSM8X60),
111 MSM_CHIP_DEVICE(TMR0, MSM8X60),
112#ifdef CONFIG_DEBUG_MSM8660_UART
113 MSM_DEVICE(DEBUG_UART),
114#endif
115};
116
117void __init msm_map_msm8x60_io(void)
118{
119 iotable_init(msm8x60_io_desc, ARRAY_SIZE(msm8x60_io_desc));
120}
121#endif /* CONFIG_ARCH_MSM8X60 */
122
123#ifdef CONFIG_ARCH_MSM8960
124static struct map_desc msm8960_io_desc[] __initdata = {
125 MSM_CHIP_DEVICE(TMR, MSM8960),
126 MSM_CHIP_DEVICE(TMR0, MSM8960),
127#ifdef CONFIG_DEBUG_MSM8960_UART
128 MSM_DEVICE(DEBUG_UART),
129#endif
130};
131
132void __init msm_map_msm8960_io(void)
133{
134 iotable_init(msm8960_io_desc, ARRAY_SIZE(msm8960_io_desc));
135}
136#endif /* CONFIG_ARCH_MSM8960 */
137
138#ifdef CONFIG_ARCH_MSM7X30 116#ifdef CONFIG_ARCH_MSM7X30
139static struct map_desc msm7x30_io_desc[] __initdata = { 117static struct map_desc msm7x30_io_desc[] __initdata = {
140 MSM_DEVICE(VIC), 118 MSM_DEVICE(VIC),
@@ -150,10 +128,6 @@ static struct map_desc msm7x30_io_desc[] __initdata = {
150 MSM_DEVICE(SAW), 128 MSM_DEVICE(SAW),
151 MSM_DEVICE(GCC), 129 MSM_DEVICE(GCC),
152 MSM_DEVICE(TCSR), 130 MSM_DEVICE(TCSR),
153#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
154 defined(CONFIG_DEBUG_MSM_UART3)
155 MSM_DEVICE(DEBUG_UART),
156#endif
157 { 131 {
158 .virtual = (unsigned long) MSM_SHARED_RAM_BASE, 132 .virtual = (unsigned long) MSM_SHARED_RAM_BASE,
159 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS), 133 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS),
@@ -164,10 +138,12 @@ static struct map_desc msm7x30_io_desc[] __initdata = {
164 138
165void __init msm_map_msm7x30_io(void) 139void __init msm_map_msm7x30_io(void)
166{ 140{
141 debug_ll_io_init();
167 iotable_init(msm7x30_io_desc, ARRAY_SIZE(msm7x30_io_desc)); 142 iotable_init(msm7x30_io_desc, ARRAY_SIZE(msm7x30_io_desc));
168} 143}
169#endif /* CONFIG_ARCH_MSM7X30 */ 144#endif /* CONFIG_ARCH_MSM7X30 */
170 145
146#ifdef CONFIG_ARCH_MSM7X00A
171void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size, 147void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
172 unsigned int mtype, void *caller) 148 unsigned int mtype, void *caller)
173{ 149{
@@ -182,3 +158,4 @@ void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
182 158
183 return __arm_ioremap_caller(phys_addr, size, mtype, caller); 159 return __arm_ioremap_caller(phys_addr, size, mtype, caller);
184} 160}
161#endif
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 8697cfc0d0b6..696fb73296d0 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -16,6 +16,7 @@
16 16
17#include <linux/clocksource.h> 17#include <linux/clocksource.h>
18#include <linux/clockchips.h> 18#include <linux/clockchips.h>
19#include <linux/cpu.h>
19#include <linux/init.h> 20#include <linux/init.h>
20#include <linux/interrupt.h> 21#include <linux/interrupt.h>
21#include <linux/irq.h> 22#include <linux/irq.h>
@@ -26,7 +27,6 @@
26#include <linux/sched_clock.h> 27#include <linux/sched_clock.h>
27 28
28#include <asm/mach/time.h> 29#include <asm/mach/time.h>
29#include <asm/localtimer.h>
30 30
31#include "common.h" 31#include "common.h"
32 32
@@ -49,7 +49,7 @@ static void __iomem *sts_base;
49 49
50static irqreturn_t msm_timer_interrupt(int irq, void *dev_id) 50static irqreturn_t msm_timer_interrupt(int irq, void *dev_id)
51{ 51{
52 struct clock_event_device *evt = *(struct clock_event_device **)dev_id; 52 struct clock_event_device *evt = dev_id;
53 /* Stop the timer tick */ 53 /* Stop the timer tick */
54 if (evt->mode == CLOCK_EVT_MODE_ONESHOT) { 54 if (evt->mode == CLOCK_EVT_MODE_ONESHOT) {
55 u32 ctrl = readl_relaxed(event_base + TIMER_ENABLE); 55 u32 ctrl = readl_relaxed(event_base + TIMER_ENABLE);
@@ -101,18 +101,7 @@ static void msm_timer_set_mode(enum clock_event_mode mode,
101 writel_relaxed(ctrl, event_base + TIMER_ENABLE); 101 writel_relaxed(ctrl, event_base + TIMER_ENABLE);
102} 102}
103 103
104static struct clock_event_device msm_clockevent = { 104static struct clock_event_device __percpu *msm_evt;
105 .name = "gp_timer",
106 .features = CLOCK_EVT_FEAT_ONESHOT,
107 .rating = 200,
108 .set_next_event = msm_timer_set_next_event,
109 .set_mode = msm_timer_set_mode,
110};
111
112static union {
113 struct clock_event_device *evt;
114 struct clock_event_device * __percpu *percpu_evt;
115} msm_evt;
116 105
117static void __iomem *source_base; 106static void __iomem *source_base;
118 107
@@ -138,23 +127,34 @@ static struct clocksource msm_clocksource = {
138 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 127 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
139}; 128};
140 129
141#ifdef CONFIG_LOCAL_TIMERS 130static int msm_timer_irq;
131static int msm_timer_has_ppi;
132
142static int msm_local_timer_setup(struct clock_event_device *evt) 133static int msm_local_timer_setup(struct clock_event_device *evt)
143{ 134{
144 /* Use existing clock_event for cpu 0 */ 135 int cpu = smp_processor_id();
145 if (!smp_processor_id()) 136 int err;
146 return 0; 137
147 138 evt->irq = msm_timer_irq;
148 evt->irq = msm_clockevent.irq; 139 evt->name = "msm_timer";
149 evt->name = "local_timer"; 140 evt->features = CLOCK_EVT_FEAT_ONESHOT;
150 evt->features = msm_clockevent.features; 141 evt->rating = 200;
151 evt->rating = msm_clockevent.rating;
152 evt->set_mode = msm_timer_set_mode; 142 evt->set_mode = msm_timer_set_mode;
153 evt->set_next_event = msm_timer_set_next_event; 143 evt->set_next_event = msm_timer_set_next_event;
144 evt->cpumask = cpumask_of(cpu);
145
146 clockevents_config_and_register(evt, GPT_HZ, 4, 0xffffffff);
147
148 if (msm_timer_has_ppi) {
149 enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING);
150 } else {
151 err = request_irq(evt->irq, msm_timer_interrupt,
152 IRQF_TIMER | IRQF_NOBALANCING |
153 IRQF_TRIGGER_RISING, "gp_timer", evt);
154 if (err)
155 pr_err("request_irq failed\n");
156 }
154 157
155 *__this_cpu_ptr(msm_evt.percpu_evt) = evt;
156 clockevents_config_and_register(evt, GPT_HZ, 4, 0xf0000000);
157 enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING);
158 return 0; 158 return 0;
159} 159}
160 160
@@ -164,11 +164,28 @@ static void msm_local_timer_stop(struct clock_event_device *evt)
164 disable_percpu_irq(evt->irq); 164 disable_percpu_irq(evt->irq);
165} 165}
166 166
167static struct local_timer_ops msm_local_timer_ops = { 167static int msm_timer_cpu_notify(struct notifier_block *self,
168 .setup = msm_local_timer_setup, 168 unsigned long action, void *hcpu)
169 .stop = msm_local_timer_stop, 169{
170 /*
171 * Grab cpu pointer in each case to avoid spurious
172 * preemptible warnings
173 */
174 switch (action & ~CPU_TASKS_FROZEN) {
175 case CPU_STARTING:
176 msm_local_timer_setup(this_cpu_ptr(msm_evt));
177 break;
178 case CPU_DYING:
179 msm_local_timer_stop(this_cpu_ptr(msm_evt));
180 break;
181 }
182
183 return NOTIFY_OK;
184}
185
186static struct notifier_block msm_timer_cpu_nb = {
187 .notifier_call = msm_timer_cpu_notify,
170}; 188};
171#endif /* CONFIG_LOCAL_TIMERS */
172 189
173static notrace u32 msm_sched_clock_read(void) 190static notrace u32 msm_sched_clock_read(void)
174{ 191{
@@ -178,38 +195,35 @@ static notrace u32 msm_sched_clock_read(void)
178static void __init msm_timer_init(u32 dgt_hz, int sched_bits, int irq, 195static void __init msm_timer_init(u32 dgt_hz, int sched_bits, int irq,
179 bool percpu) 196 bool percpu)
180{ 197{
181 struct clock_event_device *ce = &msm_clockevent;
182 struct clocksource *cs = &msm_clocksource; 198 struct clocksource *cs = &msm_clocksource;
183 int res; 199 int res = 0;
200
201 msm_timer_irq = irq;
202 msm_timer_has_ppi = percpu;
203
204 msm_evt = alloc_percpu(struct clock_event_device);
205 if (!msm_evt) {
206 pr_err("memory allocation failed for clockevents\n");
207 goto err;
208 }
184 209
185 ce->cpumask = cpumask_of(0); 210 if (percpu)
186 ce->irq = irq; 211 res = request_percpu_irq(irq, msm_timer_interrupt,
212 "gp_timer", msm_evt);
187 213
188 clockevents_config_and_register(ce, GPT_HZ, 4, 0xffffffff); 214 if (res) {
189 if (percpu) { 215 pr_err("request_percpu_irq failed\n");
190 msm_evt.percpu_evt = alloc_percpu(struct clock_event_device *); 216 } else {
191 if (!msm_evt.percpu_evt) { 217 res = register_cpu_notifier(&msm_timer_cpu_nb);
192 pr_err("memory allocation failed for %s\n", ce->name); 218 if (res) {
219 free_percpu_irq(irq, msm_evt);
193 goto err; 220 goto err;
194 } 221 }
195 *__this_cpu_ptr(msm_evt.percpu_evt) = ce; 222
196 res = request_percpu_irq(ce->irq, msm_timer_interrupt, 223 /* Immediately configure the timer on the boot CPU */
197 ce->name, msm_evt.percpu_evt); 224 msm_local_timer_setup(__this_cpu_ptr(msm_evt));
198 if (!res) {
199 enable_percpu_irq(ce->irq, IRQ_TYPE_EDGE_RISING);
200#ifdef CONFIG_LOCAL_TIMERS
201 local_timer_register(&msm_local_timer_ops);
202#endif
203 }
204 } else {
205 msm_evt.evt = ce;
206 res = request_irq(ce->irq, msm_timer_interrupt,
207 IRQF_TIMER | IRQF_NOBALANCING |
208 IRQF_TRIGGER_RISING, ce->name, &msm_evt.evt);
209 } 225 }
210 226
211 if (res)
212 pr_err("request_irq failed for %s\n", ce->name);
213err: 227err:
214 writel_relaxed(TIMER_ENABLE_EN, source_base + TIMER_ENABLE); 228 writel_relaxed(TIMER_ENABLE_EN, source_base + TIMER_ENABLE);
215 res = clocksource_register_hz(cs, dgt_hz); 229 res = clocksource_register_hz(cs, dgt_hz);
@@ -219,15 +233,8 @@ err:
219} 233}
220 234
221#ifdef CONFIG_OF 235#ifdef CONFIG_OF
222static const struct of_device_id msm_timer_match[] __initconst = { 236static void __init msm_dt_timer_init(struct device_node *np)
223 { .compatible = "qcom,kpss-timer" },
224 { .compatible = "qcom,scss-timer" },
225 { },
226};
227
228void __init msm_dt_timer_init(void)
229{ 237{
230 struct device_node *np;
231 u32 freq; 238 u32 freq;
232 int irq; 239 int irq;
233 struct resource res; 240 struct resource res;
@@ -235,12 +242,6 @@ void __init msm_dt_timer_init(void)
235 void __iomem *base; 242 void __iomem *base;
236 void __iomem *cpu0_base; 243 void __iomem *cpu0_base;
237 244
238 np = of_find_matching_node(NULL, msm_timer_match);
239 if (!np) {
240 pr_err("Can't find msm timer DT node\n");
241 return;
242 }
243
244 base = of_iomap(np, 0); 245 base = of_iomap(np, 0);
245 if (!base) { 246 if (!base) {
246 pr_err("Failed to map event base\n"); 247 pr_err("Failed to map event base\n");
@@ -283,6 +284,8 @@ void __init msm_dt_timer_init(void)
283 284
284 msm_timer_init(freq, 32, irq, !!percpu_offset); 285 msm_timer_init(freq, 32, irq, !!percpu_offset);
285} 286}
287CLOCKSOURCE_OF_DECLARE(kpss_timer, "qcom,kpss-timer", msm_dt_timer_init);
288CLOCKSOURCE_OF_DECLARE(scss_timer, "qcom,scss-timer", msm_dt_timer_init);
286#endif 289#endif
287 290
288static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source, 291static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source,
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
index 594b63db4215..f9c09b75d4d7 100644
--- a/arch/arm/mach-mvebu/platsmp.c
+++ b/arch/arm/mach-mvebu/platsmp.c
@@ -82,28 +82,11 @@ static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle)
82 82
83static void __init armada_xp_smp_init_cpus(void) 83static void __init armada_xp_smp_init_cpus(void)
84{ 84{
85 struct device_node *np; 85 unsigned int ncores = num_possible_cpus();
86 unsigned int i, ncores;
87 86
88 np = of_find_node_by_name(NULL, "cpus");
89 if (!np)
90 panic("No 'cpus' node found\n");
91
92 ncores = of_get_child_count(np);
93 if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS) 87 if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS)
94 panic("Invalid number of CPUs in DT\n"); 88 panic("Invalid number of CPUs in DT\n");
95 89
96 /* Limit possible CPUs to defconfig */
97 if (ncores > nr_cpu_ids) {
98 pr_warn("SMP: %d CPUs physically present. Only %d configured.",
99 ncores, nr_cpu_ids);
100 pr_warn("Clipping CPU count to %d\n", nr_cpu_ids);
101 ncores = nr_cpu_ids;
102 }
103
104 for (i = 0; i < ncores; i++)
105 set_cpu_possible(i, true);
106
107 set_smp_cross_call(armada_mpic_send_doorbell); 90 set_smp_cross_call(armada_mpic_send_doorbell);
108} 91}
109 92
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 3ed8acd42ecd..56021c67c89c 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -37,9 +37,8 @@ config ARCH_OMAP4
37 select CACHE_L2X0 37 select CACHE_L2X0
38 select CPU_V7 38 select CPU_V7
39 select HAVE_ARM_SCU if SMP 39 select HAVE_ARM_SCU if SMP
40 select HAVE_ARM_TWD if LOCAL_TIMERS 40 select HAVE_ARM_TWD if SMP
41 select HAVE_SMP 41 select HAVE_SMP
42 select LOCAL_TIMERS if SMP
43 select OMAP_INTERCONNECT 42 select OMAP_INTERCONNECT
44 select PL310_ERRATA_588369 43 select PL310_ERRATA_588369
45 select PL310_ERRATA_727915 44 select PL310_ERRATA_727915
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 8cc2c9e9fb03..543d9a882de3 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -21,7 +21,7 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/gpio.h> 23#include <linux/gpio.h>
24#include <linux/i2c/pca953x.h> 24#include <linux/platform_data/pca953x.h>
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>
diff --git a/arch/arm/mach-omap2/cm-regbits-24xx.h b/arch/arm/mach-omap2/cm-regbits-24xx.h
index 669ef51b17a8..8538669cc2ad 100644
--- a/arch/arm/mach-omap2/cm-regbits-24xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-24xx.h
@@ -14,439 +14,121 @@
14 * published by the Free Software Foundation. 14 * published by the Free Software Foundation.
15 */ 15 */
16 16
17/* Bits shared between registers */
18
19/* CM_FCLKEN1_CORE and CM_ICLKEN1_CORE shared bits */
20#define OMAP24XX_EN_CAM_SHIFT 31 17#define OMAP24XX_EN_CAM_SHIFT 31
21#define OMAP24XX_EN_CAM_MASK (1 << 31)
22#define OMAP24XX_EN_WDT4_SHIFT 29 18#define OMAP24XX_EN_WDT4_SHIFT 29
23#define OMAP24XX_EN_WDT4_MASK (1 << 29)
24#define OMAP2420_EN_WDT3_SHIFT 28 19#define OMAP2420_EN_WDT3_SHIFT 28
25#define OMAP2420_EN_WDT3_MASK (1 << 28)
26#define OMAP24XX_EN_MSPRO_SHIFT 27 20#define OMAP24XX_EN_MSPRO_SHIFT 27
27#define OMAP24XX_EN_MSPRO_MASK (1 << 27)
28#define OMAP24XX_EN_FAC_SHIFT 25 21#define OMAP24XX_EN_FAC_SHIFT 25
29#define OMAP24XX_EN_FAC_MASK (1 << 25)
30#define OMAP2420_EN_EAC_SHIFT 24 22#define OMAP2420_EN_EAC_SHIFT 24
31#define OMAP2420_EN_EAC_MASK (1 << 24)
32#define OMAP24XX_EN_HDQ_SHIFT 23 23#define OMAP24XX_EN_HDQ_SHIFT 23
33#define OMAP24XX_EN_HDQ_MASK (1 << 23)
34#define OMAP2420_EN_I2C2_SHIFT 20 24#define OMAP2420_EN_I2C2_SHIFT 20
35#define OMAP2420_EN_I2C2_MASK (1 << 20)
36#define OMAP2420_EN_I2C1_SHIFT 19 25#define OMAP2420_EN_I2C1_SHIFT 19
37#define OMAP2420_EN_I2C1_MASK (1 << 19)
38
39/* CM_FCLKEN2_CORE and CM_ICLKEN2_CORE shared bits */
40#define OMAP2430_EN_MCBSP5_SHIFT 5 26#define OMAP2430_EN_MCBSP5_SHIFT 5
41#define OMAP2430_EN_MCBSP5_MASK (1 << 5)
42#define OMAP2430_EN_MCBSP4_SHIFT 4 27#define OMAP2430_EN_MCBSP4_SHIFT 4
43#define OMAP2430_EN_MCBSP4_MASK (1 << 4)
44#define OMAP2430_EN_MCBSP3_SHIFT 3 28#define OMAP2430_EN_MCBSP3_SHIFT 3
45#define OMAP2430_EN_MCBSP3_MASK (1 << 3)
46#define OMAP24XX_EN_SSI_SHIFT 1 29#define OMAP24XX_EN_SSI_SHIFT 1
47#define OMAP24XX_EN_SSI_MASK (1 << 1)
48
49/* CM_FCLKEN_WKUP and CM_ICLKEN_WKUP shared bits */
50#define OMAP24XX_EN_MPU_WDT_SHIFT 3 30#define OMAP24XX_EN_MPU_WDT_SHIFT 3
51#define OMAP24XX_EN_MPU_WDT_MASK (1 << 3)
52
53/* Bits specific to each register */
54
55/* CM_IDLEST_MPU */
56/* 2430 only */
57#define OMAP2430_ST_MPU_MASK (1 << 0)
58
59/* CM_CLKSEL_MPU */
60#define OMAP24XX_CLKSEL_MPU_SHIFT 0 31#define OMAP24XX_CLKSEL_MPU_SHIFT 0
61#define OMAP24XX_CLKSEL_MPU_MASK (0x1f << 0)
62#define OMAP24XX_CLKSEL_MPU_WIDTH 5 32#define OMAP24XX_CLKSEL_MPU_WIDTH 5
63
64/* CM_CLKSTCTRL_MPU */
65#define OMAP24XX_AUTOSTATE_MPU_SHIFT 0
66#define OMAP24XX_AUTOSTATE_MPU_MASK (1 << 0) 33#define OMAP24XX_AUTOSTATE_MPU_MASK (1 << 0)
67
68/* CM_FCLKEN1_CORE specific bits*/
69#define OMAP24XX_EN_TV_SHIFT 2 34#define OMAP24XX_EN_TV_SHIFT 2
70#define OMAP24XX_EN_TV_MASK (1 << 2)
71#define OMAP24XX_EN_DSS2_SHIFT 1 35#define OMAP24XX_EN_DSS2_SHIFT 1
72#define OMAP24XX_EN_DSS2_MASK (1 << 1)
73#define OMAP24XX_EN_DSS1_SHIFT 0 36#define OMAP24XX_EN_DSS1_SHIFT 0
74#define OMAP24XX_EN_DSS1_MASK (1 << 0) 37#define OMAP24XX_EN_DSS1_MASK (1 << 0)
75
76/* CM_FCLKEN2_CORE specific bits */
77#define OMAP2430_EN_I2CHS2_SHIFT 20 38#define OMAP2430_EN_I2CHS2_SHIFT 20
78#define OMAP2430_EN_I2CHS2_MASK (1 << 20)
79#define OMAP2430_EN_I2CHS1_SHIFT 19 39#define OMAP2430_EN_I2CHS1_SHIFT 19
80#define OMAP2430_EN_I2CHS1_MASK (1 << 19)
81#define OMAP2430_EN_MMCHSDB2_SHIFT 17 40#define OMAP2430_EN_MMCHSDB2_SHIFT 17
82#define OMAP2430_EN_MMCHSDB2_MASK (1 << 17)
83#define OMAP2430_EN_MMCHSDB1_SHIFT 16 41#define OMAP2430_EN_MMCHSDB1_SHIFT 16
84#define OMAP2430_EN_MMCHSDB1_MASK (1 << 16)
85
86/* CM_ICLKEN1_CORE specific bits */
87#define OMAP24XX_EN_MAILBOXES_SHIFT 30 42#define OMAP24XX_EN_MAILBOXES_SHIFT 30
88#define OMAP24XX_EN_MAILBOXES_MASK (1 << 30)
89#define OMAP24XX_EN_DSS_SHIFT 0
90#define OMAP24XX_EN_DSS_MASK (1 << 0)
91
92/* CM_ICLKEN2_CORE specific bits */
93
94/* CM_ICLKEN3_CORE */
95/* 2430 only */
96#define OMAP2430_EN_SDRC_SHIFT 2 43#define OMAP2430_EN_SDRC_SHIFT 2
97#define OMAP2430_EN_SDRC_MASK (1 << 2)
98
99/* CM_ICLKEN4_CORE */
100#define OMAP24XX_EN_PKA_SHIFT 4 44#define OMAP24XX_EN_PKA_SHIFT 4
101#define OMAP24XX_EN_PKA_MASK (1 << 4)
102#define OMAP24XX_EN_AES_SHIFT 3 45#define OMAP24XX_EN_AES_SHIFT 3
103#define OMAP24XX_EN_AES_MASK (1 << 3)
104#define OMAP24XX_EN_RNG_SHIFT 2 46#define OMAP24XX_EN_RNG_SHIFT 2
105#define OMAP24XX_EN_RNG_MASK (1 << 2)
106#define OMAP24XX_EN_SHA_SHIFT 1 47#define OMAP24XX_EN_SHA_SHIFT 1
107#define OMAP24XX_EN_SHA_MASK (1 << 1)
108#define OMAP24XX_EN_DES_SHIFT 0 48#define OMAP24XX_EN_DES_SHIFT 0
109#define OMAP24XX_EN_DES_MASK (1 << 0)
110
111/* CM_IDLEST1_CORE specific bits */
112#define OMAP24XX_ST_MAILBOXES_SHIFT 30 49#define OMAP24XX_ST_MAILBOXES_SHIFT 30
113#define OMAP24XX_ST_MAILBOXES_MASK (1 << 30)
114#define OMAP24XX_ST_WDT4_SHIFT 29
115#define OMAP24XX_ST_WDT4_MASK (1 << 29)
116#define OMAP2420_ST_WDT3_SHIFT 28
117#define OMAP2420_ST_WDT3_MASK (1 << 28)
118#define OMAP24XX_ST_MSPRO_SHIFT 27
119#define OMAP24XX_ST_MSPRO_MASK (1 << 27)
120#define OMAP24XX_ST_FAC_SHIFT 25
121#define OMAP24XX_ST_FAC_MASK (1 << 25)
122#define OMAP2420_ST_EAC_SHIFT 24
123#define OMAP2420_ST_EAC_MASK (1 << 24)
124#define OMAP24XX_ST_HDQ_SHIFT 23 50#define OMAP24XX_ST_HDQ_SHIFT 23
125#define OMAP24XX_ST_HDQ_MASK (1 << 23)
126#define OMAP2420_ST_I2C2_SHIFT 20 51#define OMAP2420_ST_I2C2_SHIFT 20
127#define OMAP2420_ST_I2C2_MASK (1 << 20)
128#define OMAP2430_ST_I2CHS1_SHIFT 19 52#define OMAP2430_ST_I2CHS1_SHIFT 19
129#define OMAP2430_ST_I2CHS1_MASK (1 << 19)
130#define OMAP2420_ST_I2C1_SHIFT 19 53#define OMAP2420_ST_I2C1_SHIFT 19
131#define OMAP2420_ST_I2C1_MASK (1 << 19)
132#define OMAP2430_ST_I2CHS2_SHIFT 20 54#define OMAP2430_ST_I2CHS2_SHIFT 20
133#define OMAP2430_ST_I2CHS2_MASK (1 << 20)
134#define OMAP24XX_ST_MCBSP2_SHIFT 16 55#define OMAP24XX_ST_MCBSP2_SHIFT 16
135#define OMAP24XX_ST_MCBSP2_MASK (1 << 16)
136#define OMAP24XX_ST_MCBSP1_SHIFT 15 56#define OMAP24XX_ST_MCBSP1_SHIFT 15
137#define OMAP24XX_ST_MCBSP1_MASK (1 << 15)
138#define OMAP24XX_ST_DSS_SHIFT 0 57#define OMAP24XX_ST_DSS_SHIFT 0
139#define OMAP24XX_ST_DSS_MASK (1 << 0)
140
141/* CM_IDLEST2_CORE */
142#define OMAP2430_ST_MCBSP5_SHIFT 5 58#define OMAP2430_ST_MCBSP5_SHIFT 5
143#define OMAP2430_ST_MCBSP5_MASK (1 << 5)
144#define OMAP2430_ST_MCBSP4_SHIFT 4 59#define OMAP2430_ST_MCBSP4_SHIFT 4
145#define OMAP2430_ST_MCBSP4_MASK (1 << 4)
146#define OMAP2430_ST_MCBSP3_SHIFT 3 60#define OMAP2430_ST_MCBSP3_SHIFT 3
147#define OMAP2430_ST_MCBSP3_MASK (1 << 3)
148#define OMAP24XX_ST_SSI_SHIFT 1
149#define OMAP24XX_ST_SSI_MASK (1 << 1)
150
151/* CM_IDLEST3_CORE */
152/* 2430 only */
153#define OMAP2430_ST_SDRC_MASK (1 << 2)
154
155/* CM_IDLEST4_CORE */
156#define OMAP24XX_ST_PKA_SHIFT 4
157#define OMAP24XX_ST_PKA_MASK (1 << 4)
158#define OMAP24XX_ST_AES_SHIFT 3 61#define OMAP24XX_ST_AES_SHIFT 3
159#define OMAP24XX_ST_AES_MASK (1 << 3)
160#define OMAP24XX_ST_RNG_SHIFT 2 62#define OMAP24XX_ST_RNG_SHIFT 2
161#define OMAP24XX_ST_RNG_MASK (1 << 2)
162#define OMAP24XX_ST_SHA_SHIFT 1 63#define OMAP24XX_ST_SHA_SHIFT 1
163#define OMAP24XX_ST_SHA_MASK (1 << 1)
164#define OMAP24XX_ST_DES_SHIFT 0
165#define OMAP24XX_ST_DES_MASK (1 << 0)
166
167/* CM_AUTOIDLE1_CORE */
168#define OMAP24XX_AUTO_CAM_MASK (1 << 31)
169#define OMAP24XX_AUTO_MAILBOXES_MASK (1 << 30)
170#define OMAP24XX_AUTO_WDT4_MASK (1 << 29)
171#define OMAP2420_AUTO_WDT3_MASK (1 << 28)
172#define OMAP24XX_AUTO_MSPRO_MASK (1 << 27)
173#define OMAP2420_AUTO_MMC_MASK (1 << 26)
174#define OMAP24XX_AUTO_FAC_MASK (1 << 25)
175#define OMAP2420_AUTO_EAC_MASK (1 << 24)
176#define OMAP24XX_AUTO_HDQ_MASK (1 << 23)
177#define OMAP24XX_AUTO_UART2_MASK (1 << 22)
178#define OMAP24XX_AUTO_UART1_MASK (1 << 21)
179#define OMAP24XX_AUTO_I2C2_MASK (1 << 20)
180#define OMAP24XX_AUTO_I2C1_MASK (1 << 19)
181#define OMAP24XX_AUTO_MCSPI2_MASK (1 << 18)
182#define OMAP24XX_AUTO_MCSPI1_MASK (1 << 17)
183#define OMAP24XX_AUTO_MCBSP2_MASK (1 << 16)
184#define OMAP24XX_AUTO_MCBSP1_MASK (1 << 15)
185#define OMAP24XX_AUTO_GPT12_MASK (1 << 14)
186#define OMAP24XX_AUTO_GPT11_MASK (1 << 13)
187#define OMAP24XX_AUTO_GPT10_MASK (1 << 12)
188#define OMAP24XX_AUTO_GPT9_MASK (1 << 11)
189#define OMAP24XX_AUTO_GPT8_MASK (1 << 10)
190#define OMAP24XX_AUTO_GPT7_MASK (1 << 9)
191#define OMAP24XX_AUTO_GPT6_MASK (1 << 8)
192#define OMAP24XX_AUTO_GPT5_MASK (1 << 7)
193#define OMAP24XX_AUTO_GPT4_MASK (1 << 6)
194#define OMAP24XX_AUTO_GPT3_MASK (1 << 5)
195#define OMAP24XX_AUTO_GPT2_MASK (1 << 4)
196#define OMAP2420_AUTO_VLYNQ_MASK (1 << 3)
197#define OMAP24XX_AUTO_DSS_MASK (1 << 0)
198
199/* CM_AUTOIDLE2_CORE */
200#define OMAP2430_AUTO_MDM_INTC_MASK (1 << 11)
201#define OMAP2430_AUTO_GPIO5_MASK (1 << 10)
202#define OMAP2430_AUTO_MCSPI3_MASK (1 << 9)
203#define OMAP2430_AUTO_MMCHS2_MASK (1 << 8)
204#define OMAP2430_AUTO_MMCHS1_MASK (1 << 7)
205#define OMAP2430_AUTO_USBHS_MASK (1 << 6)
206#define OMAP2430_AUTO_MCBSP5_MASK (1 << 5)
207#define OMAP2430_AUTO_MCBSP4_MASK (1 << 4)
208#define OMAP2430_AUTO_MCBSP3_MASK (1 << 3)
209#define OMAP24XX_AUTO_UART3_MASK (1 << 2)
210#define OMAP24XX_AUTO_SSI_MASK (1 << 1)
211#define OMAP24XX_AUTO_USB_MASK (1 << 0)
212
213/* CM_AUTOIDLE3_CORE */
214#define OMAP24XX_AUTO_SDRC_SHIFT 2 64#define OMAP24XX_AUTO_SDRC_SHIFT 2
215#define OMAP24XX_AUTO_SDRC_MASK (1 << 2)
216#define OMAP24XX_AUTO_GPMC_SHIFT 1 65#define OMAP24XX_AUTO_GPMC_SHIFT 1
217#define OMAP24XX_AUTO_GPMC_MASK (1 << 1)
218#define OMAP24XX_AUTO_SDMA_SHIFT 0 66#define OMAP24XX_AUTO_SDMA_SHIFT 0
219#define OMAP24XX_AUTO_SDMA_MASK (1 << 0)
220
221/* CM_AUTOIDLE4_CORE */
222#define OMAP24XX_AUTO_PKA_MASK (1 << 4)
223#define OMAP24XX_AUTO_AES_MASK (1 << 3)
224#define OMAP24XX_AUTO_RNG_MASK (1 << 2)
225#define OMAP24XX_AUTO_SHA_MASK (1 << 1)
226#define OMAP24XX_AUTO_DES_MASK (1 << 0)
227
228/* CM_CLKSEL1_CORE */
229#define OMAP24XX_CLKSEL_USB_SHIFT 25
230#define OMAP24XX_CLKSEL_USB_MASK (0x7 << 25) 67#define OMAP24XX_CLKSEL_USB_MASK (0x7 << 25)
231#define OMAP24XX_CLKSEL_SSI_SHIFT 20
232#define OMAP24XX_CLKSEL_SSI_MASK (0x1f << 20) 68#define OMAP24XX_CLKSEL_SSI_MASK (0x1f << 20)
233#define OMAP2420_CLKSEL_VLYNQ_SHIFT 15
234#define OMAP2420_CLKSEL_VLYNQ_MASK (0x1f << 15) 69#define OMAP2420_CLKSEL_VLYNQ_MASK (0x1f << 15)
235#define OMAP24XX_CLKSEL_DSS2_SHIFT 13
236#define OMAP24XX_CLKSEL_DSS2_MASK (0x1 << 13) 70#define OMAP24XX_CLKSEL_DSS2_MASK (0x1 << 13)
237#define OMAP24XX_CLKSEL_DSS1_SHIFT 8
238#define OMAP24XX_CLKSEL_DSS1_MASK (0x1f << 8) 71#define OMAP24XX_CLKSEL_DSS1_MASK (0x1f << 8)
239#define OMAP24XX_CLKSEL_L4_SHIFT 5 72#define OMAP24XX_CLKSEL_L4_SHIFT 5
240#define OMAP24XX_CLKSEL_L4_MASK (0x3 << 5)
241#define OMAP24XX_CLKSEL_L4_WIDTH 2 73#define OMAP24XX_CLKSEL_L4_WIDTH 2
242#define OMAP24XX_CLKSEL_L3_SHIFT 0 74#define OMAP24XX_CLKSEL_L3_SHIFT 0
243#define OMAP24XX_CLKSEL_L3_MASK (0x1f << 0)
244#define OMAP24XX_CLKSEL_L3_WIDTH 5 75#define OMAP24XX_CLKSEL_L3_WIDTH 5
245
246/* CM_CLKSEL2_CORE */
247#define OMAP24XX_CLKSEL_GPT12_SHIFT 22
248#define OMAP24XX_CLKSEL_GPT12_MASK (0x3 << 22) 76#define OMAP24XX_CLKSEL_GPT12_MASK (0x3 << 22)
249#define OMAP24XX_CLKSEL_GPT11_SHIFT 20
250#define OMAP24XX_CLKSEL_GPT11_MASK (0x3 << 20) 77#define OMAP24XX_CLKSEL_GPT11_MASK (0x3 << 20)
251#define OMAP24XX_CLKSEL_GPT10_SHIFT 18
252#define OMAP24XX_CLKSEL_GPT10_MASK (0x3 << 18) 78#define OMAP24XX_CLKSEL_GPT10_MASK (0x3 << 18)
253#define OMAP24XX_CLKSEL_GPT9_SHIFT 16
254#define OMAP24XX_CLKSEL_GPT9_MASK (0x3 << 16) 79#define OMAP24XX_CLKSEL_GPT9_MASK (0x3 << 16)
255#define OMAP24XX_CLKSEL_GPT8_SHIFT 14
256#define OMAP24XX_CLKSEL_GPT8_MASK (0x3 << 14) 80#define OMAP24XX_CLKSEL_GPT8_MASK (0x3 << 14)
257#define OMAP24XX_CLKSEL_GPT7_SHIFT 12
258#define OMAP24XX_CLKSEL_GPT7_MASK (0x3 << 12) 81#define OMAP24XX_CLKSEL_GPT7_MASK (0x3 << 12)
259#define OMAP24XX_CLKSEL_GPT6_SHIFT 10
260#define OMAP24XX_CLKSEL_GPT6_MASK (0x3 << 10) 82#define OMAP24XX_CLKSEL_GPT6_MASK (0x3 << 10)
261#define OMAP24XX_CLKSEL_GPT5_SHIFT 8
262#define OMAP24XX_CLKSEL_GPT5_MASK (0x3 << 8) 83#define OMAP24XX_CLKSEL_GPT5_MASK (0x3 << 8)
263#define OMAP24XX_CLKSEL_GPT4_SHIFT 6
264#define OMAP24XX_CLKSEL_GPT4_MASK (0x3 << 6) 84#define OMAP24XX_CLKSEL_GPT4_MASK (0x3 << 6)
265#define OMAP24XX_CLKSEL_GPT3_SHIFT 4
266#define OMAP24XX_CLKSEL_GPT3_MASK (0x3 << 4) 85#define OMAP24XX_CLKSEL_GPT3_MASK (0x3 << 4)
267#define OMAP24XX_CLKSEL_GPT2_SHIFT 2
268#define OMAP24XX_CLKSEL_GPT2_MASK (0x3 << 2) 86#define OMAP24XX_CLKSEL_GPT2_MASK (0x3 << 2)
269
270/* CM_CLKSTCTRL_CORE */
271#define OMAP24XX_AUTOSTATE_DSS_SHIFT 2
272#define OMAP24XX_AUTOSTATE_DSS_MASK (1 << 2) 87#define OMAP24XX_AUTOSTATE_DSS_MASK (1 << 2)
273#define OMAP24XX_AUTOSTATE_L4_SHIFT 1
274#define OMAP24XX_AUTOSTATE_L4_MASK (1 << 1) 88#define OMAP24XX_AUTOSTATE_L4_MASK (1 << 1)
275#define OMAP24XX_AUTOSTATE_L3_SHIFT 0
276#define OMAP24XX_AUTOSTATE_L3_MASK (1 << 0) 89#define OMAP24XX_AUTOSTATE_L3_MASK (1 << 0)
277
278/* CM_FCLKEN_GFX */
279#define OMAP24XX_EN_3D_SHIFT 2 90#define OMAP24XX_EN_3D_SHIFT 2
280#define OMAP24XX_EN_3D_MASK (1 << 2)
281#define OMAP24XX_EN_2D_SHIFT 1 91#define OMAP24XX_EN_2D_SHIFT 1
282#define OMAP24XX_EN_2D_MASK (1 << 1)
283
284/* CM_ICLKEN_GFX specific bits */
285
286/* CM_IDLEST_GFX specific bits */
287
288/* CM_CLKSEL_GFX specific bits */
289
290/* CM_CLKSTCTRL_GFX */
291#define OMAP24XX_AUTOSTATE_GFX_SHIFT 0
292#define OMAP24XX_AUTOSTATE_GFX_MASK (1 << 0) 92#define OMAP24XX_AUTOSTATE_GFX_MASK (1 << 0)
293
294/* CM_FCLKEN_WKUP specific bits */
295
296/* CM_ICLKEN_WKUP specific bits */
297#define OMAP2430_EN_ICR_SHIFT 6 93#define OMAP2430_EN_ICR_SHIFT 6
298#define OMAP2430_EN_ICR_MASK (1 << 6)
299#define OMAP24XX_EN_OMAPCTRL_SHIFT 5 94#define OMAP24XX_EN_OMAPCTRL_SHIFT 5
300#define OMAP24XX_EN_OMAPCTRL_MASK (1 << 5)
301#define OMAP24XX_EN_WDT1_SHIFT 4 95#define OMAP24XX_EN_WDT1_SHIFT 4
302#define OMAP24XX_EN_WDT1_MASK (1 << 4)
303#define OMAP24XX_EN_32KSYNC_SHIFT 1 96#define OMAP24XX_EN_32KSYNC_SHIFT 1
304#define OMAP24XX_EN_32KSYNC_MASK (1 << 1)
305
306/* CM_IDLEST_WKUP specific bits */
307#define OMAP2430_ST_ICR_SHIFT 6
308#define OMAP2430_ST_ICR_MASK (1 << 6)
309#define OMAP24XX_ST_OMAPCTRL_SHIFT 5
310#define OMAP24XX_ST_OMAPCTRL_MASK (1 << 5)
311#define OMAP24XX_ST_WDT1_SHIFT 4
312#define OMAP24XX_ST_WDT1_MASK (1 << 4)
313#define OMAP24XX_ST_MPU_WDT_SHIFT 3 97#define OMAP24XX_ST_MPU_WDT_SHIFT 3
314#define OMAP24XX_ST_MPU_WDT_MASK (1 << 3)
315#define OMAP24XX_ST_32KSYNC_SHIFT 1 98#define OMAP24XX_ST_32KSYNC_SHIFT 1
316#define OMAP24XX_ST_32KSYNC_MASK (1 << 1)
317
318/* CM_AUTOIDLE_WKUP */
319#define OMAP24XX_AUTO_OMAPCTRL_MASK (1 << 5)
320#define OMAP24XX_AUTO_WDT1_MASK (1 << 4)
321#define OMAP24XX_AUTO_MPU_WDT_MASK (1 << 3)
322#define OMAP24XX_AUTO_GPIOS_MASK (1 << 2)
323#define OMAP24XX_AUTO_32KSYNC_MASK (1 << 1)
324#define OMAP24XX_AUTO_GPT1_MASK (1 << 0)
325
326/* CM_CLKSEL_WKUP */
327#define OMAP24XX_CLKSEL_GPT1_SHIFT 0
328#define OMAP24XX_CLKSEL_GPT1_MASK (0x3 << 0) 99#define OMAP24XX_CLKSEL_GPT1_MASK (0x3 << 0)
329
330/* CM_CLKEN_PLL */
331#define OMAP24XX_EN_54M_PLL_SHIFT 6 100#define OMAP24XX_EN_54M_PLL_SHIFT 6
332#define OMAP24XX_EN_54M_PLL_MASK (0x3 << 6)
333#define OMAP24XX_EN_96M_PLL_SHIFT 2 101#define OMAP24XX_EN_96M_PLL_SHIFT 2
334#define OMAP24XX_EN_96M_PLL_MASK (0x3 << 2)
335#define OMAP24XX_EN_DPLL_SHIFT 0
336#define OMAP24XX_EN_DPLL_MASK (0x3 << 0) 102#define OMAP24XX_EN_DPLL_MASK (0x3 << 0)
337
338/* CM_IDLEST_CKGEN */
339#define OMAP24XX_ST_54M_APLL_SHIFT 9 103#define OMAP24XX_ST_54M_APLL_SHIFT 9
340#define OMAP24XX_ST_54M_APLL_MASK (1 << 9)
341#define OMAP24XX_ST_96M_APLL_SHIFT 8 104#define OMAP24XX_ST_96M_APLL_SHIFT 8
342#define OMAP24XX_ST_96M_APLL_MASK (1 << 8)
343#define OMAP24XX_ST_54M_CLK_MASK (1 << 6)
344#define OMAP24XX_ST_12M_CLK_MASK (1 << 5)
345#define OMAP24XX_ST_48M_CLK_MASK (1 << 4)
346#define OMAP24XX_ST_96M_CLK_MASK (1 << 2)
347#define OMAP24XX_ST_CORE_CLK_SHIFT 0
348#define OMAP24XX_ST_CORE_CLK_MASK (0x3 << 0)
349
350/* CM_AUTOIDLE_PLL */
351#define OMAP24XX_AUTO_54M_SHIFT 6
352#define OMAP24XX_AUTO_54M_MASK (0x3 << 6) 105#define OMAP24XX_AUTO_54M_MASK (0x3 << 6)
353#define OMAP24XX_AUTO_96M_SHIFT 2
354#define OMAP24XX_AUTO_96M_MASK (0x3 << 2) 106#define OMAP24XX_AUTO_96M_MASK (0x3 << 2)
355#define OMAP24XX_AUTO_DPLL_SHIFT 0 107#define OMAP24XX_AUTO_DPLL_SHIFT 0
356#define OMAP24XX_AUTO_DPLL_MASK (0x3 << 0) 108#define OMAP24XX_AUTO_DPLL_MASK (0x3 << 0)
357
358/* CM_CLKSEL1_PLL */
359#define OMAP2430_MAXDPLLFASTLOCK_SHIFT 28
360#define OMAP2430_MAXDPLLFASTLOCK_MASK (0x7 << 28)
361#define OMAP24XX_APLLS_CLKIN_SHIFT 23 109#define OMAP24XX_APLLS_CLKIN_SHIFT 23
362#define OMAP24XX_APLLS_CLKIN_MASK (0x7 << 23) 110#define OMAP24XX_APLLS_CLKIN_MASK (0x7 << 23)
363#define OMAP24XX_DPLL_MULT_SHIFT 12
364#define OMAP24XX_DPLL_MULT_MASK (0x3ff << 12) 111#define OMAP24XX_DPLL_MULT_MASK (0x3ff << 12)
365#define OMAP24XX_DPLL_DIV_SHIFT 8
366#define OMAP24XX_DPLL_DIV_MASK (0xf << 8) 112#define OMAP24XX_DPLL_DIV_MASK (0xf << 8)
367#define OMAP24XX_54M_SOURCE_SHIFT 5 113#define OMAP24XX_54M_SOURCE_SHIFT 5
368#define OMAP24XX_54M_SOURCE_MASK (1 << 5)
369#define OMAP24XX_54M_SOURCE_WIDTH 1 114#define OMAP24XX_54M_SOURCE_WIDTH 1
370#define OMAP2430_96M_SOURCE_SHIFT 4 115#define OMAP2430_96M_SOURCE_SHIFT 4
371#define OMAP2430_96M_SOURCE_MASK (1 << 4)
372#define OMAP2430_96M_SOURCE_WIDTH 1 116#define OMAP2430_96M_SOURCE_WIDTH 1
373#define OMAP24XX_48M_SOURCE_SHIFT 3
374#define OMAP24XX_48M_SOURCE_MASK (1 << 3) 117#define OMAP24XX_48M_SOURCE_MASK (1 << 3)
375#define OMAP2430_ALTCLK_SOURCE_SHIFT 0
376#define OMAP2430_ALTCLK_SOURCE_MASK (0x7 << 0)
377
378/* CM_CLKSEL2_PLL */
379#define OMAP24XX_CORE_CLK_SRC_SHIFT 0
380#define OMAP24XX_CORE_CLK_SRC_MASK (0x3 << 0) 118#define OMAP24XX_CORE_CLK_SRC_MASK (0x3 << 0)
381
382/* CM_FCLKEN_DSP */
383#define OMAP2420_EN_IVA_COP_SHIFT 10 119#define OMAP2420_EN_IVA_COP_SHIFT 10
384#define OMAP2420_EN_IVA_COP_MASK (1 << 10)
385#define OMAP2420_EN_IVA_MPU_SHIFT 8 120#define OMAP2420_EN_IVA_MPU_SHIFT 8
386#define OMAP2420_EN_IVA_MPU_MASK (1 << 8)
387#define OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT 0 121#define OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT 0
388#define OMAP24XX_CM_FCLKEN_DSP_EN_DSP_MASK (1 << 0)
389
390/* CM_ICLKEN_DSP */
391#define OMAP2420_EN_DSP_IPI_SHIFT 1 122#define OMAP2420_EN_DSP_IPI_SHIFT 1
392#define OMAP2420_EN_DSP_IPI_MASK (1 << 1)
393
394/* CM_IDLEST_DSP */
395#define OMAP2420_ST_IVA_MASK (1 << 8)
396#define OMAP2420_ST_IPI_MASK (1 << 1)
397#define OMAP24XX_ST_DSP_MASK (1 << 0)
398
399/* CM_AUTOIDLE_DSP */
400#define OMAP2420_AUTO_DSP_IPI_MASK (1 << 1)
401
402/* CM_CLKSEL_DSP */
403#define OMAP2420_SYNC_IVA_MASK (1 << 13)
404#define OMAP2420_CLKSEL_IVA_SHIFT 8
405#define OMAP2420_CLKSEL_IVA_MASK (0x1f << 8) 123#define OMAP2420_CLKSEL_IVA_MASK (0x1f << 8)
406#define OMAP24XX_SYNC_DSP_MASK (1 << 7)
407#define OMAP24XX_CLKSEL_DSP_IF_SHIFT 5
408#define OMAP24XX_CLKSEL_DSP_IF_MASK (0x3 << 5) 124#define OMAP24XX_CLKSEL_DSP_IF_MASK (0x3 << 5)
409#define OMAP24XX_CLKSEL_DSP_SHIFT 0
410#define OMAP24XX_CLKSEL_DSP_MASK (0x1f << 0) 125#define OMAP24XX_CLKSEL_DSP_MASK (0x1f << 0)
411
412/* CM_CLKSTCTRL_DSP */
413#define OMAP2420_AUTOSTATE_IVA_SHIFT 8
414#define OMAP2420_AUTOSTATE_IVA_MASK (1 << 8) 126#define OMAP2420_AUTOSTATE_IVA_MASK (1 << 8)
415#define OMAP24XX_AUTOSTATE_DSP_SHIFT 0
416#define OMAP24XX_AUTOSTATE_DSP_MASK (1 << 0) 127#define OMAP24XX_AUTOSTATE_DSP_MASK (1 << 0)
417
418/* CM_FCLKEN_MDM */
419/* 2430 only */
420#define OMAP2430_EN_OSC_SHIFT 1 128#define OMAP2430_EN_OSC_SHIFT 1
421#define OMAP2430_EN_OSC_MASK (1 << 1)
422
423/* CM_ICLKEN_MDM */
424/* 2430 only */
425#define OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT 0 129#define OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT 0
426#define OMAP2430_CM_ICLKEN_MDM_EN_MDM_MASK (1 << 0)
427
428/* CM_IDLEST_MDM specific bits */
429/* 2430 only */
430
431/* CM_AUTOIDLE_MDM */
432/* 2430 only */
433#define OMAP2430_AUTO_OSC_MASK (1 << 1)
434#define OMAP2430_AUTO_MDM_MASK (1 << 0)
435
436/* CM_CLKSEL_MDM */
437/* 2430 only */
438#define OMAP2430_SYNC_MDM_MASK (1 << 4)
439#define OMAP2430_CLKSEL_MDM_SHIFT 0
440#define OMAP2430_CLKSEL_MDM_MASK (0xf << 0) 130#define OMAP2430_CLKSEL_MDM_MASK (0xf << 0)
441
442/* CM_CLKSTCTRL_MDM */
443/* 2430 only */
444#define OMAP2430_AUTOSTATE_MDM_SHIFT 0
445#define OMAP2430_AUTOSTATE_MDM_MASK (1 << 0) 131#define OMAP2430_AUTOSTATE_MDM_MASK (1 << 0)
446
447/* OMAP24XX CM_CLKSTCTRL_*.AUTOSTATE_* register bit values */
448#define OMAP24XX_CLKSTCTRL_DISABLE_AUTO 0x0 132#define OMAP24XX_CLKSTCTRL_DISABLE_AUTO 0x0
449#define OMAP24XX_CLKSTCTRL_ENABLE_AUTO 0x1 133#define OMAP24XX_CLKSTCTRL_ENABLE_AUTO 0x1
450
451
452#endif 134#endif
diff --git a/arch/arm/mach-omap2/cm-regbits-33xx.h b/arch/arm/mach-omap2/cm-regbits-33xx.h
index adf7bb79b18f..c0823fd6d5e0 100644
--- a/arch/arm/mach-omap2/cm-regbits-33xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-33xx.h
@@ -20,798 +20,49 @@
20#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_33XX_H 20#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_33XX_H
21#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_33XX_H 21#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_33XX_H
22 22
23/*
24 * Used by CM_AUTOIDLE_DPLL_CORE, CM_AUTOIDLE_DPLL_DDR, CM_AUTOIDLE_DPLL_DISP,
25 * CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER
26 */
27#define AM33XX_AUTO_DPLL_MODE_SHIFT 0
28#define AM33XX_AUTO_DPLL_MODE_WIDTH 3
29#define AM33XX_AUTO_DPLL_MODE_MASK (0x7 << 0)
30
31/* Used by CM_WKUP_CLKSTCTRL */
32#define AM33XX_CLKACTIVITY_ADC_FCLK_SHIFT 14
33#define AM33XX_CLKACTIVITY_ADC_FCLK_WIDTH 1
34#define AM33XX_CLKACTIVITY_ADC_FCLK_MASK (1 << 16)
35
36/* Used by CM_PER_L4LS_CLKSTCTRL */
37#define AM33XX_CLKACTIVITY_CAN_CLK_SHIFT 11
38#define AM33XX_CLKACTIVITY_CAN_CLK_WIDTH 1
39#define AM33XX_CLKACTIVITY_CAN_CLK_MASK (1 << 11)
40
41/* Used by CM_PER_CLK_24MHZ_CLKSTCTRL */
42#define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_SHIFT 4
43#define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_WIDTH 1
44#define AM33XX_CLKACTIVITY_CLK_24MHZ_GCLK_MASK (1 << 4)
45
46/* Used by CM_PER_CPSW_CLKSTCTRL */
47#define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_SHIFT 4
48#define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_WIDTH 1
49#define AM33XX_CLKACTIVITY_CPSW_125MHZ_GCLK_MASK (1 << 4)
50
51/* Used by CM_PER_L4HS_CLKSTCTRL */
52#define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_SHIFT 4
53#define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_WIDTH 1
54#define AM33XX_CLKACTIVITY_CPSW_250MHZ_GCLK_MASK (1 << 4)
55
56/* Used by CM_PER_L4HS_CLKSTCTRL */
57#define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_SHIFT 5
58#define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_WIDTH 1
59#define AM33XX_CLKACTIVITY_CPSW_50MHZ_GCLK_MASK (1 << 5)
60
61/* Used by CM_PER_L4HS_CLKSTCTRL */
62#define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_SHIFT 6
63#define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_WIDTH 1
64#define AM33XX_CLKACTIVITY_CPSW_5MHZ_GCLK_MASK (1 << 6)
65
66/* Used by CM_PER_L3_CLKSTCTRL */
67#define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_SHIFT 6
68#define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_WIDTH 1
69#define AM33XX_CLKACTIVITY_CPTS_RFT_GCLK_MASK (1 << 6)
70
71/* Used by CM_CEFUSE_CLKSTCTRL */
72#define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9
73#define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_WIDTH 1
74#define AM33XX_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9)
75
76/* Used by CM_L3_AON_CLKSTCTRL */
77#define AM33XX_CLKACTIVITY_DBGSYSCLK_SHIFT 2
78#define AM33XX_CLKACTIVITY_DBGSYSCLK_WIDTH 1
79#define AM33XX_CLKACTIVITY_DBGSYSCLK_MASK (1 << 2)
80
81/* Used by CM_L3_AON_CLKSTCTRL */
82#define AM33XX_CLKACTIVITY_DEBUG_CLKA_SHIFT 4
83#define AM33XX_CLKACTIVITY_DEBUG_CLKA_WIDTH 1
84#define AM33XX_CLKACTIVITY_DEBUG_CLKA_MASK (1 << 4)
85
86/* Used by CM_PER_L3_CLKSTCTRL */
87#define AM33XX_CLKACTIVITY_EMIF_GCLK_SHIFT 2
88#define AM33XX_CLKACTIVITY_EMIF_GCLK_WIDTH 1
89#define AM33XX_CLKACTIVITY_EMIF_GCLK_MASK (1 << 2)
90
91/* Used by CM_GFX_L3_CLKSTCTRL */
92#define AM33XX_CLKACTIVITY_GFX_FCLK_SHIFT 9
93#define AM33XX_CLKACTIVITY_GFX_FCLK_WIDTH 1
94#define AM33XX_CLKACTIVITY_GFX_FCLK_MASK (1 << 9)
95
96/* Used by CM_GFX_L3_CLKSTCTRL */
97#define AM33XX_CLKACTIVITY_GFX_L3_GCLK_SHIFT 8
98#define AM33XX_CLKACTIVITY_GFX_L3_GCLK_WIDTH 1
99#define AM33XX_CLKACTIVITY_GFX_L3_GCLK_MASK (1 << 8)
100
101/* Used by CM_WKUP_CLKSTCTRL */
102#define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_SHIFT 8
103#define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_WIDTH 1
104#define AM33XX_CLKACTIVITY_GPIO0_GDBCLK_MASK (1 << 8)
105
106/* Used by CM_PER_L4LS_CLKSTCTRL */
107#define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_SHIFT 19
108#define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_WIDTH 1
109#define AM33XX_CLKACTIVITY_GPIO_1_GDBCLK_MASK (1 << 19)
110
111/* Used by CM_PER_L4LS_CLKSTCTRL */
112#define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_SHIFT 20
113#define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_WIDTH 1
114#define AM33XX_CLKACTIVITY_GPIO_2_GDBCLK_MASK (1 << 20)
115
116/* Used by CM_PER_L4LS_CLKSTCTRL */
117#define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_SHIFT 21
118#define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_WIDTH 1
119#define AM33XX_CLKACTIVITY_GPIO_3_GDBCLK_MASK (1 << 21)
120
121/* Used by CM_PER_L4LS_CLKSTCTRL */
122#define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_SHIFT 22
123#define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_WIDTH 1
124#define AM33XX_CLKACTIVITY_GPIO_4_GDBCLK_MASK (1 << 22)
125
126/* Used by CM_PER_L4LS_CLKSTCTRL */
127#define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_SHIFT 26
128#define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_WIDTH 1
129#define AM33XX_CLKACTIVITY_GPIO_5_GDBCLK_MASK (1 << 26)
130
131/* Used by CM_PER_L4LS_CLKSTCTRL */
132#define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_SHIFT 18
133#define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_WIDTH 1
134#define AM33XX_CLKACTIVITY_GPIO_6_GDBCLK_MASK (1 << 18)
135
136/* Used by CM_WKUP_CLKSTCTRL */
137#define AM33XX_CLKACTIVITY_I2C0_GFCLK_SHIFT 11
138#define AM33XX_CLKACTIVITY_I2C0_GFCLK_WIDTH 1
139#define AM33XX_CLKACTIVITY_I2C0_GFCLK_MASK (1 << 11)
140
141/* Used by CM_PER_L4LS_CLKSTCTRL */
142#define AM33XX_CLKACTIVITY_I2C_FCLK_SHIFT 24
143#define AM33XX_CLKACTIVITY_I2C_FCLK_WIDTH 1
144#define AM33XX_CLKACTIVITY_I2C_FCLK_MASK (1 << 24)
145
146/* Used by CM_PER_PRUSS_CLKSTCTRL */
147#define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_SHIFT 5
148#define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_WIDTH 1
149#define AM33XX_CLKACTIVITY_PRUSS_IEP_GCLK_MASK (1 << 5)
150
151/* Used by CM_PER_PRUSS_CLKSTCTRL */
152#define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_SHIFT 4
153#define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_WIDTH 1
154#define AM33XX_CLKACTIVITY_PRUSS_OCP_GCLK_MASK (1 << 4)
155
156/* Used by CM_PER_PRUSS_CLKSTCTRL */
157#define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_SHIFT 6
158#define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_WIDTH 1
159#define AM33XX_CLKACTIVITY_PRUSS_UART_GCLK_MASK (1 << 6)
160
161/* Used by CM_PER_L3S_CLKSTCTRL */
162#define AM33XX_CLKACTIVITY_L3S_GCLK_SHIFT 3
163#define AM33XX_CLKACTIVITY_L3S_GCLK_WIDTH 1
164#define AM33XX_CLKACTIVITY_L3S_GCLK_MASK (1 << 3)
165
166/* Used by CM_L3_AON_CLKSTCTRL */
167#define AM33XX_CLKACTIVITY_L3_AON_GCLK_SHIFT 3
168#define AM33XX_CLKACTIVITY_L3_AON_GCLK_WIDTH 1
169#define AM33XX_CLKACTIVITY_L3_AON_GCLK_MASK (1 << 3)
170
171/* Used by CM_PER_L3_CLKSTCTRL */
172#define AM33XX_CLKACTIVITY_L3_GCLK_SHIFT 4
173#define AM33XX_CLKACTIVITY_L3_GCLK_WIDTH 1
174#define AM33XX_CLKACTIVITY_L3_GCLK_MASK (1 << 4)
175
176/* Used by CM_PER_L4FW_CLKSTCTRL */
177#define AM33XX_CLKACTIVITY_L4FW_GCLK_SHIFT 8
178#define AM33XX_CLKACTIVITY_L4FW_GCLK_WIDTH 1
179#define AM33XX_CLKACTIVITY_L4FW_GCLK_MASK (1 << 8)
180
181/* Used by CM_PER_L4HS_CLKSTCTRL */
182#define AM33XX_CLKACTIVITY_L4HS_GCLK_SHIFT 3
183#define AM33XX_CLKACTIVITY_L4HS_GCLK_WIDTH 1
184#define AM33XX_CLKACTIVITY_L4HS_GCLK_MASK (1 << 3)
185
186/* Used by CM_PER_L4LS_CLKSTCTRL */
187#define AM33XX_CLKACTIVITY_L4LS_GCLK_SHIFT 8
188#define AM33XX_CLKACTIVITY_L4LS_GCLK_WIDTH 1
189#define AM33XX_CLKACTIVITY_L4LS_GCLK_MASK (1 << 8)
190
191/* Used by CM_GFX_L4LS_GFX_CLKSTCTRL__1 */
192#define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_SHIFT 8
193#define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_WIDTH 1
194#define AM33XX_CLKACTIVITY_L4LS_GFX_GCLK_MASK (1 << 8)
195
196/* Used by CM_CEFUSE_CLKSTCTRL */
197#define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8
198#define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_WIDTH 1
199#define AM33XX_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8)
200
201/* Used by CM_RTC_CLKSTCTRL */
202#define AM33XX_CLKACTIVITY_L4_RTC_GCLK_SHIFT 8
203#define AM33XX_CLKACTIVITY_L4_RTC_GCLK_WIDTH 1
204#define AM33XX_CLKACTIVITY_L4_RTC_GCLK_MASK (1 << 8)
205
206/* Used by CM_L4_WKUP_AON_CLKSTCTRL */
207#define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_SHIFT 2
208#define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_WIDTH 1
209#define AM33XX_CLKACTIVITY_L4_WKUP_AON_GCLK_MASK (1 << 2)
210
211/* Used by CM_WKUP_CLKSTCTRL */
212#define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_SHIFT 2
213#define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_WIDTH 1
214#define AM33XX_CLKACTIVITY_L4_WKUP_GCLK_MASK (1 << 2)
215
216/* Used by CM_PER_L4LS_CLKSTCTRL */
217#define AM33XX_CLKACTIVITY_LCDC_GCLK_SHIFT 17
218#define AM33XX_CLKACTIVITY_LCDC_GCLK_WIDTH 1
219#define AM33XX_CLKACTIVITY_LCDC_GCLK_MASK (1 << 17)
220
221/* Used by CM_PER_LCDC_CLKSTCTRL */
222#define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_SHIFT 4
223#define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_WIDTH 1
224#define AM33XX_CLKACTIVITY_LCDC_L3_OCP_GCLK_MASK (1 << 4)
225
226/* Used by CM_PER_LCDC_CLKSTCTRL */
227#define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_SHIFT 5
228#define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_WIDTH 1
229#define AM33XX_CLKACTIVITY_LCDC_L4_OCP_GCLK_MASK (1 << 5)
230
231/* Used by CM_PER_L3_CLKSTCTRL */
232#define AM33XX_CLKACTIVITY_MCASP_GCLK_SHIFT 7
233#define AM33XX_CLKACTIVITY_MCASP_GCLK_WIDTH 1
234#define AM33XX_CLKACTIVITY_MCASP_GCLK_MASK (1 << 7)
235
236/* Used by CM_PER_L3_CLKSTCTRL */
237#define AM33XX_CLKACTIVITY_MMC_FCLK_SHIFT 3
238#define AM33XX_CLKACTIVITY_MMC_FCLK_WIDTH 1
239#define AM33XX_CLKACTIVITY_MMC_FCLK_MASK (1 << 3)
240
241/* Used by CM_MPU_CLKSTCTRL */
242#define AM33XX_CLKACTIVITY_MPU_CLK_SHIFT 2
243#define AM33XX_CLKACTIVITY_MPU_CLK_WIDTH 1
244#define AM33XX_CLKACTIVITY_MPU_CLK_MASK (1 << 2)
245
246/* Used by CM_PER_OCPWP_L3_CLKSTCTRL */
247#define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_SHIFT 4
248#define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_WIDTH 1
249#define AM33XX_CLKACTIVITY_OCPWP_L3_GCLK_MASK (1 << 4)
250
251/* Used by CM_PER_OCPWP_L3_CLKSTCTRL */
252#define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_SHIFT 5
253#define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_WIDTH 1
254#define AM33XX_CLKACTIVITY_OCPWP_L4_GCLK_MASK (1 << 5)
255
256/* Used by CM_RTC_CLKSTCTRL */
257#define AM33XX_CLKACTIVITY_RTC_32KCLK_SHIFT 9
258#define AM33XX_CLKACTIVITY_RTC_32KCLK_WIDTH 1
259#define AM33XX_CLKACTIVITY_RTC_32KCLK_MASK (1 << 9)
260
261/* Used by CM_PER_L4LS_CLKSTCTRL */
262#define AM33XX_CLKACTIVITY_SPI_GCLK_SHIFT 25
263#define AM33XX_CLKACTIVITY_SPI_GCLK_WIDTH 1
264#define AM33XX_CLKACTIVITY_SPI_GCLK_MASK (1 << 25)
265
266/* Used by CM_WKUP_CLKSTCTRL */
267#define AM33XX_CLKACTIVITY_SR_SYSCLK_SHIFT 3
268#define AM33XX_CLKACTIVITY_SR_SYSCLK_WIDTH 1
269#define AM33XX_CLKACTIVITY_SR_SYSCLK_MASK (1 << 3)
270
271/* Used by CM_WKUP_CLKSTCTRL */
272#define AM33XX_CLKACTIVITY_TIMER0_GCLK_SHIFT 10
273#define AM33XX_CLKACTIVITY_TIMER0_GCLK_WIDTH 1
274#define AM33XX_CLKACTIVITY_TIMER0_GCLK_MASK (1 << 10)
275
276/* Used by CM_WKUP_CLKSTCTRL */
277#define AM33XX_CLKACTIVITY_TIMER1_GCLK_SHIFT 13
278#define AM33XX_CLKACTIVITY_TIMER1_GCLK_WIDTH 1
279#define AM33XX_CLKACTIVITY_TIMER1_GCLK_MASK (1 << 13)
280
281/* Used by CM_PER_L4LS_CLKSTCTRL */
282#define AM33XX_CLKACTIVITY_TIMER2_GCLK_SHIFT 14
283#define AM33XX_CLKACTIVITY_TIMER2_GCLK_WIDTH 1
284#define AM33XX_CLKACTIVITY_TIMER2_GCLK_MASK (1 << 14)
285
286/* Used by CM_PER_L4LS_CLKSTCTRL */
287#define AM33XX_CLKACTIVITY_TIMER3_GCLK_SHIFT 15
288#define AM33XX_CLKACTIVITY_TIMER3_GCLK_WIDTH 1
289#define AM33XX_CLKACTIVITY_TIMER3_GCLK_MASK (1 << 15)
290
291/* Used by CM_PER_L4LS_CLKSTCTRL */
292#define AM33XX_CLKACTIVITY_TIMER4_GCLK_SHIFT 16
293#define AM33XX_CLKACTIVITY_TIMER4_GCLK_WIDTH 1
294#define AM33XX_CLKACTIVITY_TIMER4_GCLK_MASK (1 << 16)
295
296/* Used by CM_PER_L4LS_CLKSTCTRL */
297#define AM33XX_CLKACTIVITY_TIMER5_GCLK_SHIFT 27
298#define AM33XX_CLKACTIVITY_TIMER5_GCLK_WIDTH 1
299#define AM33XX_CLKACTIVITY_TIMER5_GCLK_MASK (1 << 27)
300
301/* Used by CM_PER_L4LS_CLKSTCTRL */
302#define AM33XX_CLKACTIVITY_TIMER6_GCLK_SHIFT 28
303#define AM33XX_CLKACTIVITY_TIMER6_GCLK_WIDTH 1
304#define AM33XX_CLKACTIVITY_TIMER6_GCLK_MASK (1 << 28)
305
306/* Used by CM_PER_L4LS_CLKSTCTRL */
307#define AM33XX_CLKACTIVITY_TIMER7_GCLK_SHIFT 13
308#define AM33XX_CLKACTIVITY_TIMER7_GCLK_WIDTH 1
309#define AM33XX_CLKACTIVITY_TIMER7_GCLK_MASK (1 << 13)
310
311/* Used by CM_WKUP_CLKSTCTRL */
312#define AM33XX_CLKACTIVITY_UART0_GFCLK_SHIFT 12
313#define AM33XX_CLKACTIVITY_UART0_GFCLK_WIDTH 1
314#define AM33XX_CLKACTIVITY_UART0_GFCLK_MASK (1 << 12)
315
316/* Used by CM_PER_L4LS_CLKSTCTRL */
317#define AM33XX_CLKACTIVITY_UART_GFCLK_SHIFT 10
318#define AM33XX_CLKACTIVITY_UART_GFCLK_WIDTH 1
319#define AM33XX_CLKACTIVITY_UART_GFCLK_MASK (1 << 10)
320
321/* Used by CM_WKUP_CLKSTCTRL */
322#define AM33XX_CLKACTIVITY_WDT0_GCLK_SHIFT 9
323#define AM33XX_CLKACTIVITY_WDT0_GCLK_WIDTH 1
324#define AM33XX_CLKACTIVITY_WDT0_GCLK_MASK (1 << 9)
325
326/* Used by CM_WKUP_CLKSTCTRL */
327#define AM33XX_CLKACTIVITY_WDT1_GCLK_SHIFT 4
328#define AM33XX_CLKACTIVITY_WDT1_GCLK_WIDTH 1
329#define AM33XX_CLKACTIVITY_WDT1_GCLK_MASK (1 << 4)
330
331/* Used by CLKSEL_GFX_FCLK */
332#define AM33XX_CLKDIV_SEL_GFX_FCLK_SHIFT 0
333#define AM33XX_CLKDIV_SEL_GFX_FCLK_WIDTH 1
334#define AM33XX_CLKDIV_SEL_GFX_FCLK_MASK (1 << 0)
335
336/* Used by CM_CLKOUT_CTRL */
337#define AM33XX_CLKOUT2DIV_SHIFT 3 23#define AM33XX_CLKOUT2DIV_SHIFT 3
338#define AM33XX_CLKOUT2DIV_WIDTH 3 24#define AM33XX_CLKOUT2DIV_WIDTH 3
339#define AM33XX_CLKOUT2DIV_MASK (0x7 << 3)
340
341/* Used by CM_CLKOUT_CTRL */
342#define AM33XX_CLKOUT2EN_SHIFT 7 25#define AM33XX_CLKOUT2EN_SHIFT 7
343#define AM33XX_CLKOUT2EN_WIDTH 1
344#define AM33XX_CLKOUT2EN_MASK (1 << 7)
345
346/* Used by CM_CLKOUT_CTRL */
347#define AM33XX_CLKOUT2SOURCE_SHIFT 0
348#define AM33XX_CLKOUT2SOURCE_WIDTH 3
349#define AM33XX_CLKOUT2SOURCE_MASK (0x7 << 0) 26#define AM33XX_CLKOUT2SOURCE_MASK (0x7 << 0)
350
351/*
352 * Used by CLKSEL_GPIO0_DBCLK, CLKSEL_LCDC_PIXEL_CLK, CLKSEL_TIMER2_CLK,
353 * CLKSEL_TIMER3_CLK, CLKSEL_TIMER4_CLK, CLKSEL_TIMER5_CLK, CLKSEL_TIMER6_CLK,
354 * CLKSEL_TIMER7_CLK
355 */
356#define AM33XX_CLKSEL_SHIFT 0
357#define AM33XX_CLKSEL_WIDTH 1
358#define AM33XX_CLKSEL_MASK (0x01 << 0)
359
360/*
361 * Renamed from CLKSEL Used by CLKSEL_PRUSS_OCP_CLK, CLKSEL_WDT1_CLK,
362 * CM_CPTS_RFT_CLKSEL
363 */
364#define AM33XX_CLKSEL_0_0_SHIFT 0 27#define AM33XX_CLKSEL_0_0_SHIFT 0
365#define AM33XX_CLKSEL_0_0_WIDTH 1 28#define AM33XX_CLKSEL_0_0_WIDTH 1
366#define AM33XX_CLKSEL_0_0_MASK (1 << 0) 29#define AM33XX_CLKSEL_0_0_MASK (1 << 0)
367
368#define AM33XX_CLKSEL_0_1_SHIFT 0
369#define AM33XX_CLKSEL_0_1_WIDTH 2
370#define AM33XX_CLKSEL_0_1_MASK (3 << 0) 30#define AM33XX_CLKSEL_0_1_MASK (3 << 0)
371
372/* Renamed from CLKSEL Used by CLKSEL_TIMER1MS_CLK */
373#define AM33XX_CLKSEL_0_2_SHIFT 0
374#define AM33XX_CLKSEL_0_2_WIDTH 3
375#define AM33XX_CLKSEL_0_2_MASK (7 << 0) 31#define AM33XX_CLKSEL_0_2_MASK (7 << 0)
376
377/* Used by CLKSEL_GFX_FCLK */
378#define AM33XX_CLKSEL_GFX_FCLK_SHIFT 1
379#define AM33XX_CLKSEL_GFX_FCLK_WIDTH 1
380#define AM33XX_CLKSEL_GFX_FCLK_MASK (1 << 1) 32#define AM33XX_CLKSEL_GFX_FCLK_MASK (1 << 1)
381
382/*
383 * Used by CM_MPU_CLKSTCTRL, CM_RTC_CLKSTCTRL, CM_PER_CLK_24MHZ_CLKSTCTRL,
384 * CM_PER_CPSW_CLKSTCTRL, CM_PER_PRUSS_CLKSTCTRL, CM_PER_L3S_CLKSTCTRL,
385 * CM_PER_L3_CLKSTCTRL, CM_PER_L4FW_CLKSTCTRL, CM_PER_L4HS_CLKSTCTRL,
386 * CM_PER_L4LS_CLKSTCTRL, CM_PER_LCDC_CLKSTCTRL, CM_PER_OCPWP_L3_CLKSTCTRL,
387 * CM_L3_AON_CLKSTCTRL, CM_L4_WKUP_AON_CLKSTCTRL, CM_WKUP_CLKSTCTRL,
388 * CM_GFX_L3_CLKSTCTRL, CM_GFX_L4LS_GFX_CLKSTCTRL__1, CM_CEFUSE_CLKSTCTRL
389 */
390#define AM33XX_CLKTRCTRL_SHIFT 0 33#define AM33XX_CLKTRCTRL_SHIFT 0
391#define AM33XX_CLKTRCTRL_WIDTH 2
392#define AM33XX_CLKTRCTRL_MASK (0x3 << 0) 34#define AM33XX_CLKTRCTRL_MASK (0x3 << 0)
393
394/*
395 * Used by CM_SSC_DELTAMSTEP_DPLL_CORE, CM_SSC_DELTAMSTEP_DPLL_DDR,
396 * CM_SSC_DELTAMSTEP_DPLL_DISP, CM_SSC_DELTAMSTEP_DPLL_MPU,
397 * CM_SSC_DELTAMSTEP_DPLL_PER
398 */
399#define AM33XX_DELTAMSTEP_SHIFT 0
400#define AM33XX_DELTAMSTEP_WIDTH 20
401#define AM33XX_DELTAMSTEP_MASK (0xfffff << 0)
402
403/* Used by CM_CLKSEL_DPLL_DDR, CM_CLKSEL_DPLL_DISP, CM_CLKSEL_DPLL_MPU */
404#define AM33XX_DPLL_BYP_CLKSEL_SHIFT 23
405#define AM33XX_DPLL_BYP_CLKSEL_WIDTH 1
406#define AM33XX_DPLL_BYP_CLKSEL_MASK (1 << 23)
407
408/* Used by CM_CLKDCOLDO_DPLL_PER */
409#define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8
410#define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_WIDTH 1
411#define AM33XX_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8)
412
413/* Used by CM_CLKDCOLDO_DPLL_PER */
414#define AM33XX_DPLL_CLKDCOLDO_PWDN_SHIFT 12
415#define AM33XX_DPLL_CLKDCOLDO_PWDN_WIDTH 1
416#define AM33XX_DPLL_CLKDCOLDO_PWDN_MASK (1 << 12)
417
418/* Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU */
419#define AM33XX_DPLL_CLKOUT_DIV_SHIFT 0 35#define AM33XX_DPLL_CLKOUT_DIV_SHIFT 0
420#define AM33XX_DPLL_CLKOUT_DIV_WIDTH 5 36#define AM33XX_DPLL_CLKOUT_DIV_WIDTH 5
421#define AM33XX_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
422
423/* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_PER */
424#define AM33XX_DPLL_CLKOUT_DIV_0_6_SHIFT 0
425#define AM33XX_DPLL_CLKOUT_DIV_0_6_WIDTH 7
426#define AM33XX_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0)
427
428/* Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU */
429#define AM33XX_DPLL_CLKOUT_DIVCHACK_SHIFT 5
430#define AM33XX_DPLL_CLKOUT_DIVCHACK_WIDTH 1
431#define AM33XX_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5)
432
433/* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_PER */
434#define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_SHIFT 7
435#define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_WIDTH 1
436#define AM33XX_DPLL_CLKOUT_DIVCHACK_M2_PER_MASK (1 << 7)
437
438/*
439 * Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU,
440 * CM_DIV_M2_DPLL_PER
441 */
442#define AM33XX_DPLL_CLKOUT_GATE_CTRL_SHIFT 8
443#define AM33XX_DPLL_CLKOUT_GATE_CTRL_WIDTH 1
444#define AM33XX_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8)
445
446/*
447 * Used by CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDR, CM_CLKSEL_DPLL_DISP,
448 * CM_CLKSEL_DPLL_MPU
449 */
450#define AM33XX_DPLL_DIV_SHIFT 0
451#define AM33XX_DPLL_DIV_WIDTH 7
452#define AM33XX_DPLL_DIV_MASK (0x7f << 0) 37#define AM33XX_DPLL_DIV_MASK (0x7f << 0)
453
454#define AM33XX_DPLL_PER_DIV_MASK (0xff << 0) 38#define AM33XX_DPLL_PER_DIV_MASK (0xff << 0)
455
456/* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_PERIPH */
457#define AM33XX_DPLL_DIV_0_7_SHIFT 0
458#define AM33XX_DPLL_DIV_0_7_WIDTH 8
459#define AM33XX_DPLL_DIV_0_7_MASK (0xff << 0)
460
461/*
462 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP,
463 * CM_CLKMODE_DPLL_MPU
464 */
465#define AM33XX_DPLL_DRIFTGUARD_EN_SHIFT 8
466#define AM33XX_DPLL_DRIFTGUARD_EN_WIDTH 1
467#define AM33XX_DPLL_DRIFTGUARD_EN_MASK (1 << 8)
468
469/*
470 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP,
471 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
472 */
473#define AM33XX_DPLL_EN_SHIFT 0
474#define AM33XX_DPLL_EN_WIDTH 3
475#define AM33XX_DPLL_EN_MASK (0x7 << 0) 39#define AM33XX_DPLL_EN_MASK (0x7 << 0)
476
477/*
478 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP,
479 * CM_CLKMODE_DPLL_MPU
480 */
481#define AM33XX_DPLL_LPMODE_EN_SHIFT 10
482#define AM33XX_DPLL_LPMODE_EN_WIDTH 1
483#define AM33XX_DPLL_LPMODE_EN_MASK (1 << 10)
484
485/*
486 * Used by CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDR, CM_CLKSEL_DPLL_DISP,
487 * CM_CLKSEL_DPLL_MPU
488 */
489#define AM33XX_DPLL_MULT_SHIFT 8
490#define AM33XX_DPLL_MULT_WIDTH 11
491#define AM33XX_DPLL_MULT_MASK (0x7ff << 8) 40#define AM33XX_DPLL_MULT_MASK (0x7ff << 8)
492
493/* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_PERIPH */
494#define AM33XX_DPLL_MULT_PERIPH_SHIFT 8
495#define AM33XX_DPLL_MULT_PERIPH_WIDTH 12
496#define AM33XX_DPLL_MULT_PERIPH_MASK (0xfff << 8) 41#define AM33XX_DPLL_MULT_PERIPH_MASK (0xfff << 8)
497
498/*
499 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP,
500 * CM_CLKMODE_DPLL_MPU
501 */
502#define AM33XX_DPLL_REGM4XEN_SHIFT 11
503#define AM33XX_DPLL_REGM4XEN_WIDTH 1
504#define AM33XX_DPLL_REGM4XEN_MASK (1 << 11)
505
506/* Used by CM_CLKSEL_DPLL_PERIPH */
507#define AM33XX_DPLL_SD_DIV_SHIFT 24
508#define AM33XX_DPLL_SD_DIV_WIDTH 8
509#define AM33XX_DPLL_SD_DIV_MASK (0xff << 24)
510
511/*
512 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP,
513 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
514 */
515#define AM33XX_DPLL_SSC_ACK_SHIFT 13
516#define AM33XX_DPLL_SSC_ACK_WIDTH 1
517#define AM33XX_DPLL_SSC_ACK_MASK (1 << 13)
518
519/*
520 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP,
521 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
522 */
523#define AM33XX_DPLL_SSC_DOWNSPREAD_SHIFT 14
524#define AM33XX_DPLL_SSC_DOWNSPREAD_WIDTH 1
525#define AM33XX_DPLL_SSC_DOWNSPREAD_MASK (1 << 14)
526
527/*
528 * Used by CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDR, CM_CLKMODE_DPLL_DISP,
529 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
530 */
531#define AM33XX_DPLL_SSC_EN_SHIFT 12
532#define AM33XX_DPLL_SSC_EN_WIDTH 1
533#define AM33XX_DPLL_SSC_EN_MASK (1 << 12)
534
535/* Used by CM_DIV_M4_DPLL_CORE */
536#define AM33XX_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 42#define AM33XX_HSDIVIDER_CLKOUT1_DIV_SHIFT 0
537#define AM33XX_HSDIVIDER_CLKOUT1_DIV_WIDTH 5 43#define AM33XX_HSDIVIDER_CLKOUT1_DIV_WIDTH 5
538#define AM33XX_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0)
539
540/* Used by CM_DIV_M4_DPLL_CORE */
541#define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5
542#define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_WIDTH 1
543#define AM33XX_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5)
544
545/* Used by CM_DIV_M4_DPLL_CORE */
546#define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8
547#define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_WIDTH 1
548#define AM33XX_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8)
549
550/* Used by CM_DIV_M4_DPLL_CORE */
551#define AM33XX_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12
552#define AM33XX_HSDIVIDER_CLKOUT1_PWDN_WIDTH 1
553#define AM33XX_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12)
554
555/* Used by CM_DIV_M5_DPLL_CORE */
556#define AM33XX_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 44#define AM33XX_HSDIVIDER_CLKOUT2_DIV_SHIFT 0
557#define AM33XX_HSDIVIDER_CLKOUT2_DIV_WIDTH 5 45#define AM33XX_HSDIVIDER_CLKOUT2_DIV_WIDTH 5
558#define AM33XX_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0)
559
560/* Used by CM_DIV_M5_DPLL_CORE */
561#define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5
562#define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_WIDTH 1
563#define AM33XX_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5)
564
565/* Used by CM_DIV_M5_DPLL_CORE */
566#define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8
567#define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_WIDTH 1
568#define AM33XX_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8)
569
570/* Used by CM_DIV_M5_DPLL_CORE */
571#define AM33XX_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12
572#define AM33XX_HSDIVIDER_CLKOUT2_PWDN_WIDTH 1
573#define AM33XX_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12)
574
575/* Used by CM_DIV_M6_DPLL_CORE */
576#define AM33XX_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 46#define AM33XX_HSDIVIDER_CLKOUT3_DIV_SHIFT 0
577#define AM33XX_HSDIVIDER_CLKOUT3_DIV_WIDTH 5 47#define AM33XX_HSDIVIDER_CLKOUT3_DIV_WIDTH 5
578#define AM33XX_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0)
579
580/* Used by CM_DIV_M6_DPLL_CORE */
581#define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5
582#define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_WIDTH 1
583#define AM33XX_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5)
584
585/* Used by CM_DIV_M6_DPLL_CORE */
586#define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8
587#define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_WIDTH 1
588#define AM33XX_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8)
589
590/* Used by CM_DIV_M6_DPLL_CORE */
591#define AM33XX_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12
592#define AM33XX_HSDIVIDER_CLKOUT3_PWDN_WIDTH 1
593#define AM33XX_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12)
594
595/*
596 * Used by CM_MPU_MPU_CLKCTRL, CM_RTC_RTC_CLKCTRL, CM_PER_AES0_CLKCTRL,
597 * CM_PER_AES1_CLKCTRL, CM_PER_CLKDIV32K_CLKCTRL, CM_PER_CPGMAC0_CLKCTRL,
598 * CM_PER_DCAN0_CLKCTRL, CM_PER_DCAN1_CLKCTRL, CM_PER_DES_CLKCTRL,
599 * CM_PER_ELM_CLKCTRL, CM_PER_EMIF_CLKCTRL, CM_PER_EMIF_FW_CLKCTRL,
600 * CM_PER_EPWMSS0_CLKCTRL, CM_PER_EPWMSS1_CLKCTRL, CM_PER_EPWMSS2_CLKCTRL,
601 * CM_PER_GPIO1_CLKCTRL, CM_PER_GPIO2_CLKCTRL, CM_PER_GPIO3_CLKCTRL,
602 * CM_PER_GPIO4_CLKCTRL, CM_PER_GPIO5_CLKCTRL, CM_PER_GPIO6_CLKCTRL,
603 * CM_PER_GPMC_CLKCTRL, CM_PER_I2C1_CLKCTRL, CM_PER_I2C2_CLKCTRL,
604 * CM_PER_PRUSS_CLKCTRL, CM_PER_IEEE5000_CLKCTRL, CM_PER_L3_CLKCTRL,
605 * CM_PER_L3_INSTR_CLKCTRL, CM_PER_L4FW_CLKCTRL, CM_PER_L4HS_CLKCTRL,
606 * CM_PER_L4LS_CLKCTRL, CM_PER_LCDC_CLKCTRL, CM_PER_MAILBOX0_CLKCTRL,
607 * CM_PER_MAILBOX1_CLKCTRL, CM_PER_MCASP0_CLKCTRL, CM_PER_MCASP1_CLKCTRL,
608 * CM_PER_MCASP2_CLKCTRL, CM_PER_MLB_CLKCTRL, CM_PER_MMC0_CLKCTRL,
609 * CM_PER_MMC1_CLKCTRL, CM_PER_MMC2_CLKCTRL, CM_PER_MSTR_EXPS_CLKCTRL,
610 * CM_PER_OCMCRAM_CLKCTRL, CM_PER_OCPWP_CLKCTRL, CM_PER_PCIE_CLKCTRL,
611 * CM_PER_PKA_CLKCTRL, CM_PER_RNG_CLKCTRL, CM_PER_SHA0_CLKCTRL,
612 * CM_PER_SLV_EXPS_CLKCTRL, CM_PER_SPARE0_CLKCTRL, CM_PER_SPARE1_CLKCTRL,
613 * CM_PER_SPARE_CLKCTRL, CM_PER_SPI0_CLKCTRL, CM_PER_SPI1_CLKCTRL,
614 * CM_PER_SPI2_CLKCTRL, CM_PER_SPI3_CLKCTRL, CM_PER_SPINLOCK_CLKCTRL,
615 * CM_PER_TIMER2_CLKCTRL, CM_PER_TIMER3_CLKCTRL, CM_PER_TIMER4_CLKCTRL,
616 * CM_PER_TIMER5_CLKCTRL, CM_PER_TIMER6_CLKCTRL, CM_PER_TIMER7_CLKCTRL,
617 * CM_PER_TPCC_CLKCTRL, CM_PER_TPTC0_CLKCTRL, CM_PER_TPTC1_CLKCTRL,
618 * CM_PER_TPTC2_CLKCTRL, CM_PER_UART1_CLKCTRL, CM_PER_UART2_CLKCTRL,
619 * CM_PER_UART3_CLKCTRL, CM_PER_UART4_CLKCTRL, CM_PER_UART5_CLKCTRL,
620 * CM_PER_USB0_CLKCTRL, CM_WKUP_ADC_TSC_CLKCTRL, CM_WKUP_CONTROL_CLKCTRL,
621 * CM_WKUP_DEBUGSS_CLKCTRL, CM_WKUP_GPIO0_CLKCTRL, CM_WKUP_I2C0_CLKCTRL,
622 * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_SMARTREFLEX0_CLKCTRL,
623 * CM_WKUP_SMARTREFLEX1_CLKCTRL, CM_WKUP_TIMER0_CLKCTRL,
624 * CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_UART0_CLKCTRL, CM_WKUP_WDT0_CLKCTRL,
625 * CM_WKUP_WDT1_CLKCTRL, CM_GFX_BITBLT_CLKCTRL, CM_GFX_GFX_CLKCTRL,
626 * CM_GFX_MMUCFG_CLKCTRL, CM_GFX_MMUDATA_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL
627 */
628#define AM33XX_IDLEST_SHIFT 16 48#define AM33XX_IDLEST_SHIFT 16
629#define AM33XX_IDLEST_WIDTH 2
630#define AM33XX_IDLEST_MASK (0x3 << 16) 49#define AM33XX_IDLEST_MASK (0x3 << 16)
631
632/* Used by CM_MAC_CLKSEL */
633#define AM33XX_MII_CLK_SEL_SHIFT 2
634#define AM33XX_MII_CLK_SEL_WIDTH 1
635#define AM33XX_MII_CLK_SEL_MASK (1 << 2)
636
637/*
638 * Used by CM_SSC_MODFREQDIV_DPLL_CORE, CM_SSC_MODFREQDIV_DPLL_DDR,
639 * CM_SSC_MODFREQDIV_DPLL_DISP, CM_SSC_MODFREQDIV_DPLL_MPU,
640 * CM_SSC_MODFREQDIV_DPLL_PER
641 */
642#define AM33XX_MODFREQDIV_EXPONENT_SHIFT 8
643#define AM33XX_MODFREQDIV_EXPONENT_WIDTH 3
644#define AM33XX_MODFREQDIV_EXPONENT_MASK (0x7 << 8)
645
646/*
647 * Used by CM_SSC_MODFREQDIV_DPLL_CORE, CM_SSC_MODFREQDIV_DPLL_DDR,
648 * CM_SSC_MODFREQDIV_DPLL_DISP, CM_SSC_MODFREQDIV_DPLL_MPU,
649 * CM_SSC_MODFREQDIV_DPLL_PER
650 */
651#define AM33XX_MODFREQDIV_MANTISSA_SHIFT 0
652#define AM33XX_MODFREQDIV_MANTISSA_WIDTH 7
653#define AM33XX_MODFREQDIV_MANTISSA_MASK (0x7f << 0)
654
655/*
656 * Used by CM_MPU_MPU_CLKCTRL, CM_RTC_RTC_CLKCTRL, CM_PER_AES0_CLKCTRL,
657 * CM_PER_AES1_CLKCTRL, CM_PER_CLKDIV32K_CLKCTRL, CM_PER_CPGMAC0_CLKCTRL,
658 * CM_PER_DCAN0_CLKCTRL, CM_PER_DCAN1_CLKCTRL, CM_PER_DES_CLKCTRL,
659 * CM_PER_ELM_CLKCTRL, CM_PER_EMIF_CLKCTRL, CM_PER_EMIF_FW_CLKCTRL,
660 * CM_PER_EPWMSS0_CLKCTRL, CM_PER_EPWMSS1_CLKCTRL, CM_PER_EPWMSS2_CLKCTRL,
661 * CM_PER_GPIO1_CLKCTRL, CM_PER_GPIO2_CLKCTRL, CM_PER_GPIO3_CLKCTRL,
662 * CM_PER_GPIO4_CLKCTRL, CM_PER_GPIO5_CLKCTRL, CM_PER_GPIO6_CLKCTRL,
663 * CM_PER_GPMC_CLKCTRL, CM_PER_I2C1_CLKCTRL, CM_PER_I2C2_CLKCTRL,
664 * CM_PER_PRUSS_CLKCTRL, CM_PER_IEEE5000_CLKCTRL, CM_PER_L3_CLKCTRL,
665 * CM_PER_L3_INSTR_CLKCTRL, CM_PER_L4FW_CLKCTRL, CM_PER_L4HS_CLKCTRL,
666 * CM_PER_L4LS_CLKCTRL, CM_PER_LCDC_CLKCTRL, CM_PER_MAILBOX0_CLKCTRL,
667 * CM_PER_MAILBOX1_CLKCTRL, CM_PER_MCASP0_CLKCTRL, CM_PER_MCASP1_CLKCTRL,
668 * CM_PER_MCASP2_CLKCTRL, CM_PER_MLB_CLKCTRL, CM_PER_MMC0_CLKCTRL,
669 * CM_PER_MMC1_CLKCTRL, CM_PER_MMC2_CLKCTRL, CM_PER_MSTR_EXPS_CLKCTRL,
670 * CM_PER_OCMCRAM_CLKCTRL, CM_PER_OCPWP_CLKCTRL, CM_PER_PCIE_CLKCTRL,
671 * CM_PER_PKA_CLKCTRL, CM_PER_RNG_CLKCTRL, CM_PER_SHA0_CLKCTRL,
672 * CM_PER_SLV_EXPS_CLKCTRL, CM_PER_SPARE0_CLKCTRL, CM_PER_SPARE1_CLKCTRL,
673 * CM_PER_SPARE_CLKCTRL, CM_PER_SPI0_CLKCTRL, CM_PER_SPI1_CLKCTRL,
674 * CM_PER_SPI2_CLKCTRL, CM_PER_SPI3_CLKCTRL, CM_PER_SPINLOCK_CLKCTRL,
675 * CM_PER_TIMER2_CLKCTRL, CM_PER_TIMER3_CLKCTRL, CM_PER_TIMER4_CLKCTRL,
676 * CM_PER_TIMER5_CLKCTRL, CM_PER_TIMER6_CLKCTRL, CM_PER_TIMER7_CLKCTRL,
677 * CM_PER_TPCC_CLKCTRL, CM_PER_TPTC0_CLKCTRL, CM_PER_TPTC1_CLKCTRL,
678 * CM_PER_TPTC2_CLKCTRL, CM_PER_UART1_CLKCTRL, CM_PER_UART2_CLKCTRL,
679 * CM_PER_UART3_CLKCTRL, CM_PER_UART4_CLKCTRL, CM_PER_UART5_CLKCTRL,
680 * CM_PER_USB0_CLKCTRL, CM_WKUP_ADC_TSC_CLKCTRL, CM_WKUP_CONTROL_CLKCTRL,
681 * CM_WKUP_DEBUGSS_CLKCTRL, CM_WKUP_GPIO0_CLKCTRL, CM_WKUP_I2C0_CLKCTRL,
682 * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_SMARTREFLEX0_CLKCTRL,
683 * CM_WKUP_SMARTREFLEX1_CLKCTRL, CM_WKUP_TIMER0_CLKCTRL,
684 * CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_UART0_CLKCTRL, CM_WKUP_WDT0_CLKCTRL,
685 * CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WKUP_M3_CLKCTRL, CM_GFX_BITBLT_CLKCTRL,
686 * CM_GFX_GFX_CLKCTRL, CM_GFX_MMUCFG_CLKCTRL, CM_GFX_MMUDATA_CLKCTRL,
687 * CM_CEFUSE_CEFUSE_CLKCTRL
688 */
689#define AM33XX_MODULEMODE_SHIFT 0 50#define AM33XX_MODULEMODE_SHIFT 0
690#define AM33XX_MODULEMODE_WIDTH 2
691#define AM33XX_MODULEMODE_MASK (0x3 << 0) 51#define AM33XX_MODULEMODE_MASK (0x3 << 0)
692
693/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
694#define AM33XX_OPTCLK_DEBUG_CLKA_SHIFT 30 52#define AM33XX_OPTCLK_DEBUG_CLKA_SHIFT 30
695#define AM33XX_OPTCLK_DEBUG_CLKA_WIDTH 1
696#define AM33XX_OPTCLK_DEBUG_CLKA_MASK (1 << 30)
697
698/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
699#define AM33XX_OPTFCLKEN_DBGSYSCLK_SHIFT 19 53#define AM33XX_OPTFCLKEN_DBGSYSCLK_SHIFT 19
700#define AM33XX_OPTFCLKEN_DBGSYSCLK_WIDTH 1
701#define AM33XX_OPTFCLKEN_DBGSYSCLK_MASK (1 << 19)
702
703/* Used by CM_WKUP_GPIO0_CLKCTRL */
704#define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_SHIFT 18 54#define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_SHIFT 18
705#define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_WIDTH 1
706#define AM33XX_OPTFCLKEN_GPIO0_GDBCLK_MASK (1 << 18)
707
708/* Used by CM_PER_GPIO1_CLKCTRL */
709#define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_SHIFT 18 55#define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_SHIFT 18
710#define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_WIDTH 1
711#define AM33XX_OPTFCLKEN_GPIO_1_GDBCLK_MASK (1 << 18)
712
713/* Used by CM_PER_GPIO2_CLKCTRL */
714#define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_SHIFT 18 56#define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_SHIFT 18
715#define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_WIDTH 1
716#define AM33XX_OPTFCLKEN_GPIO_2_GDBCLK_MASK (1 << 18)
717
718/* Used by CM_PER_GPIO3_CLKCTRL */
719#define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_SHIFT 18 57#define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_SHIFT 18
720#define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_WIDTH 1
721#define AM33XX_OPTFCLKEN_GPIO_3_GDBCLK_MASK (1 << 18)
722
723/* Used by CM_PER_GPIO4_CLKCTRL */
724#define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_SHIFT 18
725#define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_WIDTH 1
726#define AM33XX_OPTFCLKEN_GPIO_4_GDBCLK_MASK (1 << 18)
727
728/* Used by CM_PER_GPIO5_CLKCTRL */
729#define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_SHIFT 18
730#define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_WIDTH 1
731#define AM33XX_OPTFCLKEN_GPIO_5_GDBCLK_MASK (1 << 18)
732
733/* Used by CM_PER_GPIO6_CLKCTRL */
734#define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_SHIFT 18
735#define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_WIDTH 1
736#define AM33XX_OPTFCLKEN_GPIO_6_GDBCLK_MASK (1 << 18)
737
738/*
739 * Used by CM_MPU_MPU_CLKCTRL, CM_PER_CPGMAC0_CLKCTRL, CM_PER_PRUSS_CLKCTRL,
740 * CM_PER_IEEE5000_CLKCTRL, CM_PER_LCDC_CLKCTRL, CM_PER_MLB_CLKCTRL,
741 * CM_PER_MSTR_EXPS_CLKCTRL, CM_PER_OCPWP_CLKCTRL, CM_PER_PCIE_CLKCTRL,
742 * CM_PER_SPARE_CLKCTRL, CM_PER_TPTC0_CLKCTRL, CM_PER_TPTC1_CLKCTRL,
743 * CM_PER_TPTC2_CLKCTRL, CM_PER_USB0_CLKCTRL, CM_WKUP_DEBUGSS_CLKCTRL,
744 * CM_WKUP_WKUP_M3_CLKCTRL, CM_GFX_BITBLT_CLKCTRL, CM_GFX_GFX_CLKCTRL
745 */
746#define AM33XX_STBYST_SHIFT 18
747#define AM33XX_STBYST_WIDTH 1
748#define AM33XX_STBYST_MASK (1 << 18)
749
750/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
751#define AM33XX_STM_PMD_CLKDIVSEL_SHIFT 27 58#define AM33XX_STM_PMD_CLKDIVSEL_SHIFT 27
752#define AM33XX_STM_PMD_CLKDIVSEL_WIDTH 3 59#define AM33XX_STM_PMD_CLKDIVSEL_WIDTH 3
753#define AM33XX_STM_PMD_CLKDIVSEL_MASK (0x7 << 27)
754
755/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
756#define AM33XX_STM_PMD_CLKSEL_SHIFT 22 60#define AM33XX_STM_PMD_CLKSEL_SHIFT 22
757#define AM33XX_STM_PMD_CLKSEL_WIDTH 2 61#define AM33XX_STM_PMD_CLKSEL_WIDTH 2
758#define AM33XX_STM_PMD_CLKSEL_MASK (0x3 << 22)
759
760/*
761 * Used by CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDR, CM_IDLEST_DPLL_DISP,
762 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER
763 */
764#define AM33XX_ST_DPLL_CLK_SHIFT 0
765#define AM33XX_ST_DPLL_CLK_WIDTH 1
766#define AM33XX_ST_DPLL_CLK_MASK (1 << 0) 62#define AM33XX_ST_DPLL_CLK_MASK (1 << 0)
767
768/* Used by CM_CLKDCOLDO_DPLL_PER */
769#define AM33XX_ST_DPLL_CLKDCOLDO_SHIFT 8 63#define AM33XX_ST_DPLL_CLKDCOLDO_SHIFT 8
770#define AM33XX_ST_DPLL_CLKDCOLDO_WIDTH 1
771#define AM33XX_ST_DPLL_CLKDCOLDO_MASK (1 << 8)
772
773/*
774 * Used by CM_DIV_M2_DPLL_DDR, CM_DIV_M2_DPLL_DISP, CM_DIV_M2_DPLL_MPU,
775 * CM_DIV_M2_DPLL_PER
776 */
777#define AM33XX_ST_DPLL_CLKOUT_SHIFT 9
778#define AM33XX_ST_DPLL_CLKOUT_WIDTH 1
779#define AM33XX_ST_DPLL_CLKOUT_MASK (1 << 9)
780
781/* Used by CM_DIV_M4_DPLL_CORE */
782#define AM33XX_ST_HSDIVIDER_CLKOUT1_SHIFT 9
783#define AM33XX_ST_HSDIVIDER_CLKOUT1_WIDTH 1
784#define AM33XX_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9)
785
786/* Used by CM_DIV_M5_DPLL_CORE */
787#define AM33XX_ST_HSDIVIDER_CLKOUT2_SHIFT 9
788#define AM33XX_ST_HSDIVIDER_CLKOUT2_WIDTH 1
789#define AM33XX_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9)
790
791/* Used by CM_DIV_M6_DPLL_CORE */
792#define AM33XX_ST_HSDIVIDER_CLKOUT3_SHIFT 9
793#define AM33XX_ST_HSDIVIDER_CLKOUT3_WIDTH 1
794#define AM33XX_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9)
795
796/*
797 * Used by CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDR, CM_IDLEST_DPLL_DISP,
798 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER
799 */
800#define AM33XX_ST_MN_BYPASS_SHIFT 8
801#define AM33XX_ST_MN_BYPASS_WIDTH 1
802#define AM33XX_ST_MN_BYPASS_MASK (1 << 8)
803
804/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
805#define AM33XX_TRC_PMD_CLKDIVSEL_SHIFT 24 64#define AM33XX_TRC_PMD_CLKDIVSEL_SHIFT 24
806#define AM33XX_TRC_PMD_CLKDIVSEL_WIDTH 3 65#define AM33XX_TRC_PMD_CLKDIVSEL_WIDTH 3
807#define AM33XX_TRC_PMD_CLKDIVSEL_MASK (0x7 << 24)
808
809/* Used by CM_WKUP_DEBUGSS_CLKCTRL */
810#define AM33XX_TRC_PMD_CLKSEL_SHIFT 20 66#define AM33XX_TRC_PMD_CLKSEL_SHIFT 20
811#define AM33XX_TRC_PMD_CLKSEL_WIDTH 2 67#define AM33XX_TRC_PMD_CLKSEL_WIDTH 2
812#define AM33XX_TRC_PMD_CLKSEL_MASK (0x3 << 20)
813
814/* Used by CONTROL_SEC_CLK_CTRL */
815#define AM33XX_TIMER0_CLKSEL_WIDTH 2
816#define AM33XX_TIMER0_CLKSEL_MASK (0x3 << 4)
817#endif 68#endif
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
index adf78d325804..04dab2fcf862 100644
--- a/arch/arm/mach-omap2/cm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
@@ -14,833 +14,201 @@
14 * published by the Free Software Foundation. 14 * published by the Free Software Foundation.
15 */ 15 */
16 16
17/* Bits shared between registers */
18
19/* CM_FCLKEN1_CORE and CM_ICLKEN1_CORE shared bits */
20#define OMAP3430ES2_EN_MMC3_MASK (1 << 30)
21#define OMAP3430ES2_EN_MMC3_SHIFT 30 17#define OMAP3430ES2_EN_MMC3_SHIFT 30
22#define OMAP3430_EN_MSPRO_MASK (1 << 23)
23#define OMAP3430_EN_MSPRO_SHIFT 23 18#define OMAP3430_EN_MSPRO_SHIFT 23
24#define OMAP3430_EN_HDQ_MASK (1 << 22)
25#define OMAP3430_EN_HDQ_SHIFT 22 19#define OMAP3430_EN_HDQ_SHIFT 22
26#define OMAP3430ES1_EN_FSHOSTUSB_MASK (1 << 5)
27#define OMAP3430ES1_EN_FSHOSTUSB_SHIFT 5 20#define OMAP3430ES1_EN_FSHOSTUSB_SHIFT 5
28#define OMAP3430ES1_EN_D2D_MASK (1 << 3)
29#define OMAP3430ES1_EN_D2D_SHIFT 3 21#define OMAP3430ES1_EN_D2D_SHIFT 3
30#define OMAP3430_EN_SSI_MASK (1 << 0)
31#define OMAP3430_EN_SSI_SHIFT 0 22#define OMAP3430_EN_SSI_SHIFT 0
32
33/* CM_FCLKEN3_CORE and CM_ICLKEN3_CORE shared bits */
34#define OMAP3430ES2_EN_USBTLL_SHIFT 2 23#define OMAP3430ES2_EN_USBTLL_SHIFT 2
35#define OMAP3430ES2_EN_USBTLL_MASK (1 << 2)
36
37/* CM_FCLKEN_WKUP and CM_ICLKEN_WKUP shared bits */
38#define OMAP3430_EN_WDT2_MASK (1 << 5)
39#define OMAP3430_EN_WDT2_SHIFT 5 24#define OMAP3430_EN_WDT2_SHIFT 5
40
41/* CM_ICLKEN_CAM, CM_FCLKEN_CAM shared bits */
42#define OMAP3430_EN_CAM_MASK (1 << 0)
43#define OMAP3430_EN_CAM_SHIFT 0 25#define OMAP3430_EN_CAM_SHIFT 0
44
45/* CM_FCLKEN_PER, CM_ICLKEN_PER shared bits */
46#define OMAP3430_EN_WDT3_MASK (1 << 12)
47#define OMAP3430_EN_WDT3_SHIFT 12 26#define OMAP3430_EN_WDT3_SHIFT 12
48
49/* CM_CLKSEL2_EMU, CM_CLKSEL3_EMU shared bits */
50#define OMAP3430_OVERRIDE_ENABLE_MASK (1 << 19)
51
52
53/* Bits specific to each register */
54
55/* CM_FCLKEN_IVA2 */
56#define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK (1 << 0) 27#define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK (1 << 0)
57#define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT 0 28#define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT 0
58
59/* CM_CLKEN_PLL_IVA2 */
60#define OMAP3430_IVA2_DPLL_RAMPTIME_SHIFT 8
61#define OMAP3430_IVA2_DPLL_RAMPTIME_MASK (0x3 << 8)
62#define OMAP3430_IVA2_DPLL_FREQSEL_SHIFT 4
63#define OMAP3430_IVA2_DPLL_FREQSEL_MASK (0xf << 4) 29#define OMAP3430_IVA2_DPLL_FREQSEL_MASK (0xf << 4)
64#define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT 3 30#define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT 3
65#define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_MASK (1 << 3)
66#define OMAP3430_EN_IVA2_DPLL_SHIFT 0
67#define OMAP3430_EN_IVA2_DPLL_MASK (0x7 << 0) 31#define OMAP3430_EN_IVA2_DPLL_MASK (0x7 << 0)
68
69/* CM_IDLEST_IVA2 */
70#define OMAP3430_ST_IVA2_SHIFT 0 32#define OMAP3430_ST_IVA2_SHIFT 0
71#define OMAP3430_ST_IVA2_MASK (1 << 0)
72
73/* CM_IDLEST_PLL_IVA2 */
74#define OMAP3430_ST_IVA2_CLK_SHIFT 0
75#define OMAP3430_ST_IVA2_CLK_MASK (1 << 0) 33#define OMAP3430_ST_IVA2_CLK_MASK (1 << 0)
76
77/* CM_AUTOIDLE_PLL_IVA2 */
78#define OMAP3430_AUTO_IVA2_DPLL_SHIFT 0
79#define OMAP3430_AUTO_IVA2_DPLL_MASK (0x7 << 0) 34#define OMAP3430_AUTO_IVA2_DPLL_MASK (0x7 << 0)
80
81/* CM_CLKSEL1_PLL_IVA2 */
82#define OMAP3430_IVA2_CLK_SRC_SHIFT 19 35#define OMAP3430_IVA2_CLK_SRC_SHIFT 19
83#define OMAP3430_IVA2_CLK_SRC_MASK (0x7 << 19)
84#define OMAP3430_IVA2_CLK_SRC_WIDTH 3 36#define OMAP3430_IVA2_CLK_SRC_WIDTH 3
85#define OMAP3430_IVA2_DPLL_MULT_SHIFT 8
86#define OMAP3430_IVA2_DPLL_MULT_MASK (0x7ff << 8) 37#define OMAP3430_IVA2_DPLL_MULT_MASK (0x7ff << 8)
87#define OMAP3430_IVA2_DPLL_DIV_SHIFT 0
88#define OMAP3430_IVA2_DPLL_DIV_MASK (0x7f << 0) 38#define OMAP3430_IVA2_DPLL_DIV_MASK (0x7f << 0)
89
90/* CM_CLKSEL2_PLL_IVA2 */
91#define OMAP3430_IVA2_DPLL_CLKOUT_DIV_SHIFT 0 39#define OMAP3430_IVA2_DPLL_CLKOUT_DIV_SHIFT 0
92#define OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
93#define OMAP3430_IVA2_DPLL_CLKOUT_DIV_WIDTH 5 40#define OMAP3430_IVA2_DPLL_CLKOUT_DIV_WIDTH 5
94
95/* CM_CLKSTCTRL_IVA2 */
96#define OMAP3430_CLKTRCTRL_IVA2_SHIFT 0
97#define OMAP3430_CLKTRCTRL_IVA2_MASK (0x3 << 0) 41#define OMAP3430_CLKTRCTRL_IVA2_MASK (0x3 << 0)
98
99/* CM_CLKSTST_IVA2 */
100#define OMAP3430_CLKACTIVITY_IVA2_SHIFT 0
101#define OMAP3430_CLKACTIVITY_IVA2_MASK (1 << 0) 42#define OMAP3430_CLKACTIVITY_IVA2_MASK (1 << 0)
102
103/* CM_REVISION specific bits */
104
105/* CM_SYSCONFIG specific bits */
106
107/* CM_CLKEN_PLL_MPU */
108#define OMAP3430_MPU_DPLL_RAMPTIME_SHIFT 8
109#define OMAP3430_MPU_DPLL_RAMPTIME_MASK (0x3 << 8)
110#define OMAP3430_MPU_DPLL_FREQSEL_SHIFT 4
111#define OMAP3430_MPU_DPLL_FREQSEL_MASK (0xf << 4) 43#define OMAP3430_MPU_DPLL_FREQSEL_MASK (0xf << 4)
112#define OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT 3 44#define OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT 3
113#define OMAP3430_EN_MPU_DPLL_DRIFTGUARD_MASK (1 << 3)
114#define OMAP3430_EN_MPU_DPLL_SHIFT 0
115#define OMAP3430_EN_MPU_DPLL_MASK (0x7 << 0) 45#define OMAP3430_EN_MPU_DPLL_MASK (0x7 << 0)
116
117/* CM_IDLEST_MPU */
118#define OMAP3430_ST_MPU_MASK (1 << 0)
119
120/* CM_IDLEST_PLL_MPU */
121#define OMAP3430_ST_MPU_CLK_SHIFT 0 46#define OMAP3430_ST_MPU_CLK_SHIFT 0
122#define OMAP3430_ST_MPU_CLK_MASK (1 << 0) 47#define OMAP3430_ST_MPU_CLK_MASK (1 << 0)
123#define OMAP3430_ST_MPU_CLK_WIDTH 1 48#define OMAP3430_ST_MPU_CLK_WIDTH 1
124
125/* CM_AUTOIDLE_PLL_MPU */
126#define OMAP3430_AUTO_MPU_DPLL_SHIFT 0
127#define OMAP3430_AUTO_MPU_DPLL_MASK (0x7 << 0) 49#define OMAP3430_AUTO_MPU_DPLL_MASK (0x7 << 0)
128
129/* CM_CLKSEL1_PLL_MPU */
130#define OMAP3430_MPU_CLK_SRC_SHIFT 19 50#define OMAP3430_MPU_CLK_SRC_SHIFT 19
131#define OMAP3430_MPU_CLK_SRC_MASK (0x7 << 19)
132#define OMAP3430_MPU_CLK_SRC_WIDTH 3 51#define OMAP3430_MPU_CLK_SRC_WIDTH 3
133#define OMAP3430_MPU_DPLL_MULT_SHIFT 8
134#define OMAP3430_MPU_DPLL_MULT_MASK (0x7ff << 8) 52#define OMAP3430_MPU_DPLL_MULT_MASK (0x7ff << 8)
135#define OMAP3430_MPU_DPLL_DIV_SHIFT 0
136#define OMAP3430_MPU_DPLL_DIV_MASK (0x7f << 0) 53#define OMAP3430_MPU_DPLL_DIV_MASK (0x7f << 0)
137
138/* CM_CLKSEL2_PLL_MPU */
139#define OMAP3430_MPU_DPLL_CLKOUT_DIV_SHIFT 0 54#define OMAP3430_MPU_DPLL_CLKOUT_DIV_SHIFT 0
140#define OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
141#define OMAP3430_MPU_DPLL_CLKOUT_DIV_WIDTH 5 55#define OMAP3430_MPU_DPLL_CLKOUT_DIV_WIDTH 5
142
143/* CM_CLKSTCTRL_MPU */
144#define OMAP3430_CLKTRCTRL_MPU_SHIFT 0
145#define OMAP3430_CLKTRCTRL_MPU_MASK (0x3 << 0) 56#define OMAP3430_CLKTRCTRL_MPU_MASK (0x3 << 0)
146
147/* CM_CLKSTST_MPU */
148#define OMAP3430_CLKACTIVITY_MPU_SHIFT 0
149#define OMAP3430_CLKACTIVITY_MPU_MASK (1 << 0)
150
151/* CM_FCLKEN1_CORE specific bits */
152#define OMAP3430_EN_MODEM_MASK (1 << 31)
153#define OMAP3430_EN_MODEM_SHIFT 31 57#define OMAP3430_EN_MODEM_SHIFT 31
154
155/* CM_ICLKEN1_CORE specific bits */
156#define OMAP3430_EN_ICR_MASK (1 << 29)
157#define OMAP3430_EN_ICR_SHIFT 29 58#define OMAP3430_EN_ICR_SHIFT 29
158#define OMAP3430_EN_AES2_MASK (1 << 28)
159#define OMAP3430_EN_AES2_SHIFT 28 59#define OMAP3430_EN_AES2_SHIFT 28
160#define OMAP3430_EN_SHA12_MASK (1 << 27)
161#define OMAP3430_EN_SHA12_SHIFT 27 60#define OMAP3430_EN_SHA12_SHIFT 27
162#define OMAP3430_EN_DES2_MASK (1 << 26)
163#define OMAP3430_EN_DES2_SHIFT 26 61#define OMAP3430_EN_DES2_SHIFT 26
164#define OMAP3430ES1_EN_FAC_MASK (1 << 8)
165#define OMAP3430ES1_EN_FAC_SHIFT 8 62#define OMAP3430ES1_EN_FAC_SHIFT 8
166#define OMAP3430_EN_MAILBOXES_MASK (1 << 7)
167#define OMAP3430_EN_MAILBOXES_SHIFT 7 63#define OMAP3430_EN_MAILBOXES_SHIFT 7
168#define OMAP3430_EN_OMAPCTRL_MASK (1 << 6)
169#define OMAP3430_EN_OMAPCTRL_SHIFT 6 64#define OMAP3430_EN_OMAPCTRL_SHIFT 6
170#define OMAP3430_EN_SAD2D_MASK (1 << 3)
171#define OMAP3430_EN_SAD2D_SHIFT 3 65#define OMAP3430_EN_SAD2D_SHIFT 3
172#define OMAP3430_EN_SDRC_MASK (1 << 1)
173#define OMAP3430_EN_SDRC_SHIFT 1 66#define OMAP3430_EN_SDRC_SHIFT 1
174
175/* AM35XX specific CM_ICLKEN1_CORE bits */
176#define AM35XX_EN_IPSS_MASK (1 << 4)
177#define AM35XX_EN_IPSS_SHIFT 4 67#define AM35XX_EN_IPSS_SHIFT 4
178
179/* CM_ICLKEN2_CORE */
180#define OMAP3430_EN_PKA_MASK (1 << 4)
181#define OMAP3430_EN_PKA_SHIFT 4 68#define OMAP3430_EN_PKA_SHIFT 4
182#define OMAP3430_EN_AES1_MASK (1 << 3)
183#define OMAP3430_EN_AES1_SHIFT 3 69#define OMAP3430_EN_AES1_SHIFT 3
184#define OMAP3430_EN_RNG_MASK (1 << 2)
185#define OMAP3430_EN_RNG_SHIFT 2 70#define OMAP3430_EN_RNG_SHIFT 2
186#define OMAP3430_EN_SHA11_MASK (1 << 1)
187#define OMAP3430_EN_SHA11_SHIFT 1 71#define OMAP3430_EN_SHA11_SHIFT 1
188#define OMAP3430_EN_DES1_MASK (1 << 0)
189#define OMAP3430_EN_DES1_SHIFT 0 72#define OMAP3430_EN_DES1_SHIFT 0
190
191/* CM_ICLKEN3_CORE */
192#define OMAP3430_EN_MAD2D_SHIFT 3 73#define OMAP3430_EN_MAD2D_SHIFT 3
193#define OMAP3430_EN_MAD2D_MASK (1 << 3)
194
195/* CM_FCLKEN3_CORE specific bits */
196#define OMAP3430ES2_EN_TS_SHIFT 1 74#define OMAP3430ES2_EN_TS_SHIFT 1
197#define OMAP3430ES2_EN_TS_MASK (1 << 1)
198#define OMAP3430ES2_EN_CPEFUSE_SHIFT 0 75#define OMAP3430ES2_EN_CPEFUSE_SHIFT 0
199#define OMAP3430ES2_EN_CPEFUSE_MASK (1 << 0)
200
201/* CM_IDLEST1_CORE specific bits */
202#define OMAP3430ES2_ST_MMC3_SHIFT 30
203#define OMAP3430ES2_ST_MMC3_MASK (1 << 30)
204#define OMAP3430_ST_ICR_SHIFT 29
205#define OMAP3430_ST_ICR_MASK (1 << 29)
206#define OMAP3430_ST_AES2_SHIFT 28 76#define OMAP3430_ST_AES2_SHIFT 28
207#define OMAP3430_ST_AES2_MASK (1 << 28)
208#define OMAP3430_ST_SHA12_SHIFT 27 77#define OMAP3430_ST_SHA12_SHIFT 27
209#define OMAP3430_ST_SHA12_MASK (1 << 27)
210#define OMAP3430_ST_DES2_SHIFT 26
211#define OMAP3430_ST_DES2_MASK (1 << 26)
212#define OMAP3430_ST_MSPRO_SHIFT 23
213#define OMAP3430_ST_MSPRO_MASK (1 << 23)
214#define AM35XX_ST_UART4_SHIFT 23 78#define AM35XX_ST_UART4_SHIFT 23
215#define AM35XX_ST_UART4_MASK (1 << 23)
216#define OMAP3430_ST_HDQ_SHIFT 22 79#define OMAP3430_ST_HDQ_SHIFT 22
217#define OMAP3430_ST_HDQ_MASK (1 << 22)
218#define OMAP3430ES1_ST_FAC_SHIFT 8
219#define OMAP3430ES1_ST_FAC_MASK (1 << 8)
220#define OMAP3430ES2_ST_SSI_IDLE_SHIFT 8 80#define OMAP3430ES2_ST_SSI_IDLE_SHIFT 8
221#define OMAP3430ES2_ST_SSI_IDLE_MASK (1 << 8)
222#define OMAP3430_ST_MAILBOXES_SHIFT 7 81#define OMAP3430_ST_MAILBOXES_SHIFT 7
223#define OMAP3430_ST_MAILBOXES_MASK (1 << 7)
224#define OMAP3430_ST_OMAPCTRL_SHIFT 6
225#define OMAP3430_ST_OMAPCTRL_MASK (1 << 6)
226#define OMAP3430_ST_SAD2D_SHIFT 3 82#define OMAP3430_ST_SAD2D_SHIFT 3
227#define OMAP3430_ST_SAD2D_MASK (1 << 3)
228#define OMAP3430_ST_SDMA_SHIFT 2 83#define OMAP3430_ST_SDMA_SHIFT 2
229#define OMAP3430_ST_SDMA_MASK (1 << 2)
230#define OMAP3430_ST_SDRC_SHIFT 1
231#define OMAP3430_ST_SDRC_MASK (1 << 1)
232#define OMAP3430_ST_SSI_STDBY_SHIFT 0
233#define OMAP3430_ST_SSI_STDBY_MASK (1 << 0)
234
235/* AM35xx specific CM_IDLEST1_CORE bits */
236#define AM35XX_ST_IPSS_SHIFT 5 84#define AM35XX_ST_IPSS_SHIFT 5
237#define AM35XX_ST_IPSS_MASK (1 << 5)
238
239/* CM_IDLEST2_CORE */
240#define OMAP3430_ST_PKA_SHIFT 4
241#define OMAP3430_ST_PKA_MASK (1 << 4)
242#define OMAP3430_ST_AES1_SHIFT 3
243#define OMAP3430_ST_AES1_MASK (1 << 3)
244#define OMAP3430_ST_RNG_SHIFT 2
245#define OMAP3430_ST_RNG_MASK (1 << 2)
246#define OMAP3430_ST_SHA11_SHIFT 1
247#define OMAP3430_ST_SHA11_MASK (1 << 1)
248#define OMAP3430_ST_DES1_SHIFT 0
249#define OMAP3430_ST_DES1_MASK (1 << 0)
250
251/* CM_IDLEST3_CORE */
252#define OMAP3430ES2_ST_USBTLL_SHIFT 2 85#define OMAP3430ES2_ST_USBTLL_SHIFT 2
253#define OMAP3430ES2_ST_USBTLL_MASK (1 << 2)
254#define OMAP3430ES2_ST_CPEFUSE_SHIFT 0
255#define OMAP3430ES2_ST_CPEFUSE_MASK (1 << 0)
256
257/* CM_AUTOIDLE1_CORE */
258#define OMAP3430_AUTO_MODEM_MASK (1 << 31)
259#define OMAP3430_AUTO_MODEM_SHIFT 31
260#define OMAP3430ES2_AUTO_MMC3_MASK (1 << 30)
261#define OMAP3430ES2_AUTO_MMC3_SHIFT 30
262#define OMAP3430ES2_AUTO_ICR_MASK (1 << 29)
263#define OMAP3430ES2_AUTO_ICR_SHIFT 29
264#define OMAP3430_AUTO_AES2_MASK (1 << 28)
265#define OMAP3430_AUTO_AES2_SHIFT 28
266#define OMAP3430_AUTO_SHA12_MASK (1 << 27)
267#define OMAP3430_AUTO_SHA12_SHIFT 27
268#define OMAP3430_AUTO_DES2_MASK (1 << 26)
269#define OMAP3430_AUTO_DES2_SHIFT 26
270#define OMAP3430_AUTO_MMC2_MASK (1 << 25)
271#define OMAP3430_AUTO_MMC2_SHIFT 25
272#define OMAP3430_AUTO_MMC1_MASK (1 << 24)
273#define OMAP3430_AUTO_MMC1_SHIFT 24
274#define OMAP3430_AUTO_MSPRO_MASK (1 << 23)
275#define OMAP3430_AUTO_MSPRO_SHIFT 23
276#define OMAP3430_AUTO_HDQ_MASK (1 << 22)
277#define OMAP3430_AUTO_HDQ_SHIFT 22
278#define OMAP3430_AUTO_MCSPI4_MASK (1 << 21)
279#define OMAP3430_AUTO_MCSPI4_SHIFT 21
280#define OMAP3430_AUTO_MCSPI3_MASK (1 << 20)
281#define OMAP3430_AUTO_MCSPI3_SHIFT 20
282#define OMAP3430_AUTO_MCSPI2_MASK (1 << 19)
283#define OMAP3430_AUTO_MCSPI2_SHIFT 19
284#define OMAP3430_AUTO_MCSPI1_MASK (1 << 18)
285#define OMAP3430_AUTO_MCSPI1_SHIFT 18
286#define OMAP3430_AUTO_I2C3_MASK (1 << 17)
287#define OMAP3430_AUTO_I2C3_SHIFT 17
288#define OMAP3430_AUTO_I2C2_MASK (1 << 16)
289#define OMAP3430_AUTO_I2C2_SHIFT 16
290#define OMAP3430_AUTO_I2C1_MASK (1 << 15)
291#define OMAP3430_AUTO_I2C1_SHIFT 15
292#define OMAP3430_AUTO_UART2_MASK (1 << 14)
293#define OMAP3430_AUTO_UART2_SHIFT 14
294#define OMAP3430_AUTO_UART1_MASK (1 << 13)
295#define OMAP3430_AUTO_UART1_SHIFT 13
296#define OMAP3430_AUTO_GPT11_MASK (1 << 12)
297#define OMAP3430_AUTO_GPT11_SHIFT 12
298#define OMAP3430_AUTO_GPT10_MASK (1 << 11)
299#define OMAP3430_AUTO_GPT10_SHIFT 11
300#define OMAP3430_AUTO_MCBSP5_MASK (1 << 10)
301#define OMAP3430_AUTO_MCBSP5_SHIFT 10
302#define OMAP3430_AUTO_MCBSP1_MASK (1 << 9)
303#define OMAP3430_AUTO_MCBSP1_SHIFT 9
304#define OMAP3430ES1_AUTO_FAC_MASK (1 << 8)
305#define OMAP3430ES1_AUTO_FAC_SHIFT 8
306#define OMAP3430_AUTO_MAILBOXES_MASK (1 << 7)
307#define OMAP3430_AUTO_MAILBOXES_SHIFT 7
308#define OMAP3430_AUTO_OMAPCTRL_MASK (1 << 6)
309#define OMAP3430_AUTO_OMAPCTRL_SHIFT 6
310#define OMAP3430ES1_AUTO_FSHOSTUSB_MASK (1 << 5)
311#define OMAP3430ES1_AUTO_FSHOSTUSB_SHIFT 5
312#define OMAP3430_AUTO_HSOTGUSB_MASK (1 << 4)
313#define OMAP3430_AUTO_HSOTGUSB_SHIFT 4
314#define OMAP3430ES1_AUTO_D2D_MASK (1 << 3)
315#define OMAP3430ES1_AUTO_D2D_SHIFT 3
316#define OMAP3430_AUTO_SAD2D_MASK (1 << 3)
317#define OMAP3430_AUTO_SAD2D_SHIFT 3
318#define OMAP3430_AUTO_SSI_MASK (1 << 0)
319#define OMAP3430_AUTO_SSI_SHIFT 0
320
321/* CM_AUTOIDLE2_CORE */
322#define OMAP3430_AUTO_PKA_MASK (1 << 4)
323#define OMAP3430_AUTO_PKA_SHIFT 4
324#define OMAP3430_AUTO_AES1_MASK (1 << 3)
325#define OMAP3430_AUTO_AES1_SHIFT 3
326#define OMAP3430_AUTO_RNG_MASK (1 << 2)
327#define OMAP3430_AUTO_RNG_SHIFT 2
328#define OMAP3430_AUTO_SHA11_MASK (1 << 1)
329#define OMAP3430_AUTO_SHA11_SHIFT 1
330#define OMAP3430_AUTO_DES1_MASK (1 << 0)
331#define OMAP3430_AUTO_DES1_SHIFT 0
332
333/* CM_AUTOIDLE3_CORE */
334#define OMAP3430ES2_AUTO_USBHOST (1 << 0)
335#define OMAP3430ES2_AUTO_USBHOST_SHIFT 0
336#define OMAP3430ES2_AUTO_USBTLL (1 << 2)
337#define OMAP3430ES2_AUTO_USBTLL_SHIFT 2
338#define OMAP3430ES2_AUTO_USBTLL_MASK (1 << 2)
339#define OMAP3430_AUTO_MAD2D_SHIFT 3
340#define OMAP3430_AUTO_MAD2D_MASK (1 << 3)
341
342/* CM_CLKSEL_CORE */
343#define OMAP3430_CLKSEL_SSI_SHIFT 8
344#define OMAP3430_CLKSEL_SSI_MASK (0xf << 8) 86#define OMAP3430_CLKSEL_SSI_MASK (0xf << 8)
345#define OMAP3430_CLKSEL_GPT11_MASK (1 << 7) 87#define OMAP3430_CLKSEL_GPT11_MASK (1 << 7)
346#define OMAP3430_CLKSEL_GPT11_SHIFT 7
347#define OMAP3430_CLKSEL_GPT10_MASK (1 << 6) 88#define OMAP3430_CLKSEL_GPT10_MASK (1 << 6)
348#define OMAP3430_CLKSEL_GPT10_SHIFT 6
349#define OMAP3430ES1_CLKSEL_FSHOSTUSB_SHIFT 4
350#define OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK (0x3 << 4) 89#define OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK (0x3 << 4)
351#define OMAP3430_CLKSEL_L4_SHIFT 2 90#define OMAP3430_CLKSEL_L4_SHIFT 2
352#define OMAP3430_CLKSEL_L4_MASK (0x3 << 2)
353#define OMAP3430_CLKSEL_L4_WIDTH 2 91#define OMAP3430_CLKSEL_L4_WIDTH 2
354#define OMAP3430_CLKSEL_L3_SHIFT 0 92#define OMAP3430_CLKSEL_L3_SHIFT 0
355#define OMAP3430_CLKSEL_L3_MASK (0x3 << 0)
356#define OMAP3430_CLKSEL_L3_WIDTH 2 93#define OMAP3430_CLKSEL_L3_WIDTH 2
357#define OMAP3630_CLKSEL_96M_SHIFT 12
358#define OMAP3630_CLKSEL_96M_MASK (0x3 << 12) 94#define OMAP3630_CLKSEL_96M_MASK (0x3 << 12)
359#define OMAP3630_CLKSEL_96M_WIDTH 2
360
361/* CM_CLKSTCTRL_CORE */
362#define OMAP3430ES1_CLKTRCTRL_D2D_SHIFT 4
363#define OMAP3430ES1_CLKTRCTRL_D2D_MASK (0x3 << 4) 95#define OMAP3430ES1_CLKTRCTRL_D2D_MASK (0x3 << 4)
364#define OMAP3430_CLKTRCTRL_L4_SHIFT 2
365#define OMAP3430_CLKTRCTRL_L4_MASK (0x3 << 2) 96#define OMAP3430_CLKTRCTRL_L4_MASK (0x3 << 2)
366#define OMAP3430_CLKTRCTRL_L3_SHIFT 0
367#define OMAP3430_CLKTRCTRL_L3_MASK (0x3 << 0) 97#define OMAP3430_CLKTRCTRL_L3_MASK (0x3 << 0)
368
369/* CM_CLKSTST_CORE */
370#define OMAP3430ES1_CLKACTIVITY_D2D_SHIFT 2
371#define OMAP3430ES1_CLKACTIVITY_D2D_MASK (1 << 2)
372#define OMAP3430_CLKACTIVITY_L4_SHIFT 1
373#define OMAP3430_CLKACTIVITY_L4_MASK (1 << 1)
374#define OMAP3430_CLKACTIVITY_L3_SHIFT 0
375#define OMAP3430_CLKACTIVITY_L3_MASK (1 << 0)
376
377/* CM_FCLKEN_GFX */
378#define OMAP3430ES1_EN_3D_MASK (1 << 2)
379#define OMAP3430ES1_EN_3D_SHIFT 2 98#define OMAP3430ES1_EN_3D_SHIFT 2
380#define OMAP3430ES1_EN_2D_MASK (1 << 1)
381#define OMAP3430ES1_EN_2D_SHIFT 1 99#define OMAP3430ES1_EN_2D_SHIFT 1
382
383/* CM_ICLKEN_GFX specific bits */
384
385/* CM_IDLEST_GFX specific bits */
386
387/* CM_CLKSEL_GFX specific bits */
388
389/* CM_SLEEPDEP_GFX specific bits */
390
391/* CM_CLKSTCTRL_GFX */
392#define OMAP3430ES1_CLKTRCTRL_GFX_SHIFT 0
393#define OMAP3430ES1_CLKTRCTRL_GFX_MASK (0x3 << 0) 100#define OMAP3430ES1_CLKTRCTRL_GFX_MASK (0x3 << 0)
394
395/* CM_CLKSTST_GFX */
396#define OMAP3430ES1_CLKACTIVITY_GFX_SHIFT 0
397#define OMAP3430ES1_CLKACTIVITY_GFX_MASK (1 << 0)
398
399/* CM_FCLKEN_SGX */
400#define OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT 1 101#define OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT 1
401#define OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_MASK (1 << 1)
402
403/* CM_IDLEST_SGX */
404#define OMAP3430ES2_ST_SGX_SHIFT 1
405#define OMAP3430ES2_ST_SGX_MASK (1 << 1)
406
407/* CM_ICLKEN_SGX */
408#define OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT 0 102#define OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT 0
409#define OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_MASK (1 << 0)
410
411/* CM_CLKSEL_SGX */
412#define OMAP3430ES2_CLKSEL_SGX_SHIFT 0
413#define OMAP3430ES2_CLKSEL_SGX_MASK (0x7 << 0) 103#define OMAP3430ES2_CLKSEL_SGX_MASK (0x7 << 0)
414
415/* CM_CLKSTCTRL_SGX */
416#define OMAP3430ES2_CLKTRCTRL_SGX_SHIFT 0
417#define OMAP3430ES2_CLKTRCTRL_SGX_MASK (0x3 << 0) 104#define OMAP3430ES2_CLKTRCTRL_SGX_MASK (0x3 << 0)
418
419/* CM_CLKSTST_SGX */
420#define OMAP3430ES2_CLKACTIVITY_SGX_SHIFT 0
421#define OMAP3430ES2_CLKACTIVITY_SGX_MASK (1 << 0)
422
423/* CM_FCLKEN_WKUP specific bits */
424#define OMAP3430ES2_EN_USIMOCP_SHIFT 9 105#define OMAP3430ES2_EN_USIMOCP_SHIFT 9
425#define OMAP3430ES2_EN_USIMOCP_MASK (1 << 9)
426
427/* CM_ICLKEN_WKUP specific bits */
428#define OMAP3430_EN_WDT1_MASK (1 << 4)
429#define OMAP3430_EN_WDT1_SHIFT 4 106#define OMAP3430_EN_WDT1_SHIFT 4
430#define OMAP3430_EN_32KSYNC_MASK (1 << 2)
431#define OMAP3430_EN_32KSYNC_SHIFT 2 107#define OMAP3430_EN_32KSYNC_SHIFT 2
432
433/* CM_IDLEST_WKUP specific bits */
434#define OMAP3430ES2_ST_USIMOCP_SHIFT 9
435#define OMAP3430ES2_ST_USIMOCP_MASK (1 << 9)
436#define OMAP3430_ST_WDT2_SHIFT 5 108#define OMAP3430_ST_WDT2_SHIFT 5
437#define OMAP3430_ST_WDT2_MASK (1 << 5)
438#define OMAP3430_ST_WDT1_SHIFT 4
439#define OMAP3430_ST_WDT1_MASK (1 << 4)
440#define OMAP3430_ST_32KSYNC_SHIFT 2 109#define OMAP3430_ST_32KSYNC_SHIFT 2
441#define OMAP3430_ST_32KSYNC_MASK (1 << 2)
442
443/* CM_AUTOIDLE_WKUP */
444#define OMAP3430ES2_AUTO_USIMOCP_MASK (1 << 9)
445#define OMAP3430ES2_AUTO_USIMOCP_SHIFT 9
446#define OMAP3430_AUTO_WDT2_MASK (1 << 5)
447#define OMAP3430_AUTO_WDT2_SHIFT 5
448#define OMAP3430_AUTO_WDT1_MASK (1 << 4)
449#define OMAP3430_AUTO_WDT1_SHIFT 4
450#define OMAP3430_AUTO_GPIO1_MASK (1 << 3)
451#define OMAP3430_AUTO_GPIO1_SHIFT 3
452#define OMAP3430_AUTO_32KSYNC_MASK (1 << 2)
453#define OMAP3430_AUTO_32KSYNC_SHIFT 2
454#define OMAP3430_AUTO_GPT12_MASK (1 << 1)
455#define OMAP3430_AUTO_GPT12_SHIFT 1
456#define OMAP3430_AUTO_GPT1_MASK (1 << 0)
457#define OMAP3430_AUTO_GPT1_SHIFT 0
458
459/* CM_CLKSEL_WKUP */
460#define OMAP3430ES2_CLKSEL_USIMOCP_MASK (0xf << 3) 110#define OMAP3430ES2_CLKSEL_USIMOCP_MASK (0xf << 3)
461#define OMAP3430_CLKSEL_RM_SHIFT 1 111#define OMAP3430_CLKSEL_RM_SHIFT 1
462#define OMAP3430_CLKSEL_RM_MASK (0x3 << 1)
463#define OMAP3430_CLKSEL_RM_WIDTH 2 112#define OMAP3430_CLKSEL_RM_WIDTH 2
464#define OMAP3430_CLKSEL_GPT1_SHIFT 0
465#define OMAP3430_CLKSEL_GPT1_MASK (1 << 0) 113#define OMAP3430_CLKSEL_GPT1_MASK (1 << 0)
466
467/* CM_CLKEN_PLL */
468#define OMAP3430_PWRDN_EMU_PERIPH_SHIFT 31 114#define OMAP3430_PWRDN_EMU_PERIPH_SHIFT 31
469#define OMAP3430_PWRDN_CAM_SHIFT 30 115#define OMAP3430_PWRDN_CAM_SHIFT 30
470#define OMAP3430_PWRDN_DSS1_SHIFT 29 116#define OMAP3430_PWRDN_DSS1_SHIFT 29
471#define OMAP3430_PWRDN_TV_SHIFT 28 117#define OMAP3430_PWRDN_TV_SHIFT 28
472#define OMAP3430_PWRDN_96M_SHIFT 27 118#define OMAP3430_PWRDN_96M_SHIFT 27
473#define OMAP3430_PERIPH_DPLL_RAMPTIME_SHIFT 24
474#define OMAP3430_PERIPH_DPLL_RAMPTIME_MASK (0x3 << 24)
475#define OMAP3430_PERIPH_DPLL_FREQSEL_SHIFT 20
476#define OMAP3430_PERIPH_DPLL_FREQSEL_MASK (0xf << 20) 119#define OMAP3430_PERIPH_DPLL_FREQSEL_MASK (0xf << 20)
477#define OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT 19 120#define OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT 19
478#define OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_MASK (1 << 19)
479#define OMAP3430_EN_PERIPH_DPLL_SHIFT 16
480#define OMAP3430_EN_PERIPH_DPLL_MASK (0x7 << 16) 121#define OMAP3430_EN_PERIPH_DPLL_MASK (0x7 << 16)
481#define OMAP3430_PWRDN_EMU_CORE_SHIFT 12 122#define OMAP3430_PWRDN_EMU_CORE_SHIFT 12
482#define OMAP3430_CORE_DPLL_RAMPTIME_SHIFT 8
483#define OMAP3430_CORE_DPLL_RAMPTIME_MASK (0x3 << 8)
484#define OMAP3430_CORE_DPLL_FREQSEL_SHIFT 4
485#define OMAP3430_CORE_DPLL_FREQSEL_MASK (0xf << 4) 123#define OMAP3430_CORE_DPLL_FREQSEL_MASK (0xf << 4)
486#define OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT 3 124#define OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT 3
487#define OMAP3430_EN_CORE_DPLL_DRIFTGUARD_MASK (1 << 3)
488#define OMAP3430_EN_CORE_DPLL_SHIFT 0
489#define OMAP3430_EN_CORE_DPLL_MASK (0x7 << 0) 125#define OMAP3430_EN_CORE_DPLL_MASK (0x7 << 0)
490
491/* CM_CLKEN2_PLL */
492#define OMAP3430ES2_EN_PERIPH2_DPLL_LPMODE_SHIFT 10
493#define OMAP3430ES2_PERIPH2_DPLL_RAMPTIME_MASK (0x3 << 8)
494#define OMAP3430ES2_PERIPH2_DPLL_FREQSEL_SHIFT 4
495#define OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK (0xf << 4) 126#define OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK (0xf << 4)
496#define OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT 3 127#define OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT 3
497#define OMAP3430ES2_EN_PERIPH2_DPLL_SHIFT 0
498#define OMAP3430ES2_EN_PERIPH2_DPLL_MASK (0x7 << 0) 128#define OMAP3430ES2_EN_PERIPH2_DPLL_MASK (0x7 << 0)
499
500/* CM_IDLEST_CKGEN */
501#define OMAP3430_ST_54M_CLK_MASK (1 << 5)
502#define OMAP3430_ST_12M_CLK_MASK (1 << 4)
503#define OMAP3430_ST_48M_CLK_MASK (1 << 3)
504#define OMAP3430_ST_96M_CLK_MASK (1 << 2)
505#define OMAP3430_ST_PERIPH_CLK_SHIFT 1
506#define OMAP3430_ST_PERIPH_CLK_MASK (1 << 1) 129#define OMAP3430_ST_PERIPH_CLK_MASK (1 << 1)
507#define OMAP3430_ST_CORE_CLK_SHIFT 0
508#define OMAP3430_ST_CORE_CLK_MASK (1 << 0) 130#define OMAP3430_ST_CORE_CLK_MASK (1 << 0)
509
510/* CM_IDLEST2_CKGEN */
511#define OMAP3430ES2_ST_USIM_CLK_SHIFT 2
512#define OMAP3430ES2_ST_USIM_CLK_MASK (1 << 2)
513#define OMAP3430ES2_ST_120M_CLK_SHIFT 1
514#define OMAP3430ES2_ST_120M_CLK_MASK (1 << 1)
515#define OMAP3430ES2_ST_PERIPH2_CLK_SHIFT 0
516#define OMAP3430ES2_ST_PERIPH2_CLK_MASK (1 << 0) 131#define OMAP3430ES2_ST_PERIPH2_CLK_MASK (1 << 0)
517
518/* CM_AUTOIDLE_PLL */
519#define OMAP3430_AUTO_PERIPH_DPLL_SHIFT 3
520#define OMAP3430_AUTO_PERIPH_DPLL_MASK (0x7 << 3) 132#define OMAP3430_AUTO_PERIPH_DPLL_MASK (0x7 << 3)
521#define OMAP3430_AUTO_CORE_DPLL_SHIFT 0
522#define OMAP3430_AUTO_CORE_DPLL_MASK (0x7 << 0) 133#define OMAP3430_AUTO_CORE_DPLL_MASK (0x7 << 0)
523
524/* CM_AUTOIDLE2_PLL */
525#define OMAP3430ES2_AUTO_PERIPH2_DPLL_SHIFT 0
526#define OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK (0x7 << 0) 134#define OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK (0x7 << 0)
527
528/* CM_CLKSEL1_PLL */
529/* Note that OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK was (0x3 << 27) on 3430ES1 */
530#define OMAP3430_CORE_DPLL_CLKOUT_DIV_SHIFT 27 135#define OMAP3430_CORE_DPLL_CLKOUT_DIV_SHIFT 27
531#define OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK (0x1f << 27)
532#define OMAP3430_CORE_DPLL_CLKOUT_DIV_WIDTH 5 136#define OMAP3430_CORE_DPLL_CLKOUT_DIV_WIDTH 5
533#define OMAP3430_CORE_DPLL_MULT_SHIFT 16
534#define OMAP3430_CORE_DPLL_MULT_MASK (0x7ff << 16) 137#define OMAP3430_CORE_DPLL_MULT_MASK (0x7ff << 16)
535#define OMAP3430_CORE_DPLL_DIV_SHIFT 8
536#define OMAP3430_CORE_DPLL_DIV_MASK (0x7f << 8) 138#define OMAP3430_CORE_DPLL_DIV_MASK (0x7f << 8)
537#define OMAP3430_SOURCE_96M_SHIFT 6 139#define OMAP3430_SOURCE_96M_SHIFT 6
538#define OMAP3430_SOURCE_96M_MASK (1 << 6)
539#define OMAP3430_SOURCE_96M_WIDTH 1 140#define OMAP3430_SOURCE_96M_WIDTH 1
540#define OMAP3430_SOURCE_54M_SHIFT 5 141#define OMAP3430_SOURCE_54M_SHIFT 5
541#define OMAP3430_SOURCE_54M_MASK (1 << 5)
542#define OMAP3430_SOURCE_54M_WIDTH 1 142#define OMAP3430_SOURCE_54M_WIDTH 1
543#define OMAP3430_SOURCE_48M_SHIFT 3
544#define OMAP3430_SOURCE_48M_MASK (1 << 3) 143#define OMAP3430_SOURCE_48M_MASK (1 << 3)
545
546/* CM_CLKSEL2_PLL */
547#define OMAP3430_PERIPH_DPLL_MULT_SHIFT 8
548#define OMAP3430_PERIPH_DPLL_MULT_MASK (0x7ff << 8) 144#define OMAP3430_PERIPH_DPLL_MULT_MASK (0x7ff << 8)
549#define OMAP3630_PERIPH_DPLL_MULT_MASK (0xfff << 8) 145#define OMAP3630_PERIPH_DPLL_MULT_MASK (0xfff << 8)
550#define OMAP3430_PERIPH_DPLL_DIV_SHIFT 0
551#define OMAP3430_PERIPH_DPLL_DIV_MASK (0x7f << 0) 146#define OMAP3430_PERIPH_DPLL_DIV_MASK (0x7f << 0)
552#define OMAP3630_PERIPH_DPLL_DCO_SEL_SHIFT 21
553#define OMAP3630_PERIPH_DPLL_DCO_SEL_MASK (0x7 << 21) 147#define OMAP3630_PERIPH_DPLL_DCO_SEL_MASK (0x7 << 21)
554#define OMAP3630_PERIPH_DPLL_SD_DIV_SHIFT 24
555#define OMAP3630_PERIPH_DPLL_SD_DIV_MASK (0xff << 24) 148#define OMAP3630_PERIPH_DPLL_SD_DIV_MASK (0xff << 24)
556
557/* CM_CLKSEL3_PLL */
558#define OMAP3430_DIV_96M_SHIFT 0 149#define OMAP3430_DIV_96M_SHIFT 0
559#define OMAP3430_DIV_96M_MASK (0x1f << 0)
560#define OMAP3430_DIV_96M_WIDTH 5
561#define OMAP3630_DIV_96M_MASK (0x3f << 0)
562#define OMAP3630_DIV_96M_WIDTH 6 150#define OMAP3630_DIV_96M_WIDTH 6
563
564/* CM_CLKSEL4_PLL */
565#define OMAP3430ES2_PERIPH2_DPLL_MULT_SHIFT 8
566#define OMAP3430ES2_PERIPH2_DPLL_MULT_MASK (0x7ff << 8) 151#define OMAP3430ES2_PERIPH2_DPLL_MULT_MASK (0x7ff << 8)
567#define OMAP3430ES2_PERIPH2_DPLL_DIV_SHIFT 0
568#define OMAP3430ES2_PERIPH2_DPLL_DIV_MASK (0x7f << 0) 152#define OMAP3430ES2_PERIPH2_DPLL_DIV_MASK (0x7f << 0)
569
570/* CM_CLKSEL5_PLL */
571#define OMAP3430ES2_DIV_120M_SHIFT 0 153#define OMAP3430ES2_DIV_120M_SHIFT 0
572#define OMAP3430ES2_DIV_120M_MASK (0x1f << 0)
573#define OMAP3430ES2_DIV_120M_WIDTH 5 154#define OMAP3430ES2_DIV_120M_WIDTH 5
574
575/* CM_CLKOUT_CTRL */
576#define OMAP3430_CLKOUT2_EN_SHIFT 7 155#define OMAP3430_CLKOUT2_EN_SHIFT 7
577#define OMAP3430_CLKOUT2_EN_MASK (1 << 7)
578#define OMAP3430_CLKOUT2_DIV_SHIFT 3 156#define OMAP3430_CLKOUT2_DIV_SHIFT 3
579#define OMAP3430_CLKOUT2_DIV_MASK (0x7 << 3)
580#define OMAP3430_CLKOUT2_DIV_WIDTH 3 157#define OMAP3430_CLKOUT2_DIV_WIDTH 3
581#define OMAP3430_CLKOUT2SOURCE_SHIFT 0
582#define OMAP3430_CLKOUT2SOURCE_MASK (0x3 << 0) 158#define OMAP3430_CLKOUT2SOURCE_MASK (0x3 << 0)
583
584/* CM_FCLKEN_DSS */
585#define OMAP3430_EN_TV_MASK (1 << 2)
586#define OMAP3430_EN_TV_SHIFT 2 159#define OMAP3430_EN_TV_SHIFT 2
587#define OMAP3430_EN_DSS2_MASK (1 << 1)
588#define OMAP3430_EN_DSS2_SHIFT 1 160#define OMAP3430_EN_DSS2_SHIFT 1
589#define OMAP3430_EN_DSS1_MASK (1 << 0)
590#define OMAP3430_EN_DSS1_SHIFT 0 161#define OMAP3430_EN_DSS1_SHIFT 0
591
592/* CM_ICLKEN_DSS */
593#define OMAP3430_CM_ICLKEN_DSS_EN_DSS_MASK (1 << 0)
594#define OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT 0 162#define OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT 0
595
596/* CM_IDLEST_DSS */
597#define OMAP3430ES2_ST_DSS_IDLE_SHIFT 1 163#define OMAP3430ES2_ST_DSS_IDLE_SHIFT 1
598#define OMAP3430ES2_ST_DSS_IDLE_MASK (1 << 1)
599#define OMAP3430ES2_ST_DSS_STDBY_SHIFT 0 164#define OMAP3430ES2_ST_DSS_STDBY_SHIFT 0
600#define OMAP3430ES2_ST_DSS_STDBY_MASK (1 << 0)
601#define OMAP3430ES1_ST_DSS_SHIFT 0 165#define OMAP3430ES1_ST_DSS_SHIFT 0
602#define OMAP3430ES1_ST_DSS_MASK (1 << 0)
603
604/* CM_AUTOIDLE_DSS */
605#define OMAP3430_AUTO_DSS_MASK (1 << 0)
606#define OMAP3430_AUTO_DSS_SHIFT 0
607
608/* CM_CLKSEL_DSS */
609#define OMAP3430_CLKSEL_TV_SHIFT 8 166#define OMAP3430_CLKSEL_TV_SHIFT 8
610#define OMAP3430_CLKSEL_TV_MASK (0x1f << 8)
611#define OMAP3430_CLKSEL_TV_WIDTH 5
612#define OMAP3630_CLKSEL_TV_MASK (0x3f << 8)
613#define OMAP3630_CLKSEL_TV_WIDTH 6 167#define OMAP3630_CLKSEL_TV_WIDTH 6
614#define OMAP3430_CLKSEL_DSS1_SHIFT 0 168#define OMAP3430_CLKSEL_DSS1_SHIFT 0
615#define OMAP3430_CLKSEL_DSS1_MASK (0x1f << 0)
616#define OMAP3430_CLKSEL_DSS1_WIDTH 5
617#define OMAP3630_CLKSEL_DSS1_MASK (0x3f << 0)
618#define OMAP3630_CLKSEL_DSS1_WIDTH 6 169#define OMAP3630_CLKSEL_DSS1_WIDTH 6
619
620/* CM_SLEEPDEP_DSS specific bits */
621
622/* CM_CLKSTCTRL_DSS */
623#define OMAP3430_CLKTRCTRL_DSS_SHIFT 0
624#define OMAP3430_CLKTRCTRL_DSS_MASK (0x3 << 0) 170#define OMAP3430_CLKTRCTRL_DSS_MASK (0x3 << 0)
625
626/* CM_CLKSTST_DSS */
627#define OMAP3430_CLKACTIVITY_DSS_SHIFT 0
628#define OMAP3430_CLKACTIVITY_DSS_MASK (1 << 0)
629
630/* CM_FCLKEN_CAM specific bits */
631#define OMAP3430_EN_CSI2_MASK (1 << 1)
632#define OMAP3430_EN_CSI2_SHIFT 1 171#define OMAP3430_EN_CSI2_SHIFT 1
633
634/* CM_ICLKEN_CAM specific bits */
635
636/* CM_IDLEST_CAM */
637#define OMAP3430_ST_CAM_MASK (1 << 0)
638
639/* CM_AUTOIDLE_CAM */
640#define OMAP3430_AUTO_CAM_MASK (1 << 0)
641#define OMAP3430_AUTO_CAM_SHIFT 0
642
643/* CM_CLKSEL_CAM */
644#define OMAP3430_CLKSEL_CAM_SHIFT 0 172#define OMAP3430_CLKSEL_CAM_SHIFT 0
645#define OMAP3430_CLKSEL_CAM_MASK (0x1f << 0)
646#define OMAP3430_CLKSEL_CAM_WIDTH 5
647#define OMAP3630_CLKSEL_CAM_MASK (0x3f << 0)
648#define OMAP3630_CLKSEL_CAM_WIDTH 6 173#define OMAP3630_CLKSEL_CAM_WIDTH 6
649
650/* CM_SLEEPDEP_CAM specific bits */
651
652/* CM_CLKSTCTRL_CAM */
653#define OMAP3430_CLKTRCTRL_CAM_SHIFT 0
654#define OMAP3430_CLKTRCTRL_CAM_MASK (0x3 << 0) 174#define OMAP3430_CLKTRCTRL_CAM_MASK (0x3 << 0)
655
656/* CM_CLKSTST_CAM */
657#define OMAP3430_CLKACTIVITY_CAM_SHIFT 0
658#define OMAP3430_CLKACTIVITY_CAM_MASK (1 << 0)
659
660/* CM_FCLKEN_PER specific bits */
661
662/* CM_ICLKEN_PER specific bits */
663
664/* CM_IDLEST_PER */
665#define OMAP3430_ST_WDT3_SHIFT 12
666#define OMAP3430_ST_WDT3_MASK (1 << 12)
667#define OMAP3430_ST_MCBSP4_SHIFT 2 175#define OMAP3430_ST_MCBSP4_SHIFT 2
668#define OMAP3430_ST_MCBSP4_MASK (1 << 2)
669#define OMAP3430_ST_MCBSP3_SHIFT 1 176#define OMAP3430_ST_MCBSP3_SHIFT 1
670#define OMAP3430_ST_MCBSP3_MASK (1 << 1)
671#define OMAP3430_ST_MCBSP2_SHIFT 0 177#define OMAP3430_ST_MCBSP2_SHIFT 0
672#define OMAP3430_ST_MCBSP2_MASK (1 << 0)
673
674/* CM_AUTOIDLE_PER */
675#define OMAP3630_AUTO_UART4_MASK (1 << 18)
676#define OMAP3630_AUTO_UART4_SHIFT 18
677#define OMAP3430_AUTO_GPIO6_MASK (1 << 17)
678#define OMAP3430_AUTO_GPIO6_SHIFT 17
679#define OMAP3430_AUTO_GPIO5_MASK (1 << 16)
680#define OMAP3430_AUTO_GPIO5_SHIFT 16
681#define OMAP3430_AUTO_GPIO4_MASK (1 << 15)
682#define OMAP3430_AUTO_GPIO4_SHIFT 15
683#define OMAP3430_AUTO_GPIO3_MASK (1 << 14)
684#define OMAP3430_AUTO_GPIO3_SHIFT 14
685#define OMAP3430_AUTO_GPIO2_MASK (1 << 13)
686#define OMAP3430_AUTO_GPIO2_SHIFT 13
687#define OMAP3430_AUTO_WDT3_MASK (1 << 12)
688#define OMAP3430_AUTO_WDT3_SHIFT 12
689#define OMAP3430_AUTO_UART3_MASK (1 << 11)
690#define OMAP3430_AUTO_UART3_SHIFT 11
691#define OMAP3430_AUTO_GPT9_MASK (1 << 10)
692#define OMAP3430_AUTO_GPT9_SHIFT 10
693#define OMAP3430_AUTO_GPT8_MASK (1 << 9)
694#define OMAP3430_AUTO_GPT8_SHIFT 9
695#define OMAP3430_AUTO_GPT7_MASK (1 << 8)
696#define OMAP3430_AUTO_GPT7_SHIFT 8
697#define OMAP3430_AUTO_GPT6_MASK (1 << 7)
698#define OMAP3430_AUTO_GPT6_SHIFT 7
699#define OMAP3430_AUTO_GPT5_MASK (1 << 6)
700#define OMAP3430_AUTO_GPT5_SHIFT 6
701#define OMAP3430_AUTO_GPT4_MASK (1 << 5)
702#define OMAP3430_AUTO_GPT4_SHIFT 5
703#define OMAP3430_AUTO_GPT3_MASK (1 << 4)
704#define OMAP3430_AUTO_GPT3_SHIFT 4
705#define OMAP3430_AUTO_GPT2_MASK (1 << 3)
706#define OMAP3430_AUTO_GPT2_SHIFT 3
707#define OMAP3430_AUTO_MCBSP4_MASK (1 << 2)
708#define OMAP3430_AUTO_MCBSP4_SHIFT 2
709#define OMAP3430_AUTO_MCBSP3_MASK (1 << 1)
710#define OMAP3430_AUTO_MCBSP3_SHIFT 1
711#define OMAP3430_AUTO_MCBSP2_MASK (1 << 0)
712#define OMAP3430_AUTO_MCBSP2_SHIFT 0
713
714/* CM_CLKSEL_PER */
715#define OMAP3430_CLKSEL_GPT9_MASK (1 << 7) 178#define OMAP3430_CLKSEL_GPT9_MASK (1 << 7)
716#define OMAP3430_CLKSEL_GPT9_SHIFT 7
717#define OMAP3430_CLKSEL_GPT8_MASK (1 << 6) 179#define OMAP3430_CLKSEL_GPT8_MASK (1 << 6)
718#define OMAP3430_CLKSEL_GPT8_SHIFT 6
719#define OMAP3430_CLKSEL_GPT7_MASK (1 << 5) 180#define OMAP3430_CLKSEL_GPT7_MASK (1 << 5)
720#define OMAP3430_CLKSEL_GPT7_SHIFT 5
721#define OMAP3430_CLKSEL_GPT6_MASK (1 << 4) 181#define OMAP3430_CLKSEL_GPT6_MASK (1 << 4)
722#define OMAP3430_CLKSEL_GPT6_SHIFT 4
723#define OMAP3430_CLKSEL_GPT5_MASK (1 << 3) 182#define OMAP3430_CLKSEL_GPT5_MASK (1 << 3)
724#define OMAP3430_CLKSEL_GPT5_SHIFT 3
725#define OMAP3430_CLKSEL_GPT4_MASK (1 << 2) 183#define OMAP3430_CLKSEL_GPT4_MASK (1 << 2)
726#define OMAP3430_CLKSEL_GPT4_SHIFT 2
727#define OMAP3430_CLKSEL_GPT3_MASK (1 << 1) 184#define OMAP3430_CLKSEL_GPT3_MASK (1 << 1)
728#define OMAP3430_CLKSEL_GPT3_SHIFT 1
729#define OMAP3430_CLKSEL_GPT2_MASK (1 << 0) 185#define OMAP3430_CLKSEL_GPT2_MASK (1 << 0)
730#define OMAP3430_CLKSEL_GPT2_SHIFT 0
731
732/* CM_SLEEPDEP_PER specific bits */
733#define OMAP3430_CM_SLEEPDEP_PER_EN_IVA2_MASK (1 << 2)
734
735/* CM_CLKSTCTRL_PER */
736#define OMAP3430_CLKTRCTRL_PER_SHIFT 0
737#define OMAP3430_CLKTRCTRL_PER_MASK (0x3 << 0) 186#define OMAP3430_CLKTRCTRL_PER_MASK (0x3 << 0)
738
739/* CM_CLKSTST_PER */
740#define OMAP3430_CLKACTIVITY_PER_SHIFT 0
741#define OMAP3430_CLKACTIVITY_PER_MASK (1 << 0)
742
743/* CM_CLKSEL1_EMU */
744#define OMAP3430_DIV_DPLL4_SHIFT 24 187#define OMAP3430_DIV_DPLL4_SHIFT 24
745#define OMAP3430_DIV_DPLL4_MASK (0x1f << 24)
746#define OMAP3430_DIV_DPLL4_WIDTH 5
747#define OMAP3630_DIV_DPLL4_MASK (0x3f << 24)
748#define OMAP3630_DIV_DPLL4_WIDTH 6 188#define OMAP3630_DIV_DPLL4_WIDTH 6
749#define OMAP3430_DIV_DPLL3_SHIFT 16 189#define OMAP3430_DIV_DPLL3_SHIFT 16
750#define OMAP3430_DIV_DPLL3_MASK (0x1f << 16)
751#define OMAP3430_DIV_DPLL3_WIDTH 5 190#define OMAP3430_DIV_DPLL3_WIDTH 5
752#define OMAP3430_CLKSEL_TRACECLK_SHIFT 11 191#define OMAP3430_CLKSEL_TRACECLK_SHIFT 11
753#define OMAP3430_CLKSEL_TRACECLK_MASK (0x7 << 11)
754#define OMAP3430_CLKSEL_TRACECLK_WIDTH 3 192#define OMAP3430_CLKSEL_TRACECLK_WIDTH 3
755#define OMAP3430_CLKSEL_PCLK_SHIFT 8 193#define OMAP3430_CLKSEL_PCLK_SHIFT 8
756#define OMAP3430_CLKSEL_PCLK_MASK (0x7 << 8)
757#define OMAP3430_CLKSEL_PCLK_WIDTH 3 194#define OMAP3430_CLKSEL_PCLK_WIDTH 3
758#define OMAP3430_CLKSEL_PCLKX2_SHIFT 6 195#define OMAP3430_CLKSEL_PCLKX2_SHIFT 6
759#define OMAP3430_CLKSEL_PCLKX2_MASK (0x3 << 6)
760#define OMAP3430_CLKSEL_PCLKX2_WIDTH 2 196#define OMAP3430_CLKSEL_PCLKX2_WIDTH 2
761#define OMAP3430_CLKSEL_ATCLK_SHIFT 4 197#define OMAP3430_CLKSEL_ATCLK_SHIFT 4
762#define OMAP3430_CLKSEL_ATCLK_MASK (0x3 << 4)
763#define OMAP3430_CLKSEL_ATCLK_WIDTH 2 198#define OMAP3430_CLKSEL_ATCLK_WIDTH 2
764#define OMAP3430_TRACE_MUX_CTRL_SHIFT 2 199#define OMAP3430_TRACE_MUX_CTRL_SHIFT 2
765#define OMAP3430_TRACE_MUX_CTRL_MASK (0x3 << 2)
766#define OMAP3430_TRACE_MUX_CTRL_WIDTH 2 200#define OMAP3430_TRACE_MUX_CTRL_WIDTH 2
767#define OMAP3430_MUX_CTRL_SHIFT 0
768#define OMAP3430_MUX_CTRL_MASK (0x3 << 0) 201#define OMAP3430_MUX_CTRL_MASK (0x3 << 0)
769#define OMAP3430_MUX_CTRL_WIDTH 2
770
771/* CM_CLKSTCTRL_EMU */
772#define OMAP3430_CLKTRCTRL_EMU_SHIFT 0
773#define OMAP3430_CLKTRCTRL_EMU_MASK (0x3 << 0) 202#define OMAP3430_CLKTRCTRL_EMU_MASK (0x3 << 0)
774
775/* CM_CLKSTST_EMU */
776#define OMAP3430_CLKACTIVITY_EMU_SHIFT 0
777#define OMAP3430_CLKACTIVITY_EMU_MASK (1 << 0)
778
779/* CM_CLKSEL2_EMU specific bits */
780#define OMAP3430_CORE_DPLL_EMU_MULT_SHIFT 8
781#define OMAP3430_CORE_DPLL_EMU_MULT_MASK (0x7ff << 8)
782#define OMAP3430_CORE_DPLL_EMU_DIV_SHIFT 0
783#define OMAP3430_CORE_DPLL_EMU_DIV_MASK (0x7f << 0)
784
785/* CM_CLKSEL3_EMU specific bits */
786#define OMAP3430_PERIPH_DPLL_EMU_MULT_SHIFT 8
787#define OMAP3430_PERIPH_DPLL_EMU_MULT_MASK (0x7ff << 8)
788#define OMAP3430_PERIPH_DPLL_EMU_DIV_SHIFT 0
789#define OMAP3430_PERIPH_DPLL_EMU_DIV_MASK (0x7f << 0)
790
791/* CM_POLCTRL */
792#define OMAP3430_CLKOUT2_POL_MASK (1 << 0)
793
794/* CM_IDLEST_NEON */
795#define OMAP3430_ST_NEON_MASK (1 << 0)
796
797/* CM_CLKSTCTRL_NEON */
798#define OMAP3430_CLKTRCTRL_NEON_SHIFT 0
799#define OMAP3430_CLKTRCTRL_NEON_MASK (0x3 << 0) 203#define OMAP3430_CLKTRCTRL_NEON_MASK (0x3 << 0)
800
801/* CM_FCLKEN_USBHOST */
802#define OMAP3430ES2_EN_USBHOST2_SHIFT 1 204#define OMAP3430ES2_EN_USBHOST2_SHIFT 1
803#define OMAP3430ES2_EN_USBHOST2_MASK (1 << 1)
804#define OMAP3430ES2_EN_USBHOST1_SHIFT 0 205#define OMAP3430ES2_EN_USBHOST1_SHIFT 0
805#define OMAP3430ES2_EN_USBHOST1_MASK (1 << 0)
806
807/* CM_ICLKEN_USBHOST */
808#define OMAP3430ES2_EN_USBHOST_SHIFT 0 206#define OMAP3430ES2_EN_USBHOST_SHIFT 0
809#define OMAP3430ES2_EN_USBHOST_MASK (1 << 0)
810
811/* CM_IDLEST_USBHOST */
812#define OMAP3430ES2_ST_USBHOST_IDLE_SHIFT 1 207#define OMAP3430ES2_ST_USBHOST_IDLE_SHIFT 1
813#define OMAP3430ES2_ST_USBHOST_IDLE_MASK (1 << 1)
814#define OMAP3430ES2_ST_USBHOST_STDBY_SHIFT 0 208#define OMAP3430ES2_ST_USBHOST_STDBY_SHIFT 0
815#define OMAP3430ES2_ST_USBHOST_STDBY_MASK (1 << 0)
816
817/* CM_AUTOIDLE_USBHOST */
818#define OMAP3430ES2_AUTO_USBHOST_SHIFT 0
819#define OMAP3430ES2_AUTO_USBHOST_MASK (1 << 0)
820
821/* CM_SLEEPDEP_USBHOST */
822#define OMAP3430ES2_EN_MPU_SHIFT 1
823#define OMAP3430ES2_EN_MPU_MASK (1 << 1)
824#define OMAP3430ES2_EN_IVA2_SHIFT 2
825#define OMAP3430ES2_EN_IVA2_MASK (1 << 2)
826
827/* CM_CLKSTCTRL_USBHOST */
828#define OMAP3430ES2_CLKTRCTRL_USBHOST_SHIFT 0
829#define OMAP3430ES2_CLKTRCTRL_USBHOST_MASK (3 << 0) 209#define OMAP3430ES2_CLKTRCTRL_USBHOST_MASK (3 << 0)
830
831/* CM_CLKSTST_USBHOST */
832#define OMAP3430ES2_CLKACTIVITY_USBHOST_SHIFT 0
833#define OMAP3430ES2_CLKACTIVITY_USBHOST_MASK (1 << 0)
834
835/*
836 *
837 */
838
839/* OMAP3XXX CM_CLKSTCTRL_*.CLKTRCTRL_* register bit values */
840#define OMAP34XX_CLKSTCTRL_DISABLE_AUTO 0x0 210#define OMAP34XX_CLKSTCTRL_DISABLE_AUTO 0x0
841#define OMAP34XX_CLKSTCTRL_FORCE_SLEEP 0x1 211#define OMAP34XX_CLKSTCTRL_FORCE_SLEEP 0x1
842#define OMAP34XX_CLKSTCTRL_FORCE_WAKEUP 0x2 212#define OMAP34XX_CLKSTCTRL_FORCE_WAKEUP 0x2
843#define OMAP34XX_CLKSTCTRL_ENABLE_AUTO 0x3 213#define OMAP34XX_CLKSTCTRL_ENABLE_AUTO 0x3
844
845
846#endif 214#endif
diff --git a/arch/arm/mach-omap2/cm-regbits-44xx.h b/arch/arm/mach-omap2/cm-regbits-44xx.h
index 4c6c2f7de65b..4dbbd99b6e1e 100644
--- a/arch/arm/mach-omap2/cm-regbits-44xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-44xx.h
@@ -22,1683 +22,125 @@
22#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H 22#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H
23#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H 23#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H
24 24
25/* Used by CM_L3_1_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP */
26#define OMAP4430_ABE_DYNDEP_SHIFT 3
27#define OMAP4430_ABE_DYNDEP_WIDTH 0x1
28#define OMAP4430_ABE_DYNDEP_MASK (1 << 3)
29
30/*
31 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP,
32 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
33 */
34#define OMAP4430_ABE_STATDEP_SHIFT 3 25#define OMAP4430_ABE_STATDEP_SHIFT 3
35#define OMAP4430_ABE_STATDEP_WIDTH 0x1
36#define OMAP4430_ABE_STATDEP_MASK (1 << 3)
37
38/* Used by CM_L4CFG_DYNAMICDEP */
39#define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16
40#define OMAP4430_ALWONCORE_DYNDEP_WIDTH 0x1
41#define OMAP4430_ALWONCORE_DYNDEP_MASK (1 << 16)
42
43/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */
44#define OMAP4430_ALWONCORE_STATDEP_SHIFT 16
45#define OMAP4430_ALWONCORE_STATDEP_WIDTH 0x1
46#define OMAP4430_ALWONCORE_STATDEP_MASK (1 << 16)
47
48/*
49 * Used by CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE,
50 * CM_AUTOIDLE_DPLL_DDRPHY, CM_AUTOIDLE_DPLL_IVA, CM_AUTOIDLE_DPLL_MPU,
51 * CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB
52 */
53#define OMAP4430_AUTO_DPLL_MODE_SHIFT 0
54#define OMAP4430_AUTO_DPLL_MODE_WIDTH 0x3
55#define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0) 26#define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0)
56
57/* Used by CM_L4CFG_DYNAMICDEP */
58#define OMAP4430_CEFUSE_DYNDEP_SHIFT 17
59#define OMAP4430_CEFUSE_DYNDEP_WIDTH 0x1
60#define OMAP4430_CEFUSE_DYNDEP_MASK (1 << 17)
61
62/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */
63#define OMAP4430_CEFUSE_STATDEP_SHIFT 17
64#define OMAP4430_CEFUSE_STATDEP_WIDTH 0x1
65#define OMAP4430_CEFUSE_STATDEP_MASK (1 << 17)
66
67/* Used by CM1_ABE_CLKSTCTRL */
68#define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_SHIFT 13
69#define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_WIDTH 0x1
70#define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_MASK (1 << 13)
71
72/* Used by CM1_ABE_CLKSTCTRL */
73#define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_SHIFT 12
74#define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_WIDTH 0x1
75#define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_MASK (1 << 12)
76
77/* Used by CM_WKUP_CLKSTCTRL */
78#define OMAP4430_CLKACTIVITY_ABE_LP_CLK_SHIFT 9
79#define OMAP4430_CLKACTIVITY_ABE_LP_CLK_WIDTH 0x1
80#define OMAP4430_CLKACTIVITY_ABE_LP_CLK_MASK (1 << 9)
81
82/* Used by CM1_ABE_CLKSTCTRL */
83#define OMAP4430_CLKACTIVITY_ABE_SYSCLK_SHIFT 11
84#define OMAP4430_CLKACTIVITY_ABE_SYSCLK_WIDTH 0x1
85#define OMAP4430_CLKACTIVITY_ABE_SYSCLK_MASK (1 << 11)
86
87/* Used by CM1_ABE_CLKSTCTRL */
88#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8
89#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_WIDTH 0x1
90#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8)
91
92/* Used by CM_MEMIF_CLKSTCTRL */
93#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11
94#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_WIDTH 0x1
95#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK (1 << 11)
96
97/* Used by CM_MEMIF_CLKSTCTRL */
98#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12
99#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_WIDTH 0x1
100#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK (1 << 12)
101
102/* Used by CM_MEMIF_CLKSTCTRL */
103#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13
104#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_WIDTH 0x1
105#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK (1 << 13)
106
107/* Used by CM_CAM_CLKSTCTRL */
108#define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_SHIFT 9
109#define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_WIDTH 0x1
110#define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_MASK (1 << 9)
111
112/* Used by CM_ALWON_CLKSTCTRL */
113#define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_SHIFT 12
114#define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_WIDTH 0x1
115#define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_MASK (1 << 12)
116
117/* Used by CM_EMU_CLKSTCTRL */
118#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_SHIFT 9
119#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_WIDTH 0x1
120#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_MASK (1 << 9)
121
122/* Used by CM_L4CFG_CLKSTCTRL */
123#define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_SHIFT 9
124#define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_WIDTH 0x1
125#define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_MASK (1 << 9)
126
127/* Used by CM_CEFUSE_CLKSTCTRL */
128#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9
129#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_WIDTH 0x1
130#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9)
131
132/* Used by CM_MEMIF_CLKSTCTRL */
133#define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9
134#define OMAP4430_CLKACTIVITY_DLL_CLK_WIDTH 0x1
135#define OMAP4430_CLKACTIVITY_DLL_CLK_MASK (1 << 9)
136
137/* Used by CM_L4PER_CLKSTCTRL */
138#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9
139#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_WIDTH 0x1
140#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK (1 << 9)
141
142/* Used by CM_L4PER_CLKSTCTRL */
143#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10
144#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_WIDTH 0x1
145#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK (1 << 10)
146
147/* Used by CM_L4PER_CLKSTCTRL */
148#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11
149#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_WIDTH 0x1
150#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK (1 << 11)
151
152/* Used by CM_L4PER_CLKSTCTRL */
153#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12
154#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_WIDTH 0x1
155#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK (1 << 12)
156
157/* Used by CM_L4PER_CLKSTCTRL */
158#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13
159#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_WIDTH 0x1
160#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK (1 << 13)
161
162/* Used by CM_L4PER_CLKSTCTRL */
163#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14
164#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_WIDTH 0x1
165#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK (1 << 14)
166
167/* Used by CM_DSS_CLKSTCTRL */
168#define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_SHIFT 10
169#define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_WIDTH 0x1
170#define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_MASK (1 << 10)
171
172/* Used by CM_DSS_CLKSTCTRL */
173#define OMAP4430_CLKACTIVITY_DSS_FCLK_SHIFT 9
174#define OMAP4430_CLKACTIVITY_DSS_FCLK_WIDTH 0x1
175#define OMAP4430_CLKACTIVITY_DSS_FCLK_MASK (1 << 9)
176
177/* Used by CM_DUCATI_CLKSTCTRL */
178#define OMAP4430_CLKACTIVITY_DUCATI_GCLK_SHIFT 8
179#define OMAP4430_CLKACTIVITY_DUCATI_GCLK_WIDTH 0x1
180#define OMAP4430_CLKACTIVITY_DUCATI_GCLK_MASK (1 << 8)
181
182/* Used by CM_EMU_CLKSTCTRL */
183#define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_SHIFT 8
184#define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_WIDTH 0x1
185#define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_MASK (1 << 8)
186
187/* Used by CM_CAM_CLKSTCTRL */
188#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10
189#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_WIDTH 0x1
190#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK (1 << 10)
191
192/* Used by CM_L4PER_CLKSTCTRL */
193#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15
194#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_WIDTH 0x1
195#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK (1 << 15)
196
197/* Used by CM1_ABE_CLKSTCTRL */
198#define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_SHIFT 10
199#define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_WIDTH 0x1
200#define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_MASK (1 << 10)
201
202/* Used by CM_DSS_CLKSTCTRL */
203#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11
204#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_WIDTH 0x1
205#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK (1 << 11)
206
207/* Used by CM_L3INIT_CLKSTCTRL */
208#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20
209#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_WIDTH 0x1
210#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20)
211
212/* Used by CM_L3INIT_CLKSTCTRL */
213#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26
214#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_WIDTH 0x1
215#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26)
216
217/* Used by CM_L3INIT_CLKSTCTRL */
218#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21
219#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_WIDTH 0x1
220#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21)
221
222/* Used by CM_L3INIT_CLKSTCTRL */
223#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27
224#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_WIDTH 0x1
225#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27)
226
227/* Used by CM_L3INIT_CLKSTCTRL */
228#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13
229#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_WIDTH 0x1
230#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK (1 << 13)
231
232/* Used by CM_L3INIT_CLKSTCTRL */
233#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12
234#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_WIDTH 0x1
235#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK (1 << 12)
236
237/* Used by CM_L3INIT_CLKSTCTRL */
238#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28
239#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_WIDTH 0x1
240#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK (1 << 28)
241
242/* Used by CM_L3INIT_CLKSTCTRL */
243#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29
244#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_WIDTH 0x1
245#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK (1 << 29)
246
247/* Used by CM_L3INIT_CLKSTCTRL */
248#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11
249#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_WIDTH 0x1
250#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK (1 << 11)
251
252/* Used by CM_L3INIT_CLKSTCTRL */
253#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16
254#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_WIDTH 0x1
255#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK (1 << 16)
256
257/* Used by CM_L3INIT_CLKSTCTRL */
258#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17
259#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_WIDTH 0x1
260#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK (1 << 17)
261
262/* Used by CM_L3INIT_CLKSTCTRL */
263#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18
264#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_WIDTH 0x1
265#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK (1 << 18)
266
267/* Used by CM_L3INIT_CLKSTCTRL */
268#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19
269#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_WIDTH 0x1
270#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK (1 << 19)
271
272/* Used by CM_CAM_CLKSTCTRL */
273#define OMAP4430_CLKACTIVITY_ISS_GCLK_SHIFT 8
274#define OMAP4430_CLKACTIVITY_ISS_GCLK_WIDTH 0x1
275#define OMAP4430_CLKACTIVITY_ISS_GCLK_MASK (1 << 8)
276
277/* Used by CM_IVAHD_CLKSTCTRL */
278#define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_SHIFT 8
279#define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_WIDTH 0x1
280#define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_MASK (1 << 8)
281
282/* Used by CM_D2D_CLKSTCTRL */
283#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT 10
284#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_WIDTH 0x1
285#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK (1 << 10)
286
287/* Used by CM_L3_1_CLKSTCTRL */
288#define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8
289#define OMAP4430_CLKACTIVITY_L3_1_GICLK_WIDTH 0x1
290#define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK (1 << 8)
291
292/* Used by CM_L3_2_CLKSTCTRL */
293#define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8
294#define OMAP4430_CLKACTIVITY_L3_2_GICLK_WIDTH 0x1
295#define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK (1 << 8)
296
297/* Used by CM_D2D_CLKSTCTRL */
298#define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_SHIFT 8
299#define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_WIDTH 0x1
300#define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_MASK (1 << 8)
301
302/* Used by CM_SDMA_CLKSTCTRL */
303#define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_SHIFT 8
304#define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_WIDTH 0x1
305#define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_MASK (1 << 8)
306
307/* Used by CM_DSS_CLKSTCTRL */
308#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8
309#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_WIDTH 0x1
310#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK (1 << 8)
311
312/* Used by CM_MEMIF_CLKSTCTRL */
313#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8
314#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_WIDTH 0x1
315#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK (1 << 8)
316
317/* Used by CM_GFX_CLKSTCTRL */
318#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8
319#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_WIDTH 0x1
320#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK (1 << 8)
321
322/* Used by CM_L3INIT_CLKSTCTRL */
323#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8
324#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_WIDTH 0x1
325#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK (1 << 8)
326
327/* Used by CM_L3INSTR_CLKSTCTRL */
328#define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_SHIFT 8
329#define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_WIDTH 0x1
330#define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_MASK (1 << 8)
331
332/* Used by CM_L4SEC_CLKSTCTRL */
333#define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_SHIFT 8
334#define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_WIDTH 0x1
335#define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_MASK (1 << 8)
336
337/* Used by CM_ALWON_CLKSTCTRL */
338#define OMAP4430_CLKACTIVITY_L4_AO_ICLK_SHIFT 8
339#define OMAP4430_CLKACTIVITY_L4_AO_ICLK_WIDTH 0x1
340#define OMAP4430_CLKACTIVITY_L4_AO_ICLK_MASK (1 << 8)
341
342/* Used by CM_CEFUSE_CLKSTCTRL */
343#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8
344#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_WIDTH 0x1
345#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8)
346
347/* Used by CM_L4CFG_CLKSTCTRL */
348#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8
349#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_WIDTH 0x1
350#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK (1 << 8)
351
352/* Used by CM_D2D_CLKSTCTRL */
353#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9
354#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_WIDTH 0x1
355#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK (1 << 9)
356
357/* Used by CM_L3INIT_CLKSTCTRL */
358#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9
359#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_WIDTH 0x1
360#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK (1 << 9)
361
362/* Used by CM_L4PER_CLKSTCTRL */
363#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8
364#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_WIDTH 0x1
365#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK (1 << 8)
366
367/* Used by CM_L4SEC_CLKSTCTRL */
368#define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_SHIFT 9
369#define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_WIDTH 0x1
370#define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_MASK (1 << 9)
371
372/* Used by CM_WKUP_CLKSTCTRL */
373#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12
374#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_WIDTH 0x1
375#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK (1 << 12)
376
377/* Used by CM_MPU_CLKSTCTRL */
378#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8
379#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_WIDTH 0x1
380#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK (1 << 8)
381
382/* Used by CM1_ABE_CLKSTCTRL */
383#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9
384#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_WIDTH 0x1
385#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK (1 << 9)
386
387/* Used by CM_L4PER_CLKSTCTRL */
388#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16
389#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_WIDTH 0x1
390#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK (1 << 16)
391
392/* Used by CM_L4PER_CLKSTCTRL */
393#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17
394#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_WIDTH 0x1
395#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17)
396
397/* Used by CM_L4PER_CLKSTCTRL */
398#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18
399#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_WIDTH 0x1
400#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18)
401
402/* Used by CM_L4PER_CLKSTCTRL */
403#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19
404#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_WIDTH 0x1
405#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19)
406
407/* Used by CM_L4PER_CLKSTCTRL */
408#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25
409#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_WIDTH 0x1
410#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK (1 << 25)
411
412/* Used by CM_L4PER_CLKSTCTRL */
413#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20
414#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_WIDTH 0x1
415#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK (1 << 20)
416
417/* Used by CM_L4PER_CLKSTCTRL */
418#define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_SHIFT 21
419#define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_MASK (1 << 21)
420
421/* Used by CM_L4PER_CLKSTCTRL */
422#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22
423#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_WIDTH 0x1
424#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK (1 << 22)
425
426/* Used by CM_L4PER_CLKSTCTRL */
427#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24
428#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_WIDTH 0x1
429#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK (1 << 24)
430
431/* Used by CM_MEMIF_CLKSTCTRL */
432#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10
433#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_WIDTH 0x1
434#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK (1 << 10)
435
436/* Used by CM_GFX_CLKSTCTRL */
437#define OMAP4430_CLKACTIVITY_SGX_GFCLK_SHIFT 9
438#define OMAP4430_CLKACTIVITY_SGX_GFCLK_WIDTH 0x1
439#define OMAP4430_CLKACTIVITY_SGX_GFCLK_MASK (1 << 9)
440
441/* Used by CM_ALWON_CLKSTCTRL */
442#define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_SHIFT 11
443#define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_WIDTH 0x1
444#define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_MASK (1 << 11)
445
446/* Used by CM_ALWON_CLKSTCTRL */
447#define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_SHIFT 10
448#define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_WIDTH 0x1
449#define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_MASK (1 << 10)
450
451/* Used by CM_ALWON_CLKSTCTRL */
452#define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_SHIFT 9
453#define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_WIDTH 0x1
454#define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_MASK (1 << 9)
455
456/* Used by CM_WKUP_CLKSTCTRL */
457#define OMAP4430_CLKACTIVITY_SYS_CLK_SHIFT 8
458#define OMAP4430_CLKACTIVITY_SYS_CLK_WIDTH 0x1
459#define OMAP4430_CLKACTIVITY_SYS_CLK_MASK (1 << 8)
460
461/* Used by CM_TESLA_CLKSTCTRL */
462#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8
463#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_WIDTH 0x1
464#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK (1 << 8)
465
466/* Used by CM_L3INIT_CLKSTCTRL */
467#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22
468#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_WIDTH 0x1
469#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22)
470
471/* Used by CM_L3INIT_CLKSTCTRL */
472#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23
473#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_WIDTH 0x1
474#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23)
475
476/* Used by CM_L3INIT_CLKSTCTRL */
477#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24
478#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_WIDTH 0x1
479#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24)
480
481/* Used by CM_L3INIT_CLKSTCTRL */
482#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT 10
483#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_WIDTH 0x1
484#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK (1 << 10)
485
486/* Used by CM_L3INIT_CLKSTCTRL */
487#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14
488#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_WIDTH 0x1
489#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14)
490
491/* Used by CM_L3INIT_CLKSTCTRL */
492#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15
493#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_WIDTH 0x1
494#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15)
495
496/* Used by CM_WKUP_CLKSTCTRL */
497#define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10
498#define OMAP4430_CLKACTIVITY_USIM_GFCLK_WIDTH 0x1
499#define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK (1 << 10)
500
501/* Used by CM_L3INIT_CLKSTCTRL */
502#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30
503#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_WIDTH 0x1
504#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30)
505
506/* Used by CM_L3INIT_CLKSTCTRL */
507#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25
508#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_WIDTH 0x1
509#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25)
510
511/* Used by CM_WKUP_CLKSTCTRL */
512#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_SHIFT 11
513#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_WIDTH 0x1
514#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_MASK (1 << 11)
515
516/* Used by CM_WKUP_CLKSTCTRL */
517#define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_SHIFT 13
518#define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_WIDTH 0x1
519#define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_MASK (1 << 13)
520
521/*
522 * Used by CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL,
523 * CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
524 * CM_L3INIT_MMC2_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL,
525 * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL,
526 * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL,
527 * CM_L4PER_DMTIMER9_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL
528 */
529#define OMAP4430_CLKSEL_SHIFT 24 27#define OMAP4430_CLKSEL_SHIFT 24
530#define OMAP4430_CLKSEL_WIDTH 0x1 28#define OMAP4430_CLKSEL_WIDTH 0x1
531#define OMAP4430_CLKSEL_MASK (1 << 24) 29#define OMAP4430_CLKSEL_MASK (1 << 24)
532
533/*
534 * Renamed from CLKSEL Used by CM_ABE_DSS_SYS_CLKSEL, CM_ABE_PLL_REF_CLKSEL,
535 * CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ, CM_L4_WKUP_CLKSEL
536 */
537#define OMAP4430_CLKSEL_0_0_SHIFT 0 30#define OMAP4430_CLKSEL_0_0_SHIFT 0
538#define OMAP4430_CLKSEL_0_0_WIDTH 0x1 31#define OMAP4430_CLKSEL_0_0_WIDTH 0x1
539#define OMAP4430_CLKSEL_0_0_MASK (1 << 0)
540
541/* Renamed from CLKSEL Used by CM_BYPCLK_DPLL_IVA, CM_BYPCLK_DPLL_MPU */
542#define OMAP4430_CLKSEL_0_1_SHIFT 0 32#define OMAP4430_CLKSEL_0_1_SHIFT 0
543#define OMAP4430_CLKSEL_0_1_WIDTH 0x2 33#define OMAP4430_CLKSEL_0_1_WIDTH 0x2
544#define OMAP4430_CLKSEL_0_1_MASK (0x3 << 0)
545
546/* Renamed from CLKSEL Used by CM_L3INIT_HSI_CLKCTRL */
547#define OMAP4430_CLKSEL_24_25_SHIFT 24 34#define OMAP4430_CLKSEL_24_25_SHIFT 24
548#define OMAP4430_CLKSEL_24_25_WIDTH 0x2 35#define OMAP4430_CLKSEL_24_25_WIDTH 0x2
549#define OMAP4430_CLKSEL_24_25_MASK (0x3 << 24)
550
551/* Used by CM_L3INIT_USB_OTG_CLKCTRL */
552#define OMAP4430_CLKSEL_60M_SHIFT 24 36#define OMAP4430_CLKSEL_60M_SHIFT 24
553#define OMAP4430_CLKSEL_60M_WIDTH 0x1 37#define OMAP4430_CLKSEL_60M_WIDTH 0x1
554#define OMAP4430_CLKSEL_60M_MASK (1 << 24)
555
556/* Used by CM_MPU_MPU_CLKCTRL */
557#define OMAP4460_CLKSEL_ABE_DIV_MODE_SHIFT 25
558#define OMAP4460_CLKSEL_ABE_DIV_MODE_WIDTH 0x1
559#define OMAP4460_CLKSEL_ABE_DIV_MODE_MASK (1 << 25)
560
561/* Used by CM1_ABE_AESS_CLKCTRL */
562#define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24 38#define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24
563#define OMAP4430_CLKSEL_AESS_FCLK_WIDTH 0x1 39#define OMAP4430_CLKSEL_AESS_FCLK_WIDTH 0x1
564#define OMAP4430_CLKSEL_AESS_FCLK_MASK (1 << 24)
565
566/* Used by CM_CLKSEL_CORE */
567#define OMAP4430_CLKSEL_CORE_SHIFT 0 40#define OMAP4430_CLKSEL_CORE_SHIFT 0
568#define OMAP4430_CLKSEL_CORE_WIDTH 0x1 41#define OMAP4430_CLKSEL_CORE_WIDTH 0x1
569#define OMAP4430_CLKSEL_CORE_MASK (1 << 0)
570
571/* Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2 */
572#define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1
573#define OMAP4430_CLKSEL_CORE_1_1_WIDTH 0x1
574#define OMAP4430_CLKSEL_CORE_1_1_MASK (1 << 1)
575
576/* Used by CM_WKUP_USIM_CLKCTRL */
577#define OMAP4430_CLKSEL_DIV_SHIFT 24 42#define OMAP4430_CLKSEL_DIV_SHIFT 24
578#define OMAP4430_CLKSEL_DIV_WIDTH 0x1 43#define OMAP4430_CLKSEL_DIV_WIDTH 0x1
579#define OMAP4430_CLKSEL_DIV_MASK (1 << 24)
580
581/* Used by CM_MPU_MPU_CLKCTRL */
582#define OMAP4460_CLKSEL_EMIF_DIV_MODE_SHIFT 24
583#define OMAP4460_CLKSEL_EMIF_DIV_MODE_WIDTH 0x1
584#define OMAP4460_CLKSEL_EMIF_DIV_MODE_MASK (1 << 24)
585
586/* Used by CM_CAM_FDIF_CLKCTRL */
587#define OMAP4430_CLKSEL_FCLK_SHIFT 24 44#define OMAP4430_CLKSEL_FCLK_SHIFT 24
588#define OMAP4430_CLKSEL_FCLK_WIDTH 0x2 45#define OMAP4430_CLKSEL_FCLK_WIDTH 0x2
589#define OMAP4430_CLKSEL_FCLK_MASK (0x3 << 24)
590
591/* Used by CM_L4PER_MCBSP4_CLKCTRL */
592#define OMAP4430_CLKSEL_INTERNAL_SOURCE_SHIFT 25 46#define OMAP4430_CLKSEL_INTERNAL_SOURCE_SHIFT 25
593#define OMAP4430_CLKSEL_INTERNAL_SOURCE_WIDTH 0x1 47#define OMAP4430_CLKSEL_INTERNAL_SOURCE_WIDTH 0x1
594#define OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK (1 << 25)
595
596/*
597 * Renamed from CLKSEL_INTERNAL_SOURCE Used by CM1_ABE_DMIC_CLKCTRL,
598 * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL,
599 * CM1_ABE_MCBSP3_CLKCTRL
600 */
601#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26
602#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_WIDTH 0x2
603#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK (0x3 << 26)
604
605/* Used by CM_CLKSEL_CORE */
606#define OMAP4430_CLKSEL_L3_SHIFT 4 48#define OMAP4430_CLKSEL_L3_SHIFT 4
607#define OMAP4430_CLKSEL_L3_WIDTH 0x1 49#define OMAP4430_CLKSEL_L3_WIDTH 0x1
608#define OMAP4430_CLKSEL_L3_MASK (1 << 4)
609
610/* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */
611#define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2
612#define OMAP4430_CLKSEL_L3_SHADOW_WIDTH 0x1
613#define OMAP4430_CLKSEL_L3_SHADOW_MASK (1 << 2)
614
615/* Used by CM_CLKSEL_CORE */
616#define OMAP4430_CLKSEL_L4_SHIFT 8 50#define OMAP4430_CLKSEL_L4_SHIFT 8
617#define OMAP4430_CLKSEL_L4_WIDTH 0x1 51#define OMAP4430_CLKSEL_L4_WIDTH 0x1
618#define OMAP4430_CLKSEL_L4_MASK (1 << 8)
619
620/* Used by CM_CLKSEL_ABE */
621#define OMAP4430_CLKSEL_OPP_SHIFT 0 52#define OMAP4430_CLKSEL_OPP_SHIFT 0
622#define OMAP4430_CLKSEL_OPP_WIDTH 0x2 53#define OMAP4430_CLKSEL_OPP_WIDTH 0x2
623#define OMAP4430_CLKSEL_OPP_MASK (0x3 << 0)
624
625/* Used by CM_EMU_DEBUGSS_CLKCTRL */
626#define OMAP4430_CLKSEL_PMD_STM_CLK_SHIFT 27 54#define OMAP4430_CLKSEL_PMD_STM_CLK_SHIFT 27
627#define OMAP4430_CLKSEL_PMD_STM_CLK_WIDTH 0x3 55#define OMAP4430_CLKSEL_PMD_STM_CLK_WIDTH 0x3
628#define OMAP4430_CLKSEL_PMD_STM_CLK_MASK (0x7 << 27)
629
630/* Used by CM_EMU_DEBUGSS_CLKCTRL */
631#define OMAP4430_CLKSEL_PMD_TRACE_CLK_SHIFT 24
632#define OMAP4430_CLKSEL_PMD_TRACE_CLK_WIDTH 0x3
633#define OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK (0x7 << 24) 56#define OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK (0x7 << 24)
634
635/* Used by CM_GFX_GFX_CLKCTRL */
636#define OMAP4430_CLKSEL_SGX_FCLK_SHIFT 24
637#define OMAP4430_CLKSEL_SGX_FCLK_WIDTH 0x1
638#define OMAP4430_CLKSEL_SGX_FCLK_MASK (1 << 24) 57#define OMAP4430_CLKSEL_SGX_FCLK_MASK (1 << 24)
639
640/*
641 * Used by CM1_ABE_DMIC_CLKCTRL, CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL,
642 * CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL
643 */
644#define OMAP4430_CLKSEL_SOURCE_SHIFT 24
645#define OMAP4430_CLKSEL_SOURCE_WIDTH 0x2
646#define OMAP4430_CLKSEL_SOURCE_MASK (0x3 << 24) 58#define OMAP4430_CLKSEL_SOURCE_MASK (0x3 << 24)
647
648/* Renamed from CLKSEL_SOURCE Used by CM_L4PER_MCBSP4_CLKCTRL */
649#define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24
650#define OMAP4430_CLKSEL_SOURCE_24_24_WIDTH 0x1
651#define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24) 59#define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24)
652
653/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
654#define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24 60#define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24
655#define OMAP4430_CLKSEL_UTMI_P1_WIDTH 0x1 61#define OMAP4430_CLKSEL_UTMI_P1_WIDTH 0x1
656#define OMAP4430_CLKSEL_UTMI_P1_MASK (1 << 24)
657
658/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
659#define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25 62#define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25
660#define OMAP4430_CLKSEL_UTMI_P2_WIDTH 0x1 63#define OMAP4430_CLKSEL_UTMI_P2_WIDTH 0x1
661#define OMAP4430_CLKSEL_UTMI_P2_MASK (1 << 25)
662
663/*
664 * Used by CM1_ABE_CLKSTCTRL, CM_ALWON_CLKSTCTRL, CM_CAM_CLKSTCTRL,
665 * CM_CEFUSE_CLKSTCTRL, CM_D2D_CLKSTCTRL, CM_DSS_CLKSTCTRL,
666 * CM_DUCATI_CLKSTCTRL, CM_EMU_CLKSTCTRL, CM_GFX_CLKSTCTRL, CM_IVAHD_CLKSTCTRL,
667 * CM_L3INIT_CLKSTCTRL, CM_L3INSTR_CLKSTCTRL, CM_L3_1_CLKSTCTRL,
668 * CM_L3_2_CLKSTCTRL, CM_L4CFG_CLKSTCTRL, CM_L4PER_CLKSTCTRL,
669 * CM_L4SEC_CLKSTCTRL, CM_MEMIF_CLKSTCTRL, CM_MPU_CLKSTCTRL, CM_SDMA_CLKSTCTRL,
670 * CM_TESLA_CLKSTCTRL, CM_WKUP_CLKSTCTRL
671 */
672#define OMAP4430_CLKTRCTRL_SHIFT 0 64#define OMAP4430_CLKTRCTRL_SHIFT 0
673#define OMAP4430_CLKTRCTRL_WIDTH 0x2
674#define OMAP4430_CLKTRCTRL_MASK (0x3 << 0) 65#define OMAP4430_CLKTRCTRL_MASK (0x3 << 0)
675
676/* Used by CM_EMU_OVERRIDE_DPLL_CORE */
677#define OMAP4430_CORE_DPLL_EMU_DIV_SHIFT 0
678#define OMAP4430_CORE_DPLL_EMU_DIV_WIDTH 0x7
679#define OMAP4430_CORE_DPLL_EMU_DIV_MASK (0x7f << 0)
680
681/* Used by CM_EMU_OVERRIDE_DPLL_CORE */
682#define OMAP4430_CORE_DPLL_EMU_MULT_SHIFT 8
683#define OMAP4430_CORE_DPLL_EMU_MULT_WIDTH 0xb
684#define OMAP4430_CORE_DPLL_EMU_MULT_MASK (0x7ff << 8)
685
686/* Used by REVISION_CM1, REVISION_CM2 */
687#define OMAP4430_CUSTOM_SHIFT 6
688#define OMAP4430_CUSTOM_WIDTH 0x2
689#define OMAP4430_CUSTOM_MASK (0x3 << 6)
690
691/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
692#define OMAP4430_D2D_DYNDEP_SHIFT 18
693#define OMAP4430_D2D_DYNDEP_WIDTH 0x1
694#define OMAP4430_D2D_DYNDEP_MASK (1 << 18)
695
696/* Used by CM_MPU_STATICDEP */
697#define OMAP4430_D2D_STATDEP_SHIFT 18
698#define OMAP4430_D2D_STATDEP_WIDTH 0x1
699#define OMAP4430_D2D_STATDEP_MASK (1 << 18)
700
701/* Used by CM_CLKSEL_DPLL_MPU */
702#define OMAP4460_DCC_COUNT_MAX_SHIFT 24
703#define OMAP4460_DCC_COUNT_MAX_WIDTH 0x8
704#define OMAP4460_DCC_COUNT_MAX_MASK (0xff << 24)
705
706/* Used by CM_CLKSEL_DPLL_MPU */
707#define OMAP4460_DCC_EN_SHIFT 22
708#define OMAP4460_DCC_EN_MASK (1 << 22)
709
710/*
711 * Used by CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE,
712 * CM_SSC_DELTAMSTEP_DPLL_DDRPHY, CM_SSC_DELTAMSTEP_DPLL_IVA,
713 * CM_SSC_DELTAMSTEP_DPLL_MPU, CM_SSC_DELTAMSTEP_DPLL_PER,
714 * CM_SSC_DELTAMSTEP_DPLL_UNIPRO, CM_SSC_DELTAMSTEP_DPLL_USB
715 */
716#define OMAP4430_DELTAMSTEP_SHIFT 0
717#define OMAP4430_DELTAMSTEP_WIDTH 0x14
718#define OMAP4430_DELTAMSTEP_MASK (0xfffff << 0)
719
720/* Renamed from DELTAMSTEP Used by CM_SSC_DELTAMSTEP_DPLL_USB */
721#define OMAP4460_DELTAMSTEP_0_20_SHIFT 0
722#define OMAP4460_DELTAMSTEP_0_20_WIDTH 0x15
723#define OMAP4460_DELTAMSTEP_0_20_MASK (0x1fffff << 0)
724
725/* Used by CM_DLL_CTRL */
726#define OMAP4430_DLL_OVERRIDE_SHIFT 0
727#define OMAP4430_DLL_OVERRIDE_WIDTH 0x1
728#define OMAP4430_DLL_OVERRIDE_MASK (1 << 0)
729
730/* Renamed from DLL_OVERRIDE Used by CM_SHADOW_FREQ_CONFIG1 */
731#define OMAP4430_DLL_OVERRIDE_2_2_SHIFT 2
732#define OMAP4430_DLL_OVERRIDE_2_2_WIDTH 0x1
733#define OMAP4430_DLL_OVERRIDE_2_2_MASK (1 << 2)
734
735/* Used by CM_SHADOW_FREQ_CONFIG1 */
736#define OMAP4430_DLL_RESET_SHIFT 3
737#define OMAP4430_DLL_RESET_WIDTH 0x1
738#define OMAP4430_DLL_RESET_MASK (1 << 3)
739
740/*
741 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY,
742 * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER,
743 * CM_CLKSEL_DPLL_UNIPRO, CM_CLKSEL_DPLL_USB
744 */
745#define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23 66#define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23
746#define OMAP4430_DPLL_BYP_CLKSEL_WIDTH 0x1 67#define OMAP4430_DPLL_BYP_CLKSEL_WIDTH 0x1
747#define OMAP4430_DPLL_BYP_CLKSEL_MASK (1 << 23)
748
749/* Used by CM_CLKDCOLDO_DPLL_USB */
750#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8
751#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_WIDTH 0x1
752#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8)
753
754/* Used by CM_CLKSEL_DPLL_CORE */
755#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20
756#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_WIDTH 0x1
757#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20)
758
759/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
760#define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0
761#define OMAP4430_DPLL_CLKOUTHIF_DIV_WIDTH 0x5
762#define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0) 68#define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0)
763
764/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
765#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5
766#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_WIDTH 0x1
767#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK (1 << 5)
768
769/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
770#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8 69#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8
771#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_WIDTH 0x1
772#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK (1 << 8)
773
774/* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */
775#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_SHIFT 10
776#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_WIDTH 0x1
777#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10) 70#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10)
778
779/*
780 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
781 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
782 */
783#define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0 71#define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0
784#define OMAP4430_DPLL_CLKOUT_DIV_WIDTH 0x5 72#define OMAP4430_DPLL_CLKOUT_DIV_WIDTH 0x5
785#define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0) 73#define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
786
787/* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_USB */
788#define OMAP4430_DPLL_CLKOUT_DIV_0_6_SHIFT 0
789#define OMAP4430_DPLL_CLKOUT_DIV_0_6_WIDTH 0x7
790#define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0) 74#define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0)
791
792/*
793 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
794 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
795 */
796#define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5
797#define OMAP4430_DPLL_CLKOUT_DIVCHACK_WIDTH 0x1
798#define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5)
799
800/* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_USB */
801#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_SHIFT 7
802#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_WIDTH 0x1
803#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK (1 << 7)
804
805/*
806 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
807 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
808 */
809#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8
810#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_WIDTH 0x1
811#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) 75#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8)
812
813/* Used by CM_SHADOW_FREQ_CONFIG1 */
814#define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8
815#define OMAP4430_DPLL_CORE_DPLL_EN_WIDTH 0x3
816#define OMAP4430_DPLL_CORE_DPLL_EN_MASK (0x7 << 8)
817
818/* Used by CM_SHADOW_FREQ_CONFIG1 */
819#define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11
820#define OMAP4430_DPLL_CORE_M2_DIV_WIDTH 0x5
821#define OMAP4430_DPLL_CORE_M2_DIV_MASK (0x1f << 11)
822
823/* Used by CM_SHADOW_FREQ_CONFIG2 */
824#define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3
825#define OMAP4430_DPLL_CORE_M5_DIV_WIDTH 0x5
826#define OMAP4430_DPLL_CORE_M5_DIV_MASK (0x1f << 3)
827
828/*
829 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY,
830 * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER,
831 * CM_CLKSEL_DPLL_UNIPRO
832 */
833#define OMAP4430_DPLL_DIV_SHIFT 0
834#define OMAP4430_DPLL_DIV_WIDTH 0x7
835#define OMAP4430_DPLL_DIV_MASK (0x7f << 0) 76#define OMAP4430_DPLL_DIV_MASK (0x7f << 0)
836
837/* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_USB */
838#define OMAP4430_DPLL_DIV_0_7_SHIFT 0
839#define OMAP4430_DPLL_DIV_0_7_WIDTH 0x8
840#define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0) 77#define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0)
841
842/*
843 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
844 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
845 */
846#define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8
847#define OMAP4430_DPLL_DRIFTGUARD_EN_WIDTH 0x1
848#define OMAP4430_DPLL_DRIFTGUARD_EN_MASK (1 << 8)
849
850/* Renamed from DPLL_DRIFTGUARD_EN Used by CM_CLKMODE_DPLL_UNIPRO */
851#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_SHIFT 3
852#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_WIDTH 0x1
853#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK (1 << 3)
854
855/*
856 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
857 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
858 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
859 */
860#define OMAP4430_DPLL_EN_SHIFT 0
861#define OMAP4430_DPLL_EN_WIDTH 0x3
862#define OMAP4430_DPLL_EN_MASK (0x7 << 0) 78#define OMAP4430_DPLL_EN_MASK (0x7 << 0)
863
864/*
865 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
866 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
867 * CM_CLKMODE_DPLL_UNIPRO
868 */
869#define OMAP4430_DPLL_LPMODE_EN_SHIFT 10
870#define OMAP4430_DPLL_LPMODE_EN_WIDTH 0x1
871#define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10) 79#define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10)
872
873/*
874 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY,
875 * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER,
876 * CM_CLKSEL_DPLL_UNIPRO
877 */
878#define OMAP4430_DPLL_MULT_SHIFT 8
879#define OMAP4430_DPLL_MULT_WIDTH 0xb
880#define OMAP4430_DPLL_MULT_MASK (0x7ff << 8) 80#define OMAP4430_DPLL_MULT_MASK (0x7ff << 8)
881
882/* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_USB */
883#define OMAP4430_DPLL_MULT_USB_SHIFT 8
884#define OMAP4430_DPLL_MULT_USB_WIDTH 0xc
885#define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8) 81#define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8)
886
887/*
888 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
889 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
890 * CM_CLKMODE_DPLL_UNIPRO
891 */
892#define OMAP4430_DPLL_REGM4XEN_SHIFT 11
893#define OMAP4430_DPLL_REGM4XEN_WIDTH 0x1
894#define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11) 82#define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11)
895
896/* Used by CM_CLKSEL_DPLL_USB */
897#define OMAP4430_DPLL_SD_DIV_SHIFT 24
898#define OMAP4430_DPLL_SD_DIV_WIDTH 0x8
899#define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24) 83#define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24)
900
901/*
902 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
903 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
904 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
905 */
906#define OMAP4430_DPLL_SSC_ACK_SHIFT 13
907#define OMAP4430_DPLL_SSC_ACK_WIDTH 0x1
908#define OMAP4430_DPLL_SSC_ACK_MASK (1 << 13)
909
910/*
911 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
912 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
913 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
914 */
915#define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14
916#define OMAP4430_DPLL_SSC_DOWNSPREAD_WIDTH 0x1
917#define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK (1 << 14)
918
919/*
920 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
921 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
922 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
923 */
924#define OMAP4430_DPLL_SSC_EN_SHIFT 12
925#define OMAP4430_DPLL_SSC_EN_WIDTH 0x1
926#define OMAP4430_DPLL_SSC_EN_MASK (1 << 12)
927
928/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
929#define OMAP4430_DSS_DYNDEP_SHIFT 8
930#define OMAP4430_DSS_DYNDEP_WIDTH 0x1
931#define OMAP4430_DSS_DYNDEP_MASK (1 << 8)
932
933/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP */
934#define OMAP4430_DSS_STATDEP_SHIFT 8 84#define OMAP4430_DSS_STATDEP_SHIFT 8
935#define OMAP4430_DSS_STATDEP_WIDTH 0x1
936#define OMAP4430_DSS_STATDEP_MASK (1 << 8)
937
938/* Used by CM_L3_2_DYNAMICDEP */
939#define OMAP4430_DUCATI_DYNDEP_SHIFT 0
940#define OMAP4430_DUCATI_DYNDEP_WIDTH 0x1
941#define OMAP4430_DUCATI_DYNDEP_MASK (1 << 0)
942
943/* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP */
944#define OMAP4430_DUCATI_STATDEP_SHIFT 0 85#define OMAP4430_DUCATI_STATDEP_SHIFT 0
945#define OMAP4430_DUCATI_STATDEP_WIDTH 0x1
946#define OMAP4430_DUCATI_STATDEP_MASK (1 << 0)
947
948/* Used by CM_SHADOW_FREQ_CONFIG1 */
949#define OMAP4430_FREQ_UPDATE_SHIFT 0
950#define OMAP4430_FREQ_UPDATE_WIDTH 0x1
951#define OMAP4430_FREQ_UPDATE_MASK (1 << 0)
952
953/* Used by REVISION_CM1, REVISION_CM2 */
954#define OMAP4430_FUNC_SHIFT 16
955#define OMAP4430_FUNC_WIDTH 0xc
956#define OMAP4430_FUNC_MASK (0xfff << 16)
957
958/* Used by CM_L3_2_DYNAMICDEP */
959#define OMAP4430_GFX_DYNDEP_SHIFT 10
960#define OMAP4430_GFX_DYNDEP_WIDTH 0x1
961#define OMAP4430_GFX_DYNDEP_MASK (1 << 10)
962
963/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */
964#define OMAP4430_GFX_STATDEP_SHIFT 10 86#define OMAP4430_GFX_STATDEP_SHIFT 10
965#define OMAP4430_GFX_STATDEP_WIDTH 0x1
966#define OMAP4430_GFX_STATDEP_MASK (1 << 10)
967
968/* Used by CM_SHADOW_FREQ_CONFIG2 */
969#define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0
970#define OMAP4430_GPMC_FREQ_UPDATE_WIDTH 0x1
971#define OMAP4430_GPMC_FREQ_UPDATE_MASK (1 << 0)
972
973/*
974 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
975 * CM_DIV_M4_DPLL_PER
976 */
977#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0
978#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_WIDTH 0x5
979#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) 87#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0)
980
981/*
982 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
983 * CM_DIV_M4_DPLL_PER
984 */
985#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5
986#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_WIDTH 0x1
987#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5)
988
989/*
990 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
991 * CM_DIV_M4_DPLL_PER
992 */
993#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8
994#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_WIDTH 0x1
995#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8)
996
997/*
998 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
999 * CM_DIV_M4_DPLL_PER
1000 */
1001#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12
1002#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_WIDTH 0x1
1003#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12)
1004
1005/*
1006 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
1007 * CM_DIV_M5_DPLL_PER
1008 */
1009#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0
1010#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_WIDTH 0x5
1011#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) 88#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0)
1012
1013/*
1014 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
1015 * CM_DIV_M5_DPLL_PER
1016 */
1017#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5
1018#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_WIDTH 0x1
1019#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5)
1020
1021/*
1022 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
1023 * CM_DIV_M5_DPLL_PER
1024 */
1025#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8
1026#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_WIDTH 0x1
1027#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8)
1028
1029/*
1030 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
1031 * CM_DIV_M5_DPLL_PER
1032 */
1033#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12
1034#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_WIDTH 0x1
1035#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12)
1036
1037/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
1038#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0
1039#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_WIDTH 0x5
1040#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0) 89#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0)
1041
1042/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
1043#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5
1044#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_WIDTH 0x1
1045#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5)
1046
1047/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
1048#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8
1049#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_WIDTH 0x1
1050#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8)
1051
1052/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
1053#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12
1054#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_WIDTH 0x1
1055#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12)
1056
1057/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
1058#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0
1059#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_WIDTH 0x5
1060#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0) 90#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0)
1061
1062/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
1063#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5
1064#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_WIDTH 0x1
1065#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK (1 << 5)
1066
1067/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
1068#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8
1069#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_WIDTH 0x1
1070#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK (1 << 8)
1071
1072/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
1073#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12
1074#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_WIDTH 0x1
1075#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK (1 << 12)
1076
1077/*
1078 * Used by CM1_ABE_AESS_CLKCTRL, CM1_ABE_DMIC_CLKCTRL, CM1_ABE_L4ABE_CLKCTRL,
1079 * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL,
1080 * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL,
1081 * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL,
1082 * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_SR_CORE_CLKCTRL,
1083 * CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, CM_CAM_FDIF_CLKCTRL,
1084 * CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, CM_CM1_PROFILING_CLKCTRL,
1085 * CM_CM2_PROFILING_CLKCTRL, CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL,
1086 * CM_D2D_SAD2D_FW_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
1087 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL,
1088 * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
1089 * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_USBPHYOCP2SCP_CLKCTRL,
1090 * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL,
1091 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL,
1092 * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL,
1093 * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL,
1094 * CM_L3_2_L3_2_CLKCTRL, CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL,
1095 * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL,
1096 * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL,
1097 * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL,
1098 * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL,
1099 * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL,
1100 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL,
1101 * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL,
1102 * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL,
1103 * CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL,
1104 * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL,
1105 * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_SLIMBUS2_CLKCTRL,
1106 * CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL,
1107 * CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, CM_L4SEC_AES2_CLKCTRL,
1108 * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
1109 * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL,
1110 * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL,
1111 * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL,
1112 * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL,
1113 * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, CM_WKUP_SYNCTIMER_CLKCTRL,
1114 * CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_USIM_CLKCTRL,
1115 * CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL
1116 */
1117#define OMAP4430_IDLEST_SHIFT 16 91#define OMAP4430_IDLEST_SHIFT 16
1118#define OMAP4430_IDLEST_WIDTH 0x2
1119#define OMAP4430_IDLEST_MASK (0x3 << 16) 92#define OMAP4430_IDLEST_MASK (0x3 << 16)
1120
1121/* Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
1122#define OMAP4430_ISS_DYNDEP_SHIFT 9
1123#define OMAP4430_ISS_DYNDEP_WIDTH 0x1
1124#define OMAP4430_ISS_DYNDEP_MASK (1 << 9)
1125
1126/*
1127 * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP,
1128 * CM_TESLA_STATICDEP
1129 */
1130#define OMAP4430_ISS_STATDEP_SHIFT 9
1131#define OMAP4430_ISS_STATDEP_WIDTH 0x1
1132#define OMAP4430_ISS_STATDEP_MASK (1 << 9)
1133
1134/* Used by CM_L3_2_DYNAMICDEP, CM_TESLA_DYNAMICDEP */
1135#define OMAP4430_IVAHD_DYNDEP_SHIFT 2
1136#define OMAP4430_IVAHD_DYNDEP_WIDTH 0x1
1137#define OMAP4430_IVAHD_DYNDEP_MASK (1 << 2)
1138
1139/*
1140 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
1141 * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_L3INIT_STATICDEP,
1142 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1143 */
1144#define OMAP4430_IVAHD_STATDEP_SHIFT 2 93#define OMAP4430_IVAHD_STATDEP_SHIFT 2
1145#define OMAP4430_IVAHD_STATDEP_WIDTH 0x1
1146#define OMAP4430_IVAHD_STATDEP_MASK (1 << 2)
1147
1148/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1149#define OMAP4430_L3INIT_DYNDEP_SHIFT 7
1150#define OMAP4430_L3INIT_DYNDEP_WIDTH 0x1
1151#define OMAP4430_L3INIT_DYNDEP_MASK (1 << 7)
1152
1153/*
1154 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_MPU_STATICDEP,
1155 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1156 */
1157#define OMAP4430_L3INIT_STATDEP_SHIFT 7 94#define OMAP4430_L3INIT_STATDEP_SHIFT 7
1158#define OMAP4430_L3INIT_STATDEP_WIDTH 0x1
1159#define OMAP4430_L3INIT_STATDEP_MASK (1 << 7)
1160
1161/*
1162 * Used by CM_DSS_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_2_DYNAMICDEP,
1163 * CM_L4CFG_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
1164 */
1165#define OMAP4430_L3_1_DYNDEP_SHIFT 5
1166#define OMAP4430_L3_1_DYNDEP_WIDTH 0x1
1167#define OMAP4430_L3_1_DYNDEP_MASK (1 << 5)
1168
1169/*
1170 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
1171 * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
1172 * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP,
1173 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1174 */
1175#define OMAP4430_L3_1_STATDEP_SHIFT 5 95#define OMAP4430_L3_1_STATDEP_SHIFT 5
1176#define OMAP4430_L3_1_STATDEP_WIDTH 0x1
1177#define OMAP4430_L3_1_STATDEP_MASK (1 << 5)
1178
1179/*
1180 * Used by CM_CAM_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP,
1181 * CM_EMU_DYNAMICDEP, CM_GFX_DYNAMICDEP, CM_IVAHD_DYNAMICDEP,
1182 * CM_L3INIT_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
1183 * CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP
1184 */
1185#define OMAP4430_L3_2_DYNDEP_SHIFT 6
1186#define OMAP4430_L3_2_DYNDEP_WIDTH 0x1
1187#define OMAP4430_L3_2_DYNDEP_MASK (1 << 6)
1188
1189/*
1190 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
1191 * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
1192 * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP,
1193 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1194 */
1195#define OMAP4430_L3_2_STATDEP_SHIFT 6 96#define OMAP4430_L3_2_STATDEP_SHIFT 6
1196#define OMAP4430_L3_2_STATDEP_WIDTH 0x1
1197#define OMAP4430_L3_2_STATDEP_MASK (1 << 6)
1198
1199/* Used by CM_L3_1_DYNAMICDEP */
1200#define OMAP4430_L4CFG_DYNDEP_SHIFT 12
1201#define OMAP4430_L4CFG_DYNDEP_WIDTH 0x1
1202#define OMAP4430_L4CFG_DYNDEP_MASK (1 << 12)
1203
1204/*
1205 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP,
1206 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1207 */
1208#define OMAP4430_L4CFG_STATDEP_SHIFT 12 97#define OMAP4430_L4CFG_STATDEP_SHIFT 12
1209#define OMAP4430_L4CFG_STATDEP_WIDTH 0x1
1210#define OMAP4430_L4CFG_STATDEP_MASK (1 << 12)
1211
1212/* Used by CM_L3_2_DYNAMICDEP */
1213#define OMAP4430_L4PER_DYNDEP_SHIFT 13
1214#define OMAP4430_L4PER_DYNDEP_WIDTH 0x1
1215#define OMAP4430_L4PER_DYNDEP_MASK (1 << 13)
1216
1217/*
1218 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP,
1219 * CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1220 */
1221#define OMAP4430_L4PER_STATDEP_SHIFT 13 98#define OMAP4430_L4PER_STATDEP_SHIFT 13
1222#define OMAP4430_L4PER_STATDEP_WIDTH 0x1
1223#define OMAP4430_L4PER_STATDEP_MASK (1 << 13)
1224
1225/* Used by CM_L3_2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1226#define OMAP4430_L4SEC_DYNDEP_SHIFT 14
1227#define OMAP4430_L4SEC_DYNDEP_WIDTH 0x1
1228#define OMAP4430_L4SEC_DYNDEP_MASK (1 << 14)
1229
1230/*
1231 * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP,
1232 * CM_SDMA_STATICDEP
1233 */
1234#define OMAP4430_L4SEC_STATDEP_SHIFT 14 99#define OMAP4430_L4SEC_STATDEP_SHIFT 14
1235#define OMAP4430_L4SEC_STATDEP_WIDTH 0x1
1236#define OMAP4430_L4SEC_STATDEP_MASK (1 << 14)
1237
1238/* Used by CM_L4CFG_DYNAMICDEP */
1239#define OMAP4430_L4WKUP_DYNDEP_SHIFT 15
1240#define OMAP4430_L4WKUP_DYNDEP_WIDTH 0x1
1241#define OMAP4430_L4WKUP_DYNDEP_MASK (1 << 15)
1242
1243/*
1244 * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP,
1245 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1246 */
1247#define OMAP4430_L4WKUP_STATDEP_SHIFT 15 100#define OMAP4430_L4WKUP_STATDEP_SHIFT 15
1248#define OMAP4430_L4WKUP_STATDEP_WIDTH 0x1
1249#define OMAP4430_L4WKUP_STATDEP_MASK (1 << 15)
1250
1251/*
1252 * Used by CM_D2D_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
1253 * CM_MPU_DYNAMICDEP
1254 */
1255#define OMAP4430_MEMIF_DYNDEP_SHIFT 4
1256#define OMAP4430_MEMIF_DYNDEP_WIDTH 0x1
1257#define OMAP4430_MEMIF_DYNDEP_MASK (1 << 4)
1258
1259/*
1260 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
1261 * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
1262 * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP,
1263 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1264 */
1265#define OMAP4430_MEMIF_STATDEP_SHIFT 4 101#define OMAP4430_MEMIF_STATDEP_SHIFT 4
1266#define OMAP4430_MEMIF_STATDEP_WIDTH 0x1
1267#define OMAP4430_MEMIF_STATDEP_MASK (1 << 4)
1268
1269/*
1270 * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
1271 * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA,
1272 * CM_SSC_MODFREQDIV_DPLL_MPU, CM_SSC_MODFREQDIV_DPLL_PER,
1273 * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB
1274 */
1275#define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8
1276#define OMAP4430_MODFREQDIV_EXPONENT_WIDTH 0x3
1277#define OMAP4430_MODFREQDIV_EXPONENT_MASK (0x7 << 8)
1278
1279/*
1280 * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
1281 * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA,
1282 * CM_SSC_MODFREQDIV_DPLL_MPU, CM_SSC_MODFREQDIV_DPLL_PER,
1283 * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB
1284 */
1285#define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0
1286#define OMAP4430_MODFREQDIV_MANTISSA_WIDTH 0x7
1287#define OMAP4430_MODFREQDIV_MANTISSA_MASK (0x7f << 0)
1288
1289/*
1290 * Used by CM1_ABE_AESS_CLKCTRL, CM1_ABE_DMIC_CLKCTRL, CM1_ABE_L4ABE_CLKCTRL,
1291 * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL,
1292 * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL,
1293 * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL,
1294 * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_SR_CORE_CLKCTRL,
1295 * CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, CM_CAM_FDIF_CLKCTRL,
1296 * CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, CM_CM1_PROFILING_CLKCTRL,
1297 * CM_CM2_PROFILING_CLKCTRL, CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL,
1298 * CM_D2D_SAD2D_FW_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
1299 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL,
1300 * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
1301 * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_USBPHYOCP2SCP_CLKCTRL,
1302 * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL,
1303 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL,
1304 * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL,
1305 * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL,
1306 * CM_L3_2_L3_2_CLKCTRL, CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL,
1307 * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL,
1308 * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL,
1309 * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL,
1310 * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL,
1311 * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL,
1312 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL,
1313 * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL,
1314 * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL,
1315 * CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL,
1316 * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL,
1317 * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_SLIMBUS2_CLKCTRL,
1318 * CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL,
1319 * CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, CM_L4SEC_AES2_CLKCTRL,
1320 * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
1321 * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL,
1322 * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL,
1323 * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL,
1324 * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL,
1325 * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, CM_WKUP_SYNCTIMER_CLKCTRL,
1326 * CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_USIM_CLKCTRL,
1327 * CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL
1328 */
1329#define OMAP4430_MODULEMODE_SHIFT 0 102#define OMAP4430_MODULEMODE_SHIFT 0
1330#define OMAP4430_MODULEMODE_WIDTH 0x2
1331#define OMAP4430_MODULEMODE_MASK (0x3 << 0) 103#define OMAP4430_MODULEMODE_MASK (0x3 << 0)
1332
1333/* Used by CM_L4CFG_DYNAMICDEP */
1334#define OMAP4460_MPU_DYNDEP_SHIFT 19
1335#define OMAP4460_MPU_DYNDEP_WIDTH 0x1
1336#define OMAP4460_MPU_DYNDEP_MASK (1 << 19)
1337
1338/* Used by CM_DSS_DSS_CLKCTRL */
1339#define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT 9 104#define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT 9
1340#define OMAP4430_OPTFCLKEN_48MHZ_CLK_WIDTH 0x1
1341#define OMAP4430_OPTFCLKEN_48MHZ_CLK_MASK (1 << 9)
1342
1343/* Used by CM_WKUP_BANDGAP_CLKCTRL */
1344#define OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT 8 105#define OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT 8
1345#define OMAP4430_OPTFCLKEN_BGAP_32K_WIDTH 0x1
1346#define OMAP4430_OPTFCLKEN_BGAP_32K_MASK (1 << 8)
1347
1348/* Used by CM_ALWON_USBPHY_CLKCTRL */
1349#define OMAP4430_OPTFCLKEN_CLK32K_SHIFT 8 106#define OMAP4430_OPTFCLKEN_CLK32K_SHIFT 8
1350#define OMAP4430_OPTFCLKEN_CLK32K_WIDTH 0x1
1351#define OMAP4430_OPTFCLKEN_CLK32K_MASK (1 << 8)
1352
1353/* Used by CM_CAM_ISS_CLKCTRL */
1354#define OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT 8 107#define OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT 8
1355#define OMAP4430_OPTFCLKEN_CTRLCLK_WIDTH 0x1
1356#define OMAP4430_OPTFCLKEN_CTRLCLK_MASK (1 << 8)
1357
1358/*
1359 * Used by CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL,
1360 * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL,
1361 * CM_WKUP_GPIO1_CLKCTRL
1362 */
1363#define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8 108#define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8
1364#define OMAP4430_OPTFCLKEN_DBCLK_WIDTH 0x1
1365#define OMAP4430_OPTFCLKEN_DBCLK_MASK (1 << 8)
1366
1367/* Used by CM_MEMIF_DLL_CLKCTRL, CM_MEMIF_DLL_H_CLKCTRL */
1368#define OMAP4430_OPTFCLKEN_DLL_CLK_SHIFT 8
1369#define OMAP4430_OPTFCLKEN_DLL_CLK_WIDTH 0x1
1370#define OMAP4430_OPTFCLKEN_DLL_CLK_MASK (1 << 8)
1371
1372/* Used by CM_DSS_DSS_CLKCTRL */
1373#define OMAP4430_OPTFCLKEN_DSSCLK_SHIFT 8 109#define OMAP4430_OPTFCLKEN_DSSCLK_SHIFT 8
1374#define OMAP4430_OPTFCLKEN_DSSCLK_WIDTH 0x1
1375#define OMAP4430_OPTFCLKEN_DSSCLK_MASK (1 << 8)
1376
1377/* Used by CM_WKUP_USIM_CLKCTRL */
1378#define OMAP4430_OPTFCLKEN_FCLK_SHIFT 8 110#define OMAP4430_OPTFCLKEN_FCLK_SHIFT 8
1379#define OMAP4430_OPTFCLKEN_FCLK_WIDTH 0x1
1380#define OMAP4430_OPTFCLKEN_FCLK_MASK (1 << 8)
1381
1382/* Used by CM1_ABE_SLIMBUS_CLKCTRL */
1383#define OMAP4430_OPTFCLKEN_FCLK0_SHIFT 8 111#define OMAP4430_OPTFCLKEN_FCLK0_SHIFT 8
1384#define OMAP4430_OPTFCLKEN_FCLK0_WIDTH 0x1
1385#define OMAP4430_OPTFCLKEN_FCLK0_MASK (1 << 8)
1386
1387/* Used by CM1_ABE_SLIMBUS_CLKCTRL */
1388#define OMAP4430_OPTFCLKEN_FCLK1_SHIFT 9 112#define OMAP4430_OPTFCLKEN_FCLK1_SHIFT 9
1389#define OMAP4430_OPTFCLKEN_FCLK1_WIDTH 0x1
1390#define OMAP4430_OPTFCLKEN_FCLK1_MASK (1 << 9)
1391
1392/* Used by CM1_ABE_SLIMBUS_CLKCTRL */
1393#define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10 113#define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10
1394#define OMAP4430_OPTFCLKEN_FCLK2_WIDTH 0x1
1395#define OMAP4430_OPTFCLKEN_FCLK2_MASK (1 << 10)
1396
1397/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1398#define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15 114#define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15
1399#define OMAP4430_OPTFCLKEN_FUNC48MCLK_WIDTH 0x1
1400#define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK (1 << 15)
1401
1402/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1403#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13 115#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13
1404#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_WIDTH 0x1
1405#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13)
1406
1407/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1408#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14 116#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14
1409#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_WIDTH 0x1
1410#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14)
1411
1412/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1413#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11 117#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11
1414#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_WIDTH 0x1
1415#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11)
1416
1417/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1418#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12 118#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12
1419#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_WIDTH 0x1
1420#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12)
1421
1422/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */
1423#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT 8 119#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT 8
1424#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_WIDTH 0x1
1425#define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_MASK (1 << 8)
1426
1427/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */
1428#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT 9 120#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT 9
1429#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_WIDTH 0x1
1430#define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_MASK (1 << 9)
1431
1432/* Used by CM_L3INIT_USBPHYOCP2SCP_CLKCTRL */
1433#define OMAP4430_OPTFCLKEN_PHY_48M_SHIFT 8 121#define OMAP4430_OPTFCLKEN_PHY_48M_SHIFT 8
1434#define OMAP4430_OPTFCLKEN_PHY_48M_WIDTH 0x1
1435#define OMAP4430_OPTFCLKEN_PHY_48M_MASK (1 << 8)
1436
1437/* Used by CM_L4PER_SLIMBUS2_CLKCTRL */
1438#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT 10 122#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT 10
1439#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_WIDTH 0x1
1440#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_MASK (1 << 10)
1441
1442/* Renamed from OPTFCLKEN_SLIMBUS_CLK Used by CM1_ABE_SLIMBUS_CLKCTRL */
1443#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT 11 123#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT 11
1444#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_WIDTH 0x1
1445#define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_MASK (1 << 11)
1446
1447/* Used by CM_DSS_DSS_CLKCTRL */
1448#define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT 10 124#define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT 10
1449#define OMAP4430_OPTFCLKEN_SYS_CLK_WIDTH 0x1
1450#define OMAP4430_OPTFCLKEN_SYS_CLK_MASK (1 << 10)
1451
1452/* Used by CM_WKUP_BANDGAP_CLKCTRL */
1453#define OMAP4460_OPTFCLKEN_TS_FCLK_SHIFT 8 125#define OMAP4460_OPTFCLKEN_TS_FCLK_SHIFT 8
1454#define OMAP4460_OPTFCLKEN_TS_FCLK_WIDTH 0x1
1455#define OMAP4460_OPTFCLKEN_TS_FCLK_MASK (1 << 8)
1456
1457/* Used by CM_DSS_DSS_CLKCTRL */
1458#define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT 11 126#define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT 11
1459#define OMAP4430_OPTFCLKEN_TV_CLK_WIDTH 0x1
1460#define OMAP4430_OPTFCLKEN_TV_CLK_MASK (1 << 11)
1461
1462/* Used by CM_L3INIT_UNIPRO1_CLKCTRL */
1463#define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8
1464#define OMAP4430_OPTFCLKEN_TXPHYCLK_WIDTH 0x1
1465#define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK (1 << 8)
1466
1467/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
1468#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8 127#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8
1469#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_WIDTH 0x1
1470#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8)
1471
1472/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
1473#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9 128#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9
1474#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_WIDTH 0x1
1475#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9)
1476
1477/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
1478#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10 129#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10
1479#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_WIDTH 0x1
1480#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10)
1481
1482/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1483#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8 130#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8
1484#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_WIDTH 0x1
1485#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8)
1486
1487/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1488#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9 131#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9
1489#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_WIDTH 0x1
1490#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9)
1491
1492/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1493#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10 132#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10
1494#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_WIDTH 0x1
1495#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10)
1496
1497/* Used by CM_L3INIT_USB_OTG_CLKCTRL */
1498#define OMAP4430_OPTFCLKEN_XCLK_SHIFT 8 133#define OMAP4430_OPTFCLKEN_XCLK_SHIFT 8
1499#define OMAP4430_OPTFCLKEN_XCLK_WIDTH 0x1
1500#define OMAP4430_OPTFCLKEN_XCLK_MASK (1 << 8)
1501
1502/* Used by CM_EMU_OVERRIDE_DPLL_CORE */
1503#define OMAP4430_OVERRIDE_ENABLE_SHIFT 19
1504#define OMAP4430_OVERRIDE_ENABLE_WIDTH 0x1
1505#define OMAP4430_OVERRIDE_ENABLE_MASK (1 << 19)
1506
1507/* Used by CM_CLKSEL_ABE */
1508#define OMAP4430_PAD_CLKS_GATE_SHIFT 8 134#define OMAP4430_PAD_CLKS_GATE_SHIFT 8
1509#define OMAP4430_PAD_CLKS_GATE_WIDTH 0x1
1510#define OMAP4430_PAD_CLKS_GATE_MASK (1 << 8)
1511
1512/* Used by CM_CORE_DVFS_CURRENT, CM_IVA_DVFS_CURRENT */
1513#define OMAP4430_PERF_CURRENT_SHIFT 0
1514#define OMAP4430_PERF_CURRENT_WIDTH 0x8
1515#define OMAP4430_PERF_CURRENT_MASK (0xff << 0)
1516
1517/*
1518 * Used by CM_CORE_DVFS_PERF1, CM_CORE_DVFS_PERF2, CM_CORE_DVFS_PERF3,
1519 * CM_CORE_DVFS_PERF4, CM_IVA_DVFS_PERF_ABE, CM_IVA_DVFS_PERF_IVAHD,
1520 * CM_IVA_DVFS_PERF_TESLA
1521 */
1522#define OMAP4430_PERF_REQ_SHIFT 0
1523#define OMAP4430_PERF_REQ_WIDTH 0x8
1524#define OMAP4430_PERF_REQ_MASK (0xff << 0)
1525
1526/* Used by CM_RESTORE_ST */
1527#define OMAP4430_PHASE1_COMPLETED_SHIFT 0
1528#define OMAP4430_PHASE1_COMPLETED_WIDTH 0x1
1529#define OMAP4430_PHASE1_COMPLETED_MASK (1 << 0)
1530
1531/* Used by CM_RESTORE_ST */
1532#define OMAP4430_PHASE2A_COMPLETED_SHIFT 1
1533#define OMAP4430_PHASE2A_COMPLETED_WIDTH 0x1
1534#define OMAP4430_PHASE2A_COMPLETED_MASK (1 << 1)
1535
1536/* Used by CM_RESTORE_ST */
1537#define OMAP4430_PHASE2B_COMPLETED_SHIFT 2
1538#define OMAP4430_PHASE2B_COMPLETED_WIDTH 0x1
1539#define OMAP4430_PHASE2B_COMPLETED_MASK (1 << 2)
1540
1541/* Used by CM_EMU_DEBUGSS_CLKCTRL */
1542#define OMAP4430_PMD_STM_MUX_CTRL_SHIFT 20 135#define OMAP4430_PMD_STM_MUX_CTRL_SHIFT 20
1543#define OMAP4430_PMD_STM_MUX_CTRL_WIDTH 0x2 136#define OMAP4430_PMD_STM_MUX_CTRL_WIDTH 0x2
1544#define OMAP4430_PMD_STM_MUX_CTRL_MASK (0x3 << 20)
1545
1546/* Used by CM_EMU_DEBUGSS_CLKCTRL */
1547#define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22 137#define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22
1548#define OMAP4430_PMD_TRACE_MUX_CTRL_WIDTH 0x2 138#define OMAP4430_PMD_TRACE_MUX_CTRL_WIDTH 0x2
1549#define OMAP4430_PMD_TRACE_MUX_CTRL_MASK (0x3 << 22)
1550
1551/* Used by CM_DYN_DEP_PRESCAL */
1552#define OMAP4430_PRESCAL_SHIFT 0
1553#define OMAP4430_PRESCAL_WIDTH 0x6
1554#define OMAP4430_PRESCAL_MASK (0x3f << 0)
1555
1556/* Used by REVISION_CM1, REVISION_CM2 */
1557#define OMAP4430_R_RTL_SHIFT 11
1558#define OMAP4430_R_RTL_WIDTH 0x5
1559#define OMAP4430_R_RTL_MASK (0x1f << 11)
1560
1561/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL */
1562#define OMAP4430_SAR_MODE_SHIFT 4
1563#define OMAP4430_SAR_MODE_WIDTH 0x1
1564#define OMAP4430_SAR_MODE_MASK (1 << 4)
1565
1566/* Used by CM_SCALE_FCLK */
1567#define OMAP4430_SCALE_FCLK_SHIFT 0 139#define OMAP4430_SCALE_FCLK_SHIFT 0
1568#define OMAP4430_SCALE_FCLK_WIDTH 0x1 140#define OMAP4430_SCALE_FCLK_WIDTH 0x1
1569#define OMAP4430_SCALE_FCLK_MASK (1 << 0)
1570
1571/* Used by REVISION_CM1, REVISION_CM2 */
1572#define OMAP4430_SCHEME_SHIFT 30
1573#define OMAP4430_SCHEME_WIDTH 0x2
1574#define OMAP4430_SCHEME_MASK (0x3 << 30)
1575
1576/* Used by CM_L4CFG_DYNAMICDEP */
1577#define OMAP4430_SDMA_DYNDEP_SHIFT 11
1578#define OMAP4430_SDMA_DYNDEP_WIDTH 0x1
1579#define OMAP4430_SDMA_DYNDEP_MASK (1 << 11)
1580
1581/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */
1582#define OMAP4430_SDMA_STATDEP_SHIFT 11
1583#define OMAP4430_SDMA_STATDEP_WIDTH 0x1
1584#define OMAP4430_SDMA_STATDEP_MASK (1 << 11)
1585
1586/* Used by CM_CLKSEL_ABE */
1587#define OMAP4430_SLIMBUS_CLK_GATE_SHIFT 10 141#define OMAP4430_SLIMBUS_CLK_GATE_SHIFT 10
1588#define OMAP4430_SLIMBUS_CLK_GATE_WIDTH 0x1
1589#define OMAP4430_SLIMBUS_CLK_GATE_MASK (1 << 10)
1590
1591/*
1592 * Used by CM1_ABE_AESS_CLKCTRL, CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL,
1593 * CM_D2D_SAD2D_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
1594 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL,
1595 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL,
1596 * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL,
1597 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL,
1598 * CM_SDMA_SDMA_CLKCTRL, CM_TESLA_TESLA_CLKCTRL
1599 */
1600#define OMAP4430_STBYST_SHIFT 18
1601#define OMAP4430_STBYST_WIDTH 0x1
1602#define OMAP4430_STBYST_MASK (1 << 18)
1603
1604/*
1605 * Used by CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDRPHY,
1606 * CM_IDLEST_DPLL_IVA, CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER,
1607 * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB
1608 */
1609#define OMAP4430_ST_DPLL_CLK_SHIFT 0
1610#define OMAP4430_ST_DPLL_CLK_WIDTH 0x1
1611#define OMAP4430_ST_DPLL_CLK_MASK (1 << 0) 142#define OMAP4430_ST_DPLL_CLK_MASK (1 << 0)
1612
1613/* Used by CM_CLKDCOLDO_DPLL_USB */
1614#define OMAP4430_ST_DPLL_CLKDCOLDO_SHIFT 9
1615#define OMAP4430_ST_DPLL_CLKDCOLDO_WIDTH 0x1
1616#define OMAP4430_ST_DPLL_CLKDCOLDO_MASK (1 << 9)
1617
1618/*
1619 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
1620 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
1621 */
1622#define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9
1623#define OMAP4430_ST_DPLL_CLKOUT_WIDTH 0x1
1624#define OMAP4430_ST_DPLL_CLKOUT_MASK (1 << 9)
1625
1626/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
1627#define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9
1628#define OMAP4430_ST_DPLL_CLKOUTHIF_WIDTH 0x1
1629#define OMAP4430_ST_DPLL_CLKOUTHIF_MASK (1 << 9)
1630
1631/* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */
1632#define OMAP4430_ST_DPLL_CLKOUTX2_SHIFT 11
1633#define OMAP4430_ST_DPLL_CLKOUTX2_WIDTH 0x1
1634#define OMAP4430_ST_DPLL_CLKOUTX2_MASK (1 << 11)
1635
1636/*
1637 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
1638 * CM_DIV_M4_DPLL_PER
1639 */
1640#define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9
1641#define OMAP4430_ST_HSDIVIDER_CLKOUT1_WIDTH 0x1
1642#define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9)
1643
1644/*
1645 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
1646 * CM_DIV_M5_DPLL_PER
1647 */
1648#define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9
1649#define OMAP4430_ST_HSDIVIDER_CLKOUT2_WIDTH 0x1
1650#define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9)
1651
1652/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
1653#define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9
1654#define OMAP4430_ST_HSDIVIDER_CLKOUT3_WIDTH 0x1
1655#define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9)
1656
1657/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
1658#define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9
1659#define OMAP4430_ST_HSDIVIDER_CLKOUT4_WIDTH 0x1
1660#define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK (1 << 9)
1661
1662/*
1663 * Used by CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDRPHY,
1664 * CM_IDLEST_DPLL_IVA, CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER,
1665 * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB
1666 */
1667#define OMAP4430_ST_MN_BYPASS_SHIFT 8
1668#define OMAP4430_ST_MN_BYPASS_WIDTH 0x1
1669#define OMAP4430_ST_MN_BYPASS_MASK (1 << 8)
1670
1671/* Used by CM_SYS_CLKSEL */
1672#define OMAP4430_SYS_CLKSEL_SHIFT 0 143#define OMAP4430_SYS_CLKSEL_SHIFT 0
1673#define OMAP4430_SYS_CLKSEL_WIDTH 0x3 144#define OMAP4430_SYS_CLKSEL_WIDTH 0x3
1674#define OMAP4430_SYS_CLKSEL_MASK (0x7 << 0)
1675
1676/* Used by CM_L4CFG_DYNAMICDEP */
1677#define OMAP4430_TESLA_DYNDEP_SHIFT 1
1678#define OMAP4430_TESLA_DYNDEP_WIDTH 0x1
1679#define OMAP4430_TESLA_DYNDEP_MASK (1 << 1)
1680
1681/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */
1682#define OMAP4430_TESLA_STATDEP_SHIFT 1 145#define OMAP4430_TESLA_STATDEP_SHIFT 1
1683#define OMAP4430_TESLA_STATDEP_WIDTH 0x1
1684#define OMAP4430_TESLA_STATDEP_MASK (1 << 1)
1685
1686/*
1687 * Used by CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP, CM_EMU_DYNAMICDEP,
1688 * CM_L3_1_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
1689 * CM_L4PER_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
1690 */
1691#define OMAP4430_WINDOWSIZE_SHIFT 24
1692#define OMAP4430_WINDOWSIZE_WIDTH 0x4
1693#define OMAP4430_WINDOWSIZE_MASK (0xf << 24)
1694
1695/* Used by REVISION_CM1, REVISION_CM2 */
1696#define OMAP4430_X_MAJOR_SHIFT 8
1697#define OMAP4430_X_MAJOR_WIDTH 0x3
1698#define OMAP4430_X_MAJOR_MASK (0x7 << 8)
1699
1700/* Used by REVISION_CM1, REVISION_CM2 */
1701#define OMAP4430_Y_MINOR_SHIFT 0
1702#define OMAP4430_Y_MINOR_WIDTH 0x6
1703#define OMAP4430_Y_MINOR_MASK (0x3f << 0)
1704#endif 146#endif
diff --git a/arch/arm/mach-omap2/cm-regbits-54xx.h b/arch/arm/mach-omap2/cm-regbits-54xx.h
index e83b8e352b6e..896ae9fc4cfb 100644
--- a/arch/arm/mach-omap2/cm-regbits-54xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-54xx.h
@@ -21,1717 +21,84 @@
21#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_54XX_H 21#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_54XX_H
22#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_54XX_H 22#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_54XX_H
23 23
24/* Used by CM_DSP_DYNAMICDEP, CM_L3MAIN1_DYNAMICDEP, CM_MPU_DYNAMICDEP */
25#define OMAP54XX_ABE_DYNDEP_SHIFT 3
26#define OMAP54XX_ABE_DYNDEP_WIDTH 0x1
27#define OMAP54XX_ABE_DYNDEP_MASK (1 << 3)
28
29/*
30 * Used by CM_C2C_STATICDEP, CM_DMA_STATICDEP, CM_DSP_STATICDEP,
31 * CM_IPU_STATICDEP, CM_L3INIT_STATICDEP, CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
32 */
33#define OMAP54XX_ABE_STATDEP_SHIFT 3 24#define OMAP54XX_ABE_STATDEP_SHIFT 3
34#define OMAP54XX_ABE_STATDEP_WIDTH 0x1
35#define OMAP54XX_ABE_STATDEP_MASK (1 << 3)
36
37/*
38 * Used by CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE, CM_AUTOIDLE_DPLL_IVA,
39 * CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO1,
40 * CM_AUTOIDLE_DPLL_UNIPRO2, CM_AUTOIDLE_DPLL_USB
41 */
42#define OMAP54XX_AUTO_DPLL_MODE_SHIFT 0
43#define OMAP54XX_AUTO_DPLL_MODE_WIDTH 0x3
44#define OMAP54XX_AUTO_DPLL_MODE_MASK (0x7 << 0) 25#define OMAP54XX_AUTO_DPLL_MODE_MASK (0x7 << 0)
45
46/* Used by CM_L3MAIN2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
47#define OMAP54XX_C2C_DYNDEP_SHIFT 18
48#define OMAP54XX_C2C_DYNDEP_WIDTH 0x1
49#define OMAP54XX_C2C_DYNDEP_MASK (1 << 18)
50
51/* Used by CM_MPU_STATICDEP */
52#define OMAP54XX_C2C_STATDEP_SHIFT 18
53#define OMAP54XX_C2C_STATDEP_WIDTH 0x1
54#define OMAP54XX_C2C_STATDEP_MASK (1 << 18)
55
56/* Used by CM_IPU_DYNAMICDEP, CM_L3MAIN2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
57#define OMAP54XX_CAM_DYNDEP_SHIFT 9
58#define OMAP54XX_CAM_DYNDEP_WIDTH 0x1
59#define OMAP54XX_CAM_DYNDEP_MASK (1 << 9)
60
61/*
62 * Used by CM_DMA_STATICDEP, CM_DSP_STATICDEP, CM_IPU_STATICDEP,
63 * CM_MPU_STATICDEP
64 */
65#define OMAP54XX_CAM_STATDEP_SHIFT 9
66#define OMAP54XX_CAM_STATDEP_WIDTH 0x1
67#define OMAP54XX_CAM_STATDEP_MASK (1 << 9)
68
69/* Used by CM_ABE_CLKSTCTRL */
70#define OMAP54XX_CLKACTIVITY_ABE_24M_GFCLK_SHIFT 13
71#define OMAP54XX_CLKACTIVITY_ABE_24M_GFCLK_WIDTH 0x1
72#define OMAP54XX_CLKACTIVITY_ABE_24M_GFCLK_MASK (1 << 13)
73
74/* Used by CM_ABE_CLKSTCTRL */
75#define OMAP54XX_CLKACTIVITY_ABE_32K_CLK_SHIFT 12
76#define OMAP54XX_CLKACTIVITY_ABE_32K_CLK_WIDTH 0x1
77#define OMAP54XX_CLKACTIVITY_ABE_32K_CLK_MASK (1 << 12)
78
79/* Used by CM_ABE_CLKSTCTRL */
80#define OMAP54XX_CLKACTIVITY_ABE_GICLK_SHIFT 9
81#define OMAP54XX_CLKACTIVITY_ABE_GICLK_WIDTH 0x1
82#define OMAP54XX_CLKACTIVITY_ABE_GICLK_MASK (1 << 9)
83
84/* Used by CM_WKUPAON_CLKSTCTRL */
85#define OMAP54XX_CLKACTIVITY_ABE_LP_CLK_SHIFT 9
86#define OMAP54XX_CLKACTIVITY_ABE_LP_CLK_WIDTH 0x1
87#define OMAP54XX_CLKACTIVITY_ABE_LP_CLK_MASK (1 << 9)
88
89/* Used by CM_ABE_CLKSTCTRL */
90#define OMAP54XX_CLKACTIVITY_ABE_SYS_CLK_SHIFT 11
91#define OMAP54XX_CLKACTIVITY_ABE_SYS_CLK_WIDTH 0x1
92#define OMAP54XX_CLKACTIVITY_ABE_SYS_CLK_MASK (1 << 11)
93
94/* Used by CM_ABE_CLKSTCTRL */
95#define OMAP54XX_CLKACTIVITY_ABE_X2_CLK_SHIFT 8
96#define OMAP54XX_CLKACTIVITY_ABE_X2_CLK_WIDTH 0x1
97#define OMAP54XX_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8)
98
99/* Used by CM_DSS_CLKSTCTRL */
100#define OMAP54XX_CLKACTIVITY_BB2D_GFCLK_SHIFT 13
101#define OMAP54XX_CLKACTIVITY_BB2D_GFCLK_WIDTH 0x1
102#define OMAP54XX_CLKACTIVITY_BB2D_GFCLK_MASK (1 << 13)
103
104/* Used by CM_C2C_CLKSTCTRL */
105#define OMAP54XX_CLKACTIVITY_C2C_GFCLK_SHIFT 9
106#define OMAP54XX_CLKACTIVITY_C2C_GFCLK_WIDTH 0x1
107#define OMAP54XX_CLKACTIVITY_C2C_GFCLK_MASK (1 << 9)
108
109/* Used by CM_C2C_CLKSTCTRL */
110#define OMAP54XX_CLKACTIVITY_C2C_GICLK_SHIFT 10
111#define OMAP54XX_CLKACTIVITY_C2C_GICLK_WIDTH 0x1
112#define OMAP54XX_CLKACTIVITY_C2C_GICLK_MASK (1 << 10)
113
114/* Used by CM_C2C_CLKSTCTRL */
115#define OMAP54XX_CLKACTIVITY_C2C_L4_GICLK_SHIFT 8
116#define OMAP54XX_CLKACTIVITY_C2C_L4_GICLK_WIDTH 0x1
117#define OMAP54XX_CLKACTIVITY_C2C_L4_GICLK_MASK (1 << 8)
118
119/* Used by CM_CAM_CLKSTCTRL */
120#define OMAP54XX_CLKACTIVITY_CAM_BOOST_GCLK_SHIFT 11
121#define OMAP54XX_CLKACTIVITY_CAM_BOOST_GCLK_WIDTH 0x1
122#define OMAP54XX_CLKACTIVITY_CAM_BOOST_GCLK_MASK (1 << 11)
123
124/* Used by CM_CAM_CLKSTCTRL */
125#define OMAP54XX_CLKACTIVITY_CAM_GCLK_SHIFT 8
126#define OMAP54XX_CLKACTIVITY_CAM_GCLK_WIDTH 0x1
127#define OMAP54XX_CLKACTIVITY_CAM_GCLK_MASK (1 << 8)
128
129/* Used by CM_CAM_CLKSTCTRL */
130#define OMAP54XX_CLKACTIVITY_CAM_L3_GICLK_SHIFT 12
131#define OMAP54XX_CLKACTIVITY_CAM_L3_GICLK_WIDTH 0x1
132#define OMAP54XX_CLKACTIVITY_CAM_L3_GICLK_MASK (1 << 12)
133
134/* Used by CM_COREAON_CLKSTCTRL */
135#define OMAP54XX_CLKACTIVITY_COREAON_32K_GFCLK_SHIFT 12
136#define OMAP54XX_CLKACTIVITY_COREAON_32K_GFCLK_WIDTH 0x1
137#define OMAP54XX_CLKACTIVITY_COREAON_32K_GFCLK_MASK (1 << 12)
138
139/* Used by CM_COREAON_CLKSTCTRL */
140#define OMAP54XX_CLKACTIVITY_COREAON_IO_SRCOMP_GFCLK_SHIFT 14
141#define OMAP54XX_CLKACTIVITY_COREAON_IO_SRCOMP_GFCLK_WIDTH 0x1
142#define OMAP54XX_CLKACTIVITY_COREAON_IO_SRCOMP_GFCLK_MASK (1 << 14)
143
144/* Used by CM_COREAON_CLKSTCTRL */
145#define OMAP54XX_CLKACTIVITY_COREAON_L4_GICLK_SHIFT 8
146#define OMAP54XX_CLKACTIVITY_COREAON_L4_GICLK_WIDTH 0x1
147#define OMAP54XX_CLKACTIVITY_COREAON_L4_GICLK_MASK (1 << 8)
148
149/* Used by CM_CAM_CLKSTCTRL */
150#define OMAP54XX_CLKACTIVITY_CSI_PHY_GFCLK_SHIFT 9
151#define OMAP54XX_CLKACTIVITY_CSI_PHY_GFCLK_WIDTH 0x1
152#define OMAP54XX_CLKACTIVITY_CSI_PHY_GFCLK_MASK (1 << 9)
153
154/* Used by CM_CUSTEFUSE_CLKSTCTRL */
155#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_L4_GICLK_SHIFT 8
156#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_L4_GICLK_WIDTH 0x1
157#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_L4_GICLK_MASK (1 << 8)
158
159/* Used by CM_CUSTEFUSE_CLKSTCTRL */
160#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_SYS_GFCLK_SHIFT 9
161#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_SYS_GFCLK_WIDTH 0x1
162#define OMAP54XX_CLKACTIVITY_CUSTEFUSE_SYS_GFCLK_MASK (1 << 9)
163
164/* Used by CM_EMIF_CLKSTCTRL */
165#define OMAP54XX_CLKACTIVITY_DLL_GCLK_SHIFT 9
166#define OMAP54XX_CLKACTIVITY_DLL_GCLK_WIDTH 0x1
167#define OMAP54XX_CLKACTIVITY_DLL_GCLK_MASK (1 << 9)
168
169/* Used by CM_DMA_CLKSTCTRL */
170#define OMAP54XX_CLKACTIVITY_DMA_L3_GICLK_SHIFT 8
171#define OMAP54XX_CLKACTIVITY_DMA_L3_GICLK_WIDTH 0x1
172#define OMAP54XX_CLKACTIVITY_DMA_L3_GICLK_MASK (1 << 8)
173
174/* Used by CM_DSP_CLKSTCTRL */
175#define OMAP54XX_CLKACTIVITY_DSP_GCLK_SHIFT 8
176#define OMAP54XX_CLKACTIVITY_DSP_GCLK_WIDTH 0x1
177#define OMAP54XX_CLKACTIVITY_DSP_GCLK_MASK (1 << 8)
178
179/* Used by CM_DSS_CLKSTCTRL */
180#define OMAP54XX_CLKACTIVITY_DSS_GFCLK_SHIFT 9
181#define OMAP54XX_CLKACTIVITY_DSS_GFCLK_WIDTH 0x1
182#define OMAP54XX_CLKACTIVITY_DSS_GFCLK_MASK (1 << 9)
183
184/* Used by CM_DSS_CLKSTCTRL */
185#define OMAP54XX_CLKACTIVITY_DSS_L3_GICLK_SHIFT 8
186#define OMAP54XX_CLKACTIVITY_DSS_L3_GICLK_WIDTH 0x1
187#define OMAP54XX_CLKACTIVITY_DSS_L3_GICLK_MASK (1 << 8)
188
189/* Used by CM_DSS_CLKSTCTRL */
190#define OMAP54XX_CLKACTIVITY_DSS_SYS_GFCLK_SHIFT 10
191#define OMAP54XX_CLKACTIVITY_DSS_SYS_GFCLK_WIDTH 0x1
192#define OMAP54XX_CLKACTIVITY_DSS_SYS_GFCLK_MASK (1 << 10)
193
194/* Used by CM_EMIF_CLKSTCTRL */
195#define OMAP54XX_CLKACTIVITY_EMIF_L3_GICLK_SHIFT 8
196#define OMAP54XX_CLKACTIVITY_EMIF_L3_GICLK_WIDTH 0x1
197#define OMAP54XX_CLKACTIVITY_EMIF_L3_GICLK_MASK (1 << 8)
198
199/* Used by CM_EMIF_CLKSTCTRL */
200#define OMAP54XX_CLKACTIVITY_EMIF_LL_GCLK_SHIFT 11
201#define OMAP54XX_CLKACTIVITY_EMIF_LL_GCLK_WIDTH 0x1
202#define OMAP54XX_CLKACTIVITY_EMIF_LL_GCLK_MASK (1 << 11)
203
204/* Used by CM_EMIF_CLKSTCTRL */
205#define OMAP54XX_CLKACTIVITY_EMIF_PHY_GCLK_SHIFT 10
206#define OMAP54XX_CLKACTIVITY_EMIF_PHY_GCLK_WIDTH 0x1
207#define OMAP54XX_CLKACTIVITY_EMIF_PHY_GCLK_MASK (1 << 10)
208
209/* Used by CM_EMU_CLKSTCTRL */
210#define OMAP54XX_CLKACTIVITY_EMU_SYS_GCLK_SHIFT 8
211#define OMAP54XX_CLKACTIVITY_EMU_SYS_GCLK_WIDTH 0x1
212#define OMAP54XX_CLKACTIVITY_EMU_SYS_GCLK_MASK (1 << 8)
213
214/* Used by CM_CAM_CLKSTCTRL */
215#define OMAP54XX_CLKACTIVITY_FDIF_GCLK_SHIFT 10
216#define OMAP54XX_CLKACTIVITY_FDIF_GCLK_WIDTH 0x1
217#define OMAP54XX_CLKACTIVITY_FDIF_GCLK_MASK (1 << 10)
218
219/* Used by CM_ABE_CLKSTCTRL */
220#define OMAP54XX_CLKACTIVITY_FUNC_24M_GFCLK_SHIFT 10
221#define OMAP54XX_CLKACTIVITY_FUNC_24M_GFCLK_WIDTH 0x1
222#define OMAP54XX_CLKACTIVITY_FUNC_24M_GFCLK_MASK (1 << 10)
223
224/* Used by CM_GPU_CLKSTCTRL */
225#define OMAP54XX_CLKACTIVITY_GPU_CORE_GCLK_SHIFT 9
226#define OMAP54XX_CLKACTIVITY_GPU_CORE_GCLK_WIDTH 0x1
227#define OMAP54XX_CLKACTIVITY_GPU_CORE_GCLK_MASK (1 << 9)
228
229/* Used by CM_GPU_CLKSTCTRL */
230#define OMAP54XX_CLKACTIVITY_GPU_HYD_GCLK_SHIFT 10
231#define OMAP54XX_CLKACTIVITY_GPU_HYD_GCLK_WIDTH 0x1
232#define OMAP54XX_CLKACTIVITY_GPU_HYD_GCLK_MASK (1 << 10)
233
234/* Used by CM_GPU_CLKSTCTRL */
235#define OMAP54XX_CLKACTIVITY_GPU_SYS_GCLK_SHIFT 8
236#define OMAP54XX_CLKACTIVITY_GPU_SYS_GCLK_WIDTH 0x1
237#define OMAP54XX_CLKACTIVITY_GPU_SYS_GCLK_MASK (1 << 8)
238
239/* Used by CM_DSS_CLKSTCTRL */
240#define OMAP54XX_CLKACTIVITY_HDMI_CEC_GFCLK_SHIFT 12
241#define OMAP54XX_CLKACTIVITY_HDMI_CEC_GFCLK_WIDTH 0x1
242#define OMAP54XX_CLKACTIVITY_HDMI_CEC_GFCLK_MASK (1 << 12)
243
244/* Used by CM_DSS_CLKSTCTRL */
245#define OMAP54XX_CLKACTIVITY_HDMI_PHY_GFCLK_SHIFT 11
246#define OMAP54XX_CLKACTIVITY_HDMI_PHY_GFCLK_WIDTH 0x1
247#define OMAP54XX_CLKACTIVITY_HDMI_PHY_GFCLK_MASK (1 << 11)
248
249/* Used by CM_L3INIT_CLKSTCTRL */
250#define OMAP54XX_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20
251#define OMAP54XX_CLKACTIVITY_HSIC_P1_480M_GFCLK_WIDTH 0x1
252#define OMAP54XX_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20)
253
254/* Used by CM_L3INIT_CLKSTCTRL */
255#define OMAP54XX_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26
256#define OMAP54XX_CLKACTIVITY_HSIC_P1_GFCLK_WIDTH 0x1
257#define OMAP54XX_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26)
258
259/* Used by CM_L3INIT_CLKSTCTRL */
260#define OMAP54XX_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21
261#define OMAP54XX_CLKACTIVITY_HSIC_P2_480M_GFCLK_WIDTH 0x1
262#define OMAP54XX_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21)
263
264/* Used by CM_L3INIT_CLKSTCTRL */
265#define OMAP54XX_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27
266#define OMAP54XX_CLKACTIVITY_HSIC_P2_GFCLK_WIDTH 0x1
267#define OMAP54XX_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27)
268
269/* Used by CM_L3INIT_CLKSTCTRL */
270#define OMAP54XX_CLKACTIVITY_HSIC_P3_480M_GFCLK_SHIFT 6
271#define OMAP54XX_CLKACTIVITY_HSIC_P3_480M_GFCLK_WIDTH 0x1
272#define OMAP54XX_CLKACTIVITY_HSIC_P3_480M_GFCLK_MASK (1 << 6)
273
274/* Used by CM_L3INIT_CLKSTCTRL */
275#define OMAP54XX_CLKACTIVITY_HSIC_P3_GFCLK_SHIFT 7
276#define OMAP54XX_CLKACTIVITY_HSIC_P3_GFCLK_WIDTH 0x1
277#define OMAP54XX_CLKACTIVITY_HSIC_P3_GFCLK_MASK (1 << 7)
278
279/* Used by CM_L3INIT_CLKSTCTRL */
280#define OMAP54XX_CLKACTIVITY_HSI_GFCLK_SHIFT 16
281#define OMAP54XX_CLKACTIVITY_HSI_GFCLK_WIDTH 0x1
282#define OMAP54XX_CLKACTIVITY_HSI_GFCLK_MASK (1 << 16)
283
284/* Used by CM_IPU_CLKSTCTRL */
285#define OMAP54XX_CLKACTIVITY_IPU_GCLK_SHIFT 8
286#define OMAP54XX_CLKACTIVITY_IPU_GCLK_WIDTH 0x1
287#define OMAP54XX_CLKACTIVITY_IPU_GCLK_MASK (1 << 8)
288
289/* Used by CM_IVA_CLKSTCTRL */
290#define OMAP54XX_CLKACTIVITY_IVA_GCLK_SHIFT 8
291#define OMAP54XX_CLKACTIVITY_IVA_GCLK_WIDTH 0x1
292#define OMAP54XX_CLKACTIVITY_IVA_GCLK_MASK (1 << 8)
293
294/* Used by CM_L3INIT_CLKSTCTRL */
295#define OMAP54XX_CLKACTIVITY_L3INIT_48M_GFCLK_SHIFT 12
296#define OMAP54XX_CLKACTIVITY_L3INIT_48M_GFCLK_WIDTH 0x1
297#define OMAP54XX_CLKACTIVITY_L3INIT_48M_GFCLK_MASK (1 << 12)
298
299/* Used by CM_L3INIT_CLKSTCTRL */
300#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P1_GFCLK_SHIFT 28
301#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P1_GFCLK_WIDTH 0x1
302#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P1_GFCLK_MASK (1 << 28)
303
304/* Used by CM_L3INIT_CLKSTCTRL */
305#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P2_GFCLK_SHIFT 29
306#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P2_GFCLK_WIDTH 0x1
307#define OMAP54XX_CLKACTIVITY_L3INIT_60M_P2_GFCLK_MASK (1 << 29)
308
309/* Used by CM_L3INIT_CLKSTCTRL */
310#define OMAP54XX_CLKACTIVITY_L3INIT_L3_GICLK_SHIFT 8
311#define OMAP54XX_CLKACTIVITY_L3INIT_L3_GICLK_WIDTH 0x1
312#define OMAP54XX_CLKACTIVITY_L3INIT_L3_GICLK_MASK (1 << 8)
313
314/* Used by CM_L3INIT_CLKSTCTRL */
315#define OMAP54XX_CLKACTIVITY_L3INIT_L4_GICLK_SHIFT 9
316#define OMAP54XX_CLKACTIVITY_L3INIT_L4_GICLK_WIDTH 0x1
317#define OMAP54XX_CLKACTIVITY_L3INIT_L4_GICLK_MASK (1 << 9)
318
319/* Used by CM_L3INIT_CLKSTCTRL */
320#define OMAP54XX_CLKACTIVITY_L3INIT_USB_OTG_SS_LFPS_TX_GFCLK_SHIFT 11
321#define OMAP54XX_CLKACTIVITY_L3INIT_USB_OTG_SS_LFPS_TX_GFCLK_WIDTH 0x1
322#define OMAP54XX_CLKACTIVITY_L3INIT_USB_OTG_SS_LFPS_TX_GFCLK_MASK (1 << 11)
323
324/* Used by CM_L3INSTR_CLKSTCTRL */
325#define OMAP54XX_CLKACTIVITY_L3INSTR_DLL_AGING_GCLK_SHIFT 9
326#define OMAP54XX_CLKACTIVITY_L3INSTR_DLL_AGING_GCLK_WIDTH 0x1
327#define OMAP54XX_CLKACTIVITY_L3INSTR_DLL_AGING_GCLK_MASK (1 << 9)
328
329/* Used by CM_L3INSTR_CLKSTCTRL */
330#define OMAP54XX_CLKACTIVITY_L3INSTR_L3_GICLK_SHIFT 8
331#define OMAP54XX_CLKACTIVITY_L3INSTR_L3_GICLK_WIDTH 0x1
332#define OMAP54XX_CLKACTIVITY_L3INSTR_L3_GICLK_MASK (1 << 8)
333
334/* Used by CM_L3INSTR_CLKSTCTRL */
335#define OMAP54XX_CLKACTIVITY_L3INSTR_TS_GCLK_SHIFT 10
336#define OMAP54XX_CLKACTIVITY_L3INSTR_TS_GCLK_WIDTH 0x1
337#define OMAP54XX_CLKACTIVITY_L3INSTR_TS_GCLK_MASK (1 << 10)
338
339/* Used by CM_L3MAIN1_CLKSTCTRL */
340#define OMAP54XX_CLKACTIVITY_L3MAIN1_L3_GICLK_SHIFT 8
341#define OMAP54XX_CLKACTIVITY_L3MAIN1_L3_GICLK_WIDTH 0x1
342#define OMAP54XX_CLKACTIVITY_L3MAIN1_L3_GICLK_MASK (1 << 8)
343
344/* Used by CM_L3MAIN2_CLKSTCTRL */
345#define OMAP54XX_CLKACTIVITY_L3MAIN2_L3_GICLK_SHIFT 8
346#define OMAP54XX_CLKACTIVITY_L3MAIN2_L3_GICLK_WIDTH 0x1
347#define OMAP54XX_CLKACTIVITY_L3MAIN2_L3_GICLK_MASK (1 << 8)
348
349/* Used by CM_L4CFG_CLKSTCTRL */
350#define OMAP54XX_CLKACTIVITY_L4CFG_L4_GICLK_SHIFT 8
351#define OMAP54XX_CLKACTIVITY_L4CFG_L4_GICLK_WIDTH 0x1
352#define OMAP54XX_CLKACTIVITY_L4CFG_L4_GICLK_MASK (1 << 8)
353
354/* Used by CM_L4PER_CLKSTCTRL */
355#define OMAP54XX_CLKACTIVITY_L4PER_L4_GICLK_SHIFT 8
356#define OMAP54XX_CLKACTIVITY_L4PER_L4_GICLK_WIDTH 0x1
357#define OMAP54XX_CLKACTIVITY_L4PER_L4_GICLK_MASK (1 << 8)
358
359/* Used by CM_L4SEC_CLKSTCTRL */
360#define OMAP54XX_CLKACTIVITY_L4SEC_L3_GICLK_SHIFT 8
361#define OMAP54XX_CLKACTIVITY_L4SEC_L3_GICLK_WIDTH 0x1
362#define OMAP54XX_CLKACTIVITY_L4SEC_L3_GICLK_MASK (1 << 8)
363
364/* Used by CM_L4SEC_CLKSTCTRL */
365#define OMAP54XX_CLKACTIVITY_L4SEC_L4_GICLK_SHIFT 9
366#define OMAP54XX_CLKACTIVITY_L4SEC_L4_GICLK_WIDTH 0x1
367#define OMAP54XX_CLKACTIVITY_L4SEC_L4_GICLK_MASK (1 << 9)
368
369/* Used by CM_MIPIEXT_CLKSTCTRL */
370#define OMAP54XX_CLKACTIVITY_MIPIEXT_L3_GICLK_SHIFT 8
371#define OMAP54XX_CLKACTIVITY_MIPIEXT_L3_GICLK_WIDTH 0x1
372#define OMAP54XX_CLKACTIVITY_MIPIEXT_L3_GICLK_MASK (1 << 8)
373
374/* Used by CM_MIPIEXT_CLKSTCTRL */
375#define OMAP54XX_CLKACTIVITY_MIPIEXT_PHY_REF_GFCLK_SHIFT 11
376#define OMAP54XX_CLKACTIVITY_MIPIEXT_PHY_REF_GFCLK_WIDTH 0x1
377#define OMAP54XX_CLKACTIVITY_MIPIEXT_PHY_REF_GFCLK_MASK (1 << 11)
378
379/* Used by CM_L3INIT_CLKSTCTRL */
380#define OMAP54XX_CLKACTIVITY_MMC1_32K_GFCLK_SHIFT 2
381#define OMAP54XX_CLKACTIVITY_MMC1_32K_GFCLK_WIDTH 0x1
382#define OMAP54XX_CLKACTIVITY_MMC1_32K_GFCLK_MASK (1 << 2)
383
384/* Used by CM_L3INIT_CLKSTCTRL */
385#define OMAP54XX_CLKACTIVITY_MMC1_GFCLK_SHIFT 17
386#define OMAP54XX_CLKACTIVITY_MMC1_GFCLK_WIDTH 0x1
387#define OMAP54XX_CLKACTIVITY_MMC1_GFCLK_MASK (1 << 17)
388
389/* Used by CM_L3INIT_CLKSTCTRL */
390#define OMAP54XX_CLKACTIVITY_MMC2_GFCLK_SHIFT 18
391#define OMAP54XX_CLKACTIVITY_MMC2_GFCLK_WIDTH 0x1
392#define OMAP54XX_CLKACTIVITY_MMC2_GFCLK_MASK (1 << 18)
393
394/* Used by CM_MPU_CLKSTCTRL */
395#define OMAP54XX_CLKACTIVITY_MPU_GCLK_SHIFT 8
396#define OMAP54XX_CLKACTIVITY_MPU_GCLK_WIDTH 0x1
397#define OMAP54XX_CLKACTIVITY_MPU_GCLK_MASK (1 << 8)
398
399/* Used by CM_ABE_CLKSTCTRL */
400#define OMAP54XX_CLKACTIVITY_PAD_CLKS_SHIFT 14
401#define OMAP54XX_CLKACTIVITY_PAD_CLKS_WIDTH 0x1
402#define OMAP54XX_CLKACTIVITY_PAD_CLKS_MASK (1 << 14)
403
404/* Used by CM_ABE_CLKSTCTRL */
405#define OMAP54XX_CLKACTIVITY_PAD_SLIMBUS1_CLK_SHIFT 15
406#define OMAP54XX_CLKACTIVITY_PAD_SLIMBUS1_CLK_WIDTH 0x1
407#define OMAP54XX_CLKACTIVITY_PAD_SLIMBUS1_CLK_MASK (1 << 15)
408
409/* Used by CM_L3INIT_CLKSTCTRL */
410#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP1_SHIFT 3
411#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP1_WIDTH 0x1
412#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP1_MASK (1 << 3)
413
414/* Used by CM_L3INIT_CLKSTCTRL */
415#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP2_SHIFT 4
416#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP2_WIDTH 0x1
417#define OMAP54XX_CLKACTIVITY_PAD_XCLK60MHSP2_MASK (1 << 4)
418
419/* Used by CM_L4PER_CLKSTCTRL */
420#define OMAP54XX_CLKACTIVITY_PER_12M_GFCLK_SHIFT 15
421#define OMAP54XX_CLKACTIVITY_PER_12M_GFCLK_WIDTH 0x1
422#define OMAP54XX_CLKACTIVITY_PER_12M_GFCLK_MASK (1 << 15)
423
424/* Used by CM_L4PER_CLKSTCTRL */
425#define OMAP54XX_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17
426#define OMAP54XX_CLKACTIVITY_PER_32K_GFCLK_WIDTH 0x1
427#define OMAP54XX_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17)
428
429/* Used by CM_L4PER_CLKSTCTRL */
430#define OMAP54XX_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18
431#define OMAP54XX_CLKACTIVITY_PER_48M_GFCLK_WIDTH 0x1
432#define OMAP54XX_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18)
433
434/* Used by CM_L4PER_CLKSTCTRL */
435#define OMAP54XX_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19
436#define OMAP54XX_CLKACTIVITY_PER_96M_GFCLK_WIDTH 0x1
437#define OMAP54XX_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19)
438
439/* Used by CM_L3INIT_CLKSTCTRL */
440#define OMAP54XX_CLKACTIVITY_SATA_REF_GFCLK_SHIFT 19
441#define OMAP54XX_CLKACTIVITY_SATA_REF_GFCLK_WIDTH 0x1
442#define OMAP54XX_CLKACTIVITY_SATA_REF_GFCLK_MASK (1 << 19)
443
444/* Used by CM_COREAON_CLKSTCTRL */
445#define OMAP54XX_CLKACTIVITY_SR_CORE_SYS_GFCLK_SHIFT 11
446#define OMAP54XX_CLKACTIVITY_SR_CORE_SYS_GFCLK_WIDTH 0x1
447#define OMAP54XX_CLKACTIVITY_SR_CORE_SYS_GFCLK_MASK (1 << 11)
448
449/* Used by CM_COREAON_CLKSTCTRL */
450#define OMAP54XX_CLKACTIVITY_SR_MM_SYS_GFCLK_SHIFT 10
451#define OMAP54XX_CLKACTIVITY_SR_MM_SYS_GFCLK_WIDTH 0x1
452#define OMAP54XX_CLKACTIVITY_SR_MM_SYS_GFCLK_MASK (1 << 10)
453
454/* Used by CM_COREAON_CLKSTCTRL */
455#define OMAP54XX_CLKACTIVITY_SR_MPU_SYS_GFCLK_SHIFT 9
456#define OMAP54XX_CLKACTIVITY_SR_MPU_SYS_GFCLK_WIDTH 0x1
457#define OMAP54XX_CLKACTIVITY_SR_MPU_SYS_GFCLK_MASK (1 << 9)
458
459/* Used by CM_WKUPAON_CLKSTCTRL */
460#define OMAP54XX_CLKACTIVITY_SYS_CLK_SHIFT 8
461#define OMAP54XX_CLKACTIVITY_SYS_CLK_WIDTH 0x1
462#define OMAP54XX_CLKACTIVITY_SYS_CLK_MASK (1 << 8)
463
464/* Used by CM_WKUPAON_CLKSTCTRL */
465#define OMAP54XX_CLKACTIVITY_SYS_CLK_ALL_SHIFT 15
466#define OMAP54XX_CLKACTIVITY_SYS_CLK_ALL_WIDTH 0x1
467#define OMAP54XX_CLKACTIVITY_SYS_CLK_ALL_MASK (1 << 15)
468
469/* Used by CM_WKUPAON_CLKSTCTRL */
470#define OMAP54XX_CLKACTIVITY_SYS_CLK_FUNC_SHIFT 14
471#define OMAP54XX_CLKACTIVITY_SYS_CLK_FUNC_WIDTH 0x1
472#define OMAP54XX_CLKACTIVITY_SYS_CLK_FUNC_MASK (1 << 14)
473
474/* Used by CM_L4PER_CLKSTCTRL */
475#define OMAP54XX_CLKACTIVITY_TIMER10_GFCLK_SHIFT 9
476#define OMAP54XX_CLKACTIVITY_TIMER10_GFCLK_WIDTH 0x1
477#define OMAP54XX_CLKACTIVITY_TIMER10_GFCLK_MASK (1 << 9)
478
479/* Used by CM_L4PER_CLKSTCTRL */
480#define OMAP54XX_CLKACTIVITY_TIMER11_GFCLK_SHIFT 10
481#define OMAP54XX_CLKACTIVITY_TIMER11_GFCLK_WIDTH 0x1
482#define OMAP54XX_CLKACTIVITY_TIMER11_GFCLK_MASK (1 << 10)
483
484/* Used by CM_L4PER_CLKSTCTRL */
485#define OMAP54XX_CLKACTIVITY_TIMER2_GFCLK_SHIFT 11
486#define OMAP54XX_CLKACTIVITY_TIMER2_GFCLK_WIDTH 0x1
487#define OMAP54XX_CLKACTIVITY_TIMER2_GFCLK_MASK (1 << 11)
488
489/* Used by CM_L4PER_CLKSTCTRL */
490#define OMAP54XX_CLKACTIVITY_TIMER3_GFCLK_SHIFT 12
491#define OMAP54XX_CLKACTIVITY_TIMER3_GFCLK_WIDTH 0x1
492#define OMAP54XX_CLKACTIVITY_TIMER3_GFCLK_MASK (1 << 12)
493
494/* Used by CM_L4PER_CLKSTCTRL */
495#define OMAP54XX_CLKACTIVITY_TIMER4_GFCLK_SHIFT 13
496#define OMAP54XX_CLKACTIVITY_TIMER4_GFCLK_WIDTH 0x1
497#define OMAP54XX_CLKACTIVITY_TIMER4_GFCLK_MASK (1 << 13)
498
499/* Used by CM_L4PER_CLKSTCTRL */
500#define OMAP54XX_CLKACTIVITY_TIMER9_GFCLK_SHIFT 14
501#define OMAP54XX_CLKACTIVITY_TIMER9_GFCLK_WIDTH 0x1
502#define OMAP54XX_CLKACTIVITY_TIMER9_GFCLK_MASK (1 << 14)
503
504/* Used by CM_L3INIT_CLKSTCTRL */
505#define OMAP54XX_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22
506#define OMAP54XX_CLKACTIVITY_TLL_CH0_GFCLK_WIDTH 0x1
507#define OMAP54XX_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22)
508
509/* Used by CM_L3INIT_CLKSTCTRL */
510#define OMAP54XX_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23
511#define OMAP54XX_CLKACTIVITY_TLL_CH1_GFCLK_WIDTH 0x1
512#define OMAP54XX_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23)
513
514/* Used by CM_L3INIT_CLKSTCTRL */
515#define OMAP54XX_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24
516#define OMAP54XX_CLKACTIVITY_TLL_CH2_GFCLK_WIDTH 0x1
517#define OMAP54XX_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24)
518
519/* Used by CM_MIPIEXT_CLKSTCTRL */
520#define OMAP54XX_CLKACTIVITY_UNIPRO1_DPLL_CLK_SHIFT 10
521#define OMAP54XX_CLKACTIVITY_UNIPRO1_DPLL_CLK_WIDTH 0x1
522#define OMAP54XX_CLKACTIVITY_UNIPRO1_DPLL_CLK_MASK (1 << 10)
523
524/* Used by CM_MIPIEXT_CLKSTCTRL */
525#define OMAP54XX_CLKACTIVITY_UNIPRO1_PHY_GFCLK_SHIFT 13
526#define OMAP54XX_CLKACTIVITY_UNIPRO1_PHY_GFCLK_WIDTH 0x1
527#define OMAP54XX_CLKACTIVITY_UNIPRO1_PHY_GFCLK_MASK (1 << 13)
528
529/* Used by CM_MIPIEXT_CLKSTCTRL */
530#define OMAP54XX_CLKACTIVITY_UNIPRO1_TXPHY_LS_GFCLK_SHIFT 12
531#define OMAP54XX_CLKACTIVITY_UNIPRO1_TXPHY_LS_GFCLK_WIDTH 0x1
532#define OMAP54XX_CLKACTIVITY_UNIPRO1_TXPHY_LS_GFCLK_MASK (1 << 12)
533
534/* Used by CM_L3INIT_CLKSTCTRL */
535#define OMAP54XX_CLKACTIVITY_UNIPRO2_DPLL_CLK_SHIFT 10
536#define OMAP54XX_CLKACTIVITY_UNIPRO2_DPLL_CLK_WIDTH 0x1
537#define OMAP54XX_CLKACTIVITY_UNIPRO2_DPLL_CLK_MASK (1 << 10)
538
539/* Used by CM_L3INIT_CLKSTCTRL */
540#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_GFCLK_SHIFT 13
541#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_GFCLK_WIDTH 0x1
542#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_GFCLK_MASK (1 << 13)
543
544/* Used by CM_L3INIT_CLKSTCTRL */
545#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_REF_GFCLK_SHIFT 5
546#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_REF_GFCLK_WIDTH 0x1
547#define OMAP54XX_CLKACTIVITY_UNIPRO2_PHY_REF_GFCLK_MASK (1 << 5)
548
549/* Used by CM_L3INIT_CLKSTCTRL */
550#define OMAP54XX_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14
551#define OMAP54XX_CLKACTIVITY_USB_DPLL_CLK_WIDTH 0x1
552#define OMAP54XX_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14)
553
554/* Used by CM_L3INIT_CLKSTCTRL */
555#define OMAP54XX_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15
556#define OMAP54XX_CLKACTIVITY_USB_DPLL_HS_CLK_WIDTH 0x1
557#define OMAP54XX_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15)
558
559/* Used by CM_L3INIT_CLKSTCTRL */
560#define OMAP54XX_CLKACTIVITY_USB_OTG_SS_REF_CLK_SHIFT 31
561#define OMAP54XX_CLKACTIVITY_USB_OTG_SS_REF_CLK_WIDTH 0x1
562#define OMAP54XX_CLKACTIVITY_USB_OTG_SS_REF_CLK_MASK (1 << 31)
563
564/* Used by CM_L3INIT_CLKSTCTRL */
565#define OMAP54XX_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30
566#define OMAP54XX_CLKACTIVITY_UTMI_P3_GFCLK_WIDTH 0x1
567#define OMAP54XX_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30)
568
569/* Used by CM_L3INIT_CLKSTCTRL */
570#define OMAP54XX_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25
571#define OMAP54XX_CLKACTIVITY_UTMI_ROOT_GFCLK_WIDTH 0x1
572#define OMAP54XX_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25)
573
574/* Used by CM_WKUPAON_CLKSTCTRL */
575#define OMAP54XX_CLKACTIVITY_WKUPAON_32K_GFCLK_SHIFT 11
576#define OMAP54XX_CLKACTIVITY_WKUPAON_32K_GFCLK_WIDTH 0x1
577#define OMAP54XX_CLKACTIVITY_WKUPAON_32K_GFCLK_MASK (1 << 11)
578
579/* Used by CM_WKUPAON_CLKSTCTRL */
580#define OMAP54XX_CLKACTIVITY_WKUPAON_GICLK_SHIFT 12
581#define OMAP54XX_CLKACTIVITY_WKUPAON_GICLK_WIDTH 0x1
582#define OMAP54XX_CLKACTIVITY_WKUPAON_GICLK_MASK (1 << 12)
583
584/* Used by CM_WKUPAON_CLKSTCTRL */
585#define OMAP54XX_CLKACTIVITY_WKUPAON_IO_SRCOMP_GFCLK_SHIFT 13
586#define OMAP54XX_CLKACTIVITY_WKUPAON_IO_SRCOMP_GFCLK_WIDTH 0x1
587#define OMAP54XX_CLKACTIVITY_WKUPAON_IO_SRCOMP_GFCLK_MASK (1 << 13)
588
589/* Used by CM_COREAON_IO_SRCOMP_CLKCTRL, CM_WKUPAON_IO_SRCOMP_CLKCTRL */
590#define OMAP54XX_CLKEN_SRCOMP_FCLK_SHIFT 8
591#define OMAP54XX_CLKEN_SRCOMP_FCLK_WIDTH 0x1
592#define OMAP54XX_CLKEN_SRCOMP_FCLK_MASK (1 << 8)
593
594/*
595 * Used by CM_ABE_TIMER5_CLKCTRL, CM_ABE_TIMER6_CLKCTRL, CM_ABE_TIMER7_CLKCTRL,
596 * CM_ABE_TIMER8_CLKCTRL, CM_L3INIT_HSI_CLKCTRL, CM_L4PER_TIMER10_CLKCTRL,
597 * CM_L4PER_TIMER11_CLKCTRL, CM_L4PER_TIMER2_CLKCTRL, CM_L4PER_TIMER3_CLKCTRL,
598 * CM_L4PER_TIMER4_CLKCTRL, CM_L4PER_TIMER9_CLKCTRL, CM_WKUPAON_TIMER1_CLKCTRL
599 */
600#define OMAP54XX_CLKSEL_SHIFT 24 26#define OMAP54XX_CLKSEL_SHIFT 24
601#define OMAP54XX_CLKSEL_WIDTH 0x1 27#define OMAP54XX_CLKSEL_WIDTH 0x1
602#define OMAP54XX_CLKSEL_MASK (1 << 24)
603
604/*
605 * Renamed from CLKSEL Used by CM_CLKSEL_ABE_DSS_SYS, CM_CLKSEL_ABE_PLL_REF,
606 * CM_CLKSEL_USB_60MHZ, CM_CLKSEL_WKUPAON
607 */
608#define OMAP54XX_CLKSEL_0_0_SHIFT 0 28#define OMAP54XX_CLKSEL_0_0_SHIFT 0
609#define OMAP54XX_CLKSEL_0_0_WIDTH 0x1 29#define OMAP54XX_CLKSEL_0_0_WIDTH 0x1
610#define OMAP54XX_CLKSEL_0_0_MASK (1 << 0)
611
612/* Renamed from CLKSEL Used by CM_BYPCLK_DPLL_IVA, CM_BYPCLK_DPLL_MPU */
613#define OMAP54XX_CLKSEL_0_1_SHIFT 0
614#define OMAP54XX_CLKSEL_0_1_WIDTH 0x2
615#define OMAP54XX_CLKSEL_0_1_MASK (0x3 << 0)
616
617/* Renamed from CLKSEL Used by CM_L3INSTR_CTRL_MODULE_BANDGAP_CLKCTRL */
618#define OMAP54XX_CLKSEL_24_25_SHIFT 24
619#define OMAP54XX_CLKSEL_24_25_WIDTH 0x2
620#define OMAP54XX_CLKSEL_24_25_MASK (0x3 << 24)
621
622/* Used by CM_MPU_MPU_CLKCTRL */
623#define OMAP54XX_CLKSEL_ABE_DIV_MODE_SHIFT 26
624#define OMAP54XX_CLKSEL_ABE_DIV_MODE_WIDTH 0x1
625#define OMAP54XX_CLKSEL_ABE_DIV_MODE_MASK (1 << 26)
626
627/* Used by CM_ABE_AESS_CLKCTRL */
628#define OMAP54XX_CLKSEL_AESS_FCLK_SHIFT 24 30#define OMAP54XX_CLKSEL_AESS_FCLK_SHIFT 24
629#define OMAP54XX_CLKSEL_AESS_FCLK_WIDTH 0x1 31#define OMAP54XX_CLKSEL_AESS_FCLK_WIDTH 0x1
630#define OMAP54XX_CLKSEL_AESS_FCLK_MASK (1 << 24)
631
632/* Used by CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL */
633#define OMAP54XX_CLKSEL_DIV_SHIFT 25 32#define OMAP54XX_CLKSEL_DIV_SHIFT 25
634#define OMAP54XX_CLKSEL_DIV_WIDTH 0x1 33#define OMAP54XX_CLKSEL_DIV_WIDTH 0x1
635#define OMAP54XX_CLKSEL_DIV_MASK (1 << 25)
636
637/* Used by CM_MPU_MPU_CLKCTRL */
638#define OMAP54XX_CLKSEL_EMIF_DIV_MODE_SHIFT 24
639#define OMAP54XX_CLKSEL_EMIF_DIV_MODE_WIDTH 0x2
640#define OMAP54XX_CLKSEL_EMIF_DIV_MODE_MASK (0x3 << 24)
641
642/* Used by CM_CAM_FDIF_CLKCTRL */
643#define OMAP54XX_CLKSEL_FCLK_SHIFT 24 34#define OMAP54XX_CLKSEL_FCLK_SHIFT 24
644#define OMAP54XX_CLKSEL_FCLK_WIDTH 0x1 35#define OMAP54XX_CLKSEL_FCLK_WIDTH 0x1
645#define OMAP54XX_CLKSEL_FCLK_MASK (1 << 24)
646
647/* Used by CM_GPU_GPU_CLKCTRL */
648#define OMAP54XX_CLKSEL_GPU_CORE_GCLK_SHIFT 24 36#define OMAP54XX_CLKSEL_GPU_CORE_GCLK_SHIFT 24
649#define OMAP54XX_CLKSEL_GPU_CORE_GCLK_WIDTH 0x1 37#define OMAP54XX_CLKSEL_GPU_CORE_GCLK_WIDTH 0x1
650#define OMAP54XX_CLKSEL_GPU_CORE_GCLK_MASK (1 << 24)
651
652/* Used by CM_GPU_GPU_CLKCTRL */
653#define OMAP54XX_CLKSEL_GPU_HYD_GCLK_SHIFT 25 38#define OMAP54XX_CLKSEL_GPU_HYD_GCLK_SHIFT 25
654#define OMAP54XX_CLKSEL_GPU_HYD_GCLK_WIDTH 0x1 39#define OMAP54XX_CLKSEL_GPU_HYD_GCLK_WIDTH 0x1
655#define OMAP54XX_CLKSEL_GPU_HYD_GCLK_MASK (1 << 25)
656
657/* Used by CM_GPU_GPU_CLKCTRL */
658#define OMAP54XX_CLKSEL_GPU_SYS_CLK_SHIFT 26
659#define OMAP54XX_CLKSEL_GPU_SYS_CLK_WIDTH 0x1
660#define OMAP54XX_CLKSEL_GPU_SYS_CLK_MASK (1 << 26)
661
662/*
663 * Used by CM_ABE_DMIC_CLKCTRL, CM_ABE_MCASP_CLKCTRL, CM_ABE_MCBSP1_CLKCTRL,
664 * CM_ABE_MCBSP2_CLKCTRL, CM_ABE_MCBSP3_CLKCTRL
665 */
666#define OMAP54XX_CLKSEL_INTERNAL_SOURCE_SHIFT 26 40#define OMAP54XX_CLKSEL_INTERNAL_SOURCE_SHIFT 26
667#define OMAP54XX_CLKSEL_INTERNAL_SOURCE_WIDTH 0x2 41#define OMAP54XX_CLKSEL_INTERNAL_SOURCE_WIDTH 0x2
668#define OMAP54XX_CLKSEL_INTERNAL_SOURCE_MASK (0x3 << 26)
669
670/* Used by CM_CLKSEL_CORE */
671#define OMAP54XX_CLKSEL_L3_SHIFT 4
672#define OMAP54XX_CLKSEL_L3_WIDTH 0x1
673#define OMAP54XX_CLKSEL_L3_MASK (1 << 4)
674
675/* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */
676#define OMAP54XX_CLKSEL_L3_1_1_SHIFT 1
677#define OMAP54XX_CLKSEL_L3_1_1_WIDTH 0x1
678#define OMAP54XX_CLKSEL_L3_1_1_MASK (1 << 1)
679
680/* Used by CM_CLKSEL_CORE */
681#define OMAP54XX_CLKSEL_L4_SHIFT 8
682#define OMAP54XX_CLKSEL_L4_WIDTH 0x1
683#define OMAP54XX_CLKSEL_L4_MASK (1 << 8)
684
685/* Used by CM_EMIF_EMIF1_CLKCTRL */
686#define OMAP54XX_CLKSEL_LL_SHIFT 24
687#define OMAP54XX_CLKSEL_LL_WIDTH 0x1
688#define OMAP54XX_CLKSEL_LL_MASK (1 << 24)
689
690/* Used by CM_CLKSEL_ABE */
691#define OMAP54XX_CLKSEL_OPP_SHIFT 0 42#define OMAP54XX_CLKSEL_OPP_SHIFT 0
692#define OMAP54XX_CLKSEL_OPP_WIDTH 0x2 43#define OMAP54XX_CLKSEL_OPP_WIDTH 0x2
693#define OMAP54XX_CLKSEL_OPP_MASK (0x3 << 0)
694
695/* Renamed from CLKSEL_OPP Used by CM_L3INIT_UNIPRO2_CLKCTRL */
696#define OMAP54XX_CLKSEL_OPP_24_24_SHIFT 24
697#define OMAP54XX_CLKSEL_OPP_24_24_WIDTH 0x1
698#define OMAP54XX_CLKSEL_OPP_24_24_MASK (1 << 24)
699
700/*
701 * Used by CM_ABE_DMIC_CLKCTRL, CM_ABE_MCASP_CLKCTRL, CM_ABE_MCBSP1_CLKCTRL,
702 * CM_ABE_MCBSP2_CLKCTRL, CM_ABE_MCBSP3_CLKCTRL
703 */
704#define OMAP54XX_CLKSEL_SOURCE_SHIFT 24 44#define OMAP54XX_CLKSEL_SOURCE_SHIFT 24
705#define OMAP54XX_CLKSEL_SOURCE_WIDTH 0x2 45#define OMAP54XX_CLKSEL_SOURCE_WIDTH 0x2
706#define OMAP54XX_CLKSEL_SOURCE_MASK (0x3 << 24)
707
708/*
709 * Renamed from CLKSEL_SOURCE Used by CM_L3INIT_MMC1_CLKCTRL,
710 * CM_L3INIT_MMC2_CLKCTRL
711 */
712#define OMAP54XX_CLKSEL_SOURCE_L3INIT_MMC1_SHIFT 24 46#define OMAP54XX_CLKSEL_SOURCE_L3INIT_MMC1_SHIFT 24
713#define OMAP54XX_CLKSEL_SOURCE_L3INIT_MMC1_WIDTH 0x1 47#define OMAP54XX_CLKSEL_SOURCE_L3INIT_MMC1_WIDTH 0x1
714#define OMAP54XX_CLKSEL_SOURCE_L3INIT_MMC1_MASK (1 << 24)
715
716/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
717#define OMAP54XX_CLKSEL_UTMI_P1_SHIFT 24 48#define OMAP54XX_CLKSEL_UTMI_P1_SHIFT 24
718#define OMAP54XX_CLKSEL_UTMI_P1_WIDTH 0x1 49#define OMAP54XX_CLKSEL_UTMI_P1_WIDTH 0x1
719#define OMAP54XX_CLKSEL_UTMI_P1_MASK (1 << 24)
720
721/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
722#define OMAP54XX_CLKSEL_UTMI_P2_SHIFT 25 50#define OMAP54XX_CLKSEL_UTMI_P2_SHIFT 25
723#define OMAP54XX_CLKSEL_UTMI_P2_WIDTH 0x1 51#define OMAP54XX_CLKSEL_UTMI_P2_WIDTH 0x1
724#define OMAP54XX_CLKSEL_UTMI_P2_MASK (1 << 25)
725
726/*
727 * Used by CM_DIV_H11_DPLL_CORE, CM_DIV_H11_DPLL_IVA, CM_DIV_H11_DPLL_PER,
728 * CM_DIV_H12_DPLL_CORE, CM_DIV_H12_DPLL_IVA, CM_DIV_H12_DPLL_PER,
729 * CM_DIV_H13_DPLL_CORE, CM_DIV_H13_DPLL_PER, CM_DIV_H14_DPLL_CORE,
730 * CM_DIV_H14_DPLL_PER, CM_DIV_H21_DPLL_CORE, CM_DIV_H22_DPLL_CORE,
731 * CM_DIV_H23_DPLL_CORE, CM_DIV_H24_DPLL_CORE, CM_DIV_M2_DPLL_ABE,
732 * CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER,
733 * CM_DIV_M2_DPLL_UNIPRO1, CM_DIV_M2_DPLL_UNIPRO2, CM_DIV_M2_DPLL_USB,
734 * CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER
735 */
736#define OMAP54XX_CLKST_SHIFT 9
737#define OMAP54XX_CLKST_WIDTH 0x1
738#define OMAP54XX_CLKST_MASK (1 << 9)
739
740/*
741 * Used by CM_ABE_CLKSTCTRL, CM_C2C_CLKSTCTRL, CM_CAM_CLKSTCTRL,
742 * CM_COREAON_CLKSTCTRL, CM_CUSTEFUSE_CLKSTCTRL, CM_DMA_CLKSTCTRL,
743 * CM_DSP_CLKSTCTRL, CM_DSS_CLKSTCTRL, CM_EMIF_CLKSTCTRL, CM_EMU_CLKSTCTRL,
744 * CM_GPU_CLKSTCTRL, CM_IPU_CLKSTCTRL, CM_IVA_CLKSTCTRL, CM_L3INIT_CLKSTCTRL,
745 * CM_L3INSTR_CLKSTCTRL, CM_L3MAIN1_CLKSTCTRL, CM_L3MAIN2_CLKSTCTRL,
746 * CM_L4CFG_CLKSTCTRL, CM_L4PER_CLKSTCTRL, CM_L4SEC_CLKSTCTRL,
747 * CM_MIPIEXT_CLKSTCTRL, CM_MPU_CLKSTCTRL, CM_WKUPAON_CLKSTCTRL
748 */
749#define OMAP54XX_CLKTRCTRL_SHIFT 0
750#define OMAP54XX_CLKTRCTRL_WIDTH 0x2
751#define OMAP54XX_CLKTRCTRL_MASK (0x3 << 0)
752
753/* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER */
754#define OMAP54XX_CLKX2ST_SHIFT 11
755#define OMAP54XX_CLKX2ST_WIDTH 0x1
756#define OMAP54XX_CLKX2ST_MASK (1 << 11)
757
758/* Used by CM_L4CFG_DYNAMICDEP */
759#define OMAP54XX_COREAON_DYNDEP_SHIFT 16
760#define OMAP54XX_COREAON_DYNDEP_WIDTH 0x1
761#define OMAP54XX_COREAON_DYNDEP_MASK (1 << 16)
762
763/* Used by CM_DSP_STATICDEP, CM_IPU_STATICDEP, CM_MPU_STATICDEP */
764#define OMAP54XX_COREAON_STATDEP_SHIFT 16
765#define OMAP54XX_COREAON_STATDEP_WIDTH 0x1
766#define OMAP54XX_COREAON_STATDEP_MASK (1 << 16)
767
768/* Used by CM_L4CFG_DYNAMICDEP */
769#define OMAP54XX_CUSTEFUSE_DYNDEP_SHIFT 17
770#define OMAP54XX_CUSTEFUSE_DYNDEP_WIDTH 0x1
771#define OMAP54XX_CUSTEFUSE_DYNDEP_MASK (1 << 17)
772
773/* Used by CM_DSP_STATICDEP, CM_IPU_STATICDEP, CM_MPU_STATICDEP */
774#define OMAP54XX_CUSTEFUSE_STATDEP_SHIFT 17
775#define OMAP54XX_CUSTEFUSE_STATDEP_WIDTH 0x1
776#define OMAP54XX_CUSTEFUSE_STATDEP_MASK (1 << 17)
777
778/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
779#define OMAP54XX_CUSTOM_SHIFT 6
780#define OMAP54XX_CUSTOM_WIDTH 0x2
781#define OMAP54XX_CUSTOM_MASK (0x3 << 6)
782
783/*
784 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_IVA,
785 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO1,
786 * CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB
787 */
788#define OMAP54XX_DCC_EN_SHIFT 22
789#define OMAP54XX_DCC_EN_WIDTH 0x1
790#define OMAP54XX_DCC_EN_MASK (1 << 22)
791
792/*
793 * Used by CM_CORE_AON_DEBUG_CM_CORE_AON_FD_TRANS,
794 * CM_CORE_AON_DEBUG_DSS_FD_TRANS, CM_CORE_AON_DEBUG_EMIF_FD_TRANS,
795 * CM_CORE_AON_DEBUG_L4SEC_FD_TRANS
796 */
797#define OMAP54XX_CM_DEBUG_OUT_SHIFT 0
798#define OMAP54XX_CM_DEBUG_OUT_WIDTH 0xd
799#define OMAP54XX_CM_DEBUG_OUT_MASK (0x1fff << 0)
800
801/*
802 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_ABE_FD_TRANS,
803 * CM_CORE_AON_DEBUG_L3INIT_FD_TRANS, CM_CORE_AON_DEBUG_L4PER_FD_TRANS
804 */
805#define OMAP54XX_DEBUG_OUT_0_31_SHIFT 0
806#define OMAP54XX_DEBUG_OUT_0_31_WIDTH 0x20
807#define OMAP54XX_DEBUG_OUT_0_31_MASK (0xffffffff << 0)
808
809/*
810 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_C2C_FD_TRANS,
811 * CM_CORE_AON_DEBUG_COREAON_FD_TRANS, CM_CORE_AON_DEBUG_L4CFG_FD_TRANS
812 */
813#define OMAP54XX_DEBUG_OUT_0_8_SHIFT 0
814#define OMAP54XX_DEBUG_OUT_0_8_WIDTH 0x9
815#define OMAP54XX_DEBUG_OUT_0_8_MASK (0x1ff << 0)
816
817/*
818 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_CUSTEFUSE_FD_TRANS,
819 * CM_CORE_AON_DEBUG_DMA_FD_TRANS, CM_CORE_AON_DEBUG_L3MAIN1_FD_TRANS
820 */
821#define OMAP54XX_DEBUG_OUT_0_4_SHIFT 0
822#define OMAP54XX_DEBUG_OUT_0_4_WIDTH 0x5
823#define OMAP54XX_DEBUG_OUT_0_4_MASK (0x1f << 0)
824
825/*
826 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_DSP_FD_TRANS,
827 * CM_CORE_AON_DEBUG_IPU_FD_TRANS, CM_CORE_AON_DEBUG_MPU_FD_TRANS
828 */
829#define OMAP54XX_DEBUG_OUT_0_5_SHIFT 0
830#define OMAP54XX_DEBUG_OUT_0_5_WIDTH 0x6
831#define OMAP54XX_DEBUG_OUT_0_5_MASK (0x3f << 0)
832
833/*
834 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_CAM_FD_TRANS,
835 * CM_CORE_AON_DEBUG_MIPIEXT_FD_TRANS
836 */
837#define OMAP54XX_DEBUG_OUT_0_10_SHIFT 0
838#define OMAP54XX_DEBUG_OUT_0_10_WIDTH 0xb
839#define OMAP54XX_DEBUG_OUT_0_10_MASK (0x7ff << 0)
840
841/*
842 * Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_IVA_FD_TRANS,
843 * CM_CORE_AON_DEBUG_L3MAIN2_FD_TRANS
844 */
845#define OMAP54XX_DEBUG_OUT_0_6_SHIFT 0
846#define OMAP54XX_DEBUG_OUT_0_6_WIDTH 0x7
847#define OMAP54XX_DEBUG_OUT_0_6_MASK (0x7f << 0)
848
849/* Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_ABE_FD_TRANS2 */
850#define OMAP54XX_DEBUG_OUT_0_19_SHIFT 0
851#define OMAP54XX_DEBUG_OUT_0_19_WIDTH 0x14
852#define OMAP54XX_DEBUG_OUT_0_19_MASK (0xfffff << 0)
853
854/* Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_GPU_FD_TRANS */
855#define OMAP54XX_DEBUG_OUT_0_9_SHIFT 0
856#define OMAP54XX_DEBUG_OUT_0_9_WIDTH 0xa
857#define OMAP54XX_DEBUG_OUT_0_9_MASK (0x3ff << 0)
858
859/* Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_L3INIT_FD_TRANS2 */
860#define OMAP54XX_DEBUG_OUT_0_26_SHIFT 0
861#define OMAP54XX_DEBUG_OUT_0_26_WIDTH 0x1b
862#define OMAP54XX_DEBUG_OUT_0_26_MASK (0x7ffffff << 0)
863
864/* Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_L3INSTR_FD_TRANS */
865#define OMAP54XX_DEBUG_OUT_0_13_SHIFT 0
866#define OMAP54XX_DEBUG_OUT_0_13_WIDTH 0xe
867#define OMAP54XX_DEBUG_OUT_0_13_MASK (0x3fff << 0)
868
869/* Renamed from DEBUG_OUT Used by CM_CORE_AON_DEBUG_L4PER_FD_TRANS2 */
870#define OMAP54XX_DEBUG_OUT_0_21_SHIFT 0
871#define OMAP54XX_DEBUG_OUT_0_21_WIDTH 0x16
872#define OMAP54XX_DEBUG_OUT_0_21_MASK (0x3fffff << 0)
873
874/*
875 * Used by CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE,
876 * CM_SSC_DELTAMSTEP_DPLL_IVA, CM_SSC_DELTAMSTEP_DPLL_MPU,
877 * CM_SSC_DELTAMSTEP_DPLL_PER
878 */
879#define OMAP54XX_DELTAMSTEP_SHIFT 0
880#define OMAP54XX_DELTAMSTEP_WIDTH 0x14
881#define OMAP54XX_DELTAMSTEP_MASK (0xfffff << 0)
882
883/*
884 * Renamed from DELTAMSTEP Used by CM_SSC_DELTAMSTEP_DPLL_UNIPRO1,
885 * CM_SSC_DELTAMSTEP_DPLL_UNIPRO2, CM_SSC_DELTAMSTEP_DPLL_USB
886 */
887#define OMAP54XX_DELTAMSTEP_0_20_SHIFT 0
888#define OMAP54XX_DELTAMSTEP_0_20_WIDTH 0x15
889#define OMAP54XX_DELTAMSTEP_0_20_MASK (0x1fffff << 0)
890
891/*
892 * Used by CM_DIV_H11_DPLL_CORE, CM_DIV_H11_DPLL_IVA, CM_DIV_H11_DPLL_PER,
893 * CM_DIV_H12_DPLL_CORE, CM_DIV_H12_DPLL_IVA, CM_DIV_H12_DPLL_PER,
894 * CM_DIV_H13_DPLL_CORE, CM_DIV_H13_DPLL_PER, CM_DIV_H14_DPLL_CORE,
895 * CM_DIV_H14_DPLL_PER, CM_DIV_H21_DPLL_CORE, CM_DIV_H22_DPLL_CORE,
896 * CM_DIV_H23_DPLL_CORE, CM_DIV_H24_DPLL_CORE
897 */
898#define OMAP54XX_DIVHS_SHIFT 0
899#define OMAP54XX_DIVHS_WIDTH 0x6
900#define OMAP54XX_DIVHS_MASK (0x3f << 0) 52#define OMAP54XX_DIVHS_MASK (0x3f << 0)
901
902/*
903 * Renamed from DIVHS Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE,
904 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M3_DPLL_ABE,
905 * CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER
906 */
907#define OMAP54XX_DIVHS_0_4_SHIFT 0
908#define OMAP54XX_DIVHS_0_4_WIDTH 0x5
909#define OMAP54XX_DIVHS_0_4_MASK (0x1f << 0) 53#define OMAP54XX_DIVHS_0_4_MASK (0x1f << 0)
910
911/*
912 * Renamed from DIVHS Used by CM_DIV_M2_DPLL_UNIPRO1, CM_DIV_M2_DPLL_UNIPRO2,
913 * CM_DIV_M2_DPLL_USB
914 */
915#define OMAP54XX_DIVHS_0_6_SHIFT 0
916#define OMAP54XX_DIVHS_0_6_WIDTH 0x7
917#define OMAP54XX_DIVHS_0_6_MASK (0x7f << 0) 54#define OMAP54XX_DIVHS_0_6_MASK (0x7f << 0)
918
919/* Used by CM_DLL_CTRL */
920#define OMAP54XX_DLL_OVERRIDE_SHIFT 0
921#define OMAP54XX_DLL_OVERRIDE_WIDTH 0x1
922#define OMAP54XX_DLL_OVERRIDE_MASK (1 << 0)
923
924/* Renamed from DLL_OVERRIDE Used by CM_SHADOW_FREQ_CONFIG1 */
925#define OMAP54XX_DLL_OVERRIDE_2_2_SHIFT 2
926#define OMAP54XX_DLL_OVERRIDE_2_2_WIDTH 0x1
927#define OMAP54XX_DLL_OVERRIDE_2_2_MASK (1 << 2)
928
929/* Used by CM_SHADOW_FREQ_CONFIG1 */
930#define OMAP54XX_DLL_RESET_SHIFT 3
931#define OMAP54XX_DLL_RESET_WIDTH 0x1
932#define OMAP54XX_DLL_RESET_MASK (1 << 3)
933
934/*
935 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_IVA,
936 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO1,
937 * CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB
938 */
939#define OMAP54XX_DPLL_BYP_CLKSEL_SHIFT 23
940#define OMAP54XX_DPLL_BYP_CLKSEL_WIDTH 0x1
941#define OMAP54XX_DPLL_BYP_CLKSEL_MASK (1 << 23)
942
943/* Used by CM_CLKSEL_DPLL_CORE */
944#define OMAP54XX_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20
945#define OMAP54XX_DPLL_CLKOUTHIF_CLKSEL_WIDTH 0x1
946#define OMAP54XX_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20)
947
948/* Used by CM_SHADOW_FREQ_CONFIG1 */
949#define OMAP54XX_DPLL_CORE_DPLL_EN_SHIFT 8
950#define OMAP54XX_DPLL_CORE_DPLL_EN_WIDTH 0x3
951#define OMAP54XX_DPLL_CORE_DPLL_EN_MASK (0x7 << 8)
952
953/* Used by CM_SHADOW_FREQ_CONFIG2 */
954#define OMAP54XX_DPLL_CORE_H12_DIV_SHIFT 2
955#define OMAP54XX_DPLL_CORE_H12_DIV_WIDTH 0x6
956#define OMAP54XX_DPLL_CORE_H12_DIV_MASK (0x3f << 2)
957
958/* Used by CM_SHADOW_FREQ_CONFIG1 */
959#define OMAP54XX_DPLL_CORE_M2_DIV_SHIFT 11
960#define OMAP54XX_DPLL_CORE_M2_DIV_WIDTH 0x5
961#define OMAP54XX_DPLL_CORE_M2_DIV_MASK (0x1f << 11)
962
963/*
964 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_IVA,
965 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER
966 */
967#define OMAP54XX_DPLL_DIV_SHIFT 0
968#define OMAP54XX_DPLL_DIV_WIDTH 0x7
969#define OMAP54XX_DPLL_DIV_MASK (0x7f << 0) 55#define OMAP54XX_DPLL_DIV_MASK (0x7f << 0)
970
971/*
972 * Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_UNIPRO1,
973 * CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB
974 */
975#define OMAP54XX_DPLL_DIV_0_7_SHIFT 0
976#define OMAP54XX_DPLL_DIV_0_7_WIDTH 0x8
977#define OMAP54XX_DPLL_DIV_0_7_MASK (0xff << 0)
978
979/*
980 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
981 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
982 */
983#define OMAP54XX_DPLL_DRIFTGUARD_EN_SHIFT 8
984#define OMAP54XX_DPLL_DRIFTGUARD_EN_WIDTH 0x1
985#define OMAP54XX_DPLL_DRIFTGUARD_EN_MASK (1 << 8)
986
987/*
988 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
989 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO1,
990 * CM_CLKMODE_DPLL_UNIPRO2, CM_CLKMODE_DPLL_USB
991 */
992#define OMAP54XX_DPLL_EN_SHIFT 0
993#define OMAP54XX_DPLL_EN_WIDTH 0x3
994#define OMAP54XX_DPLL_EN_MASK (0x7 << 0) 56#define OMAP54XX_DPLL_EN_MASK (0x7 << 0)
995
996/*
997 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
998 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
999 */
1000#define OMAP54XX_DPLL_LPMODE_EN_SHIFT 10
1001#define OMAP54XX_DPLL_LPMODE_EN_WIDTH 0x1
1002#define OMAP54XX_DPLL_LPMODE_EN_MASK (1 << 10) 57#define OMAP54XX_DPLL_LPMODE_EN_MASK (1 << 10)
1003
1004/*
1005 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_IVA,
1006 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER
1007 */
1008#define OMAP54XX_DPLL_MULT_SHIFT 8
1009#define OMAP54XX_DPLL_MULT_WIDTH 0xb
1010#define OMAP54XX_DPLL_MULT_MASK (0x7ff << 8) 58#define OMAP54XX_DPLL_MULT_MASK (0x7ff << 8)
1011
1012/*
1013 * Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_UNIPRO1,
1014 * CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB
1015 */
1016#define OMAP54XX_DPLL_MULT_UNIPRO1_SHIFT 8
1017#define OMAP54XX_DPLL_MULT_UNIPRO1_WIDTH 0xc
1018#define OMAP54XX_DPLL_MULT_UNIPRO1_MASK (0xfff << 8)
1019
1020/*
1021 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
1022 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
1023 */
1024#define OMAP54XX_DPLL_REGM4XEN_SHIFT 11
1025#define OMAP54XX_DPLL_REGM4XEN_WIDTH 0x1
1026#define OMAP54XX_DPLL_REGM4XEN_MASK (1 << 11) 59#define OMAP54XX_DPLL_REGM4XEN_MASK (1 << 11)
1027
1028/* Used by CM_CLKSEL_DPLL_UNIPRO1, CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB */
1029#define OMAP54XX_DPLL_SD_DIV_SHIFT 24
1030#define OMAP54XX_DPLL_SD_DIV_WIDTH 0x8
1031#define OMAP54XX_DPLL_SD_DIV_MASK (0xff << 24) 60#define OMAP54XX_DPLL_SD_DIV_MASK (0xff << 24)
1032
1033/* Used by CM_CLKSEL_DPLL_UNIPRO1, CM_CLKSEL_DPLL_UNIPRO2, CM_CLKSEL_DPLL_USB */
1034#define OMAP54XX_DPLL_SELFREQDCO_SHIFT 21
1035#define OMAP54XX_DPLL_SELFREQDCO_WIDTH 0x1
1036#define OMAP54XX_DPLL_SELFREQDCO_MASK (1 << 21)
1037
1038/*
1039 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
1040 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO1,
1041 * CM_CLKMODE_DPLL_UNIPRO2, CM_CLKMODE_DPLL_USB
1042 */
1043#define OMAP54XX_DPLL_SSC_ACK_SHIFT 13
1044#define OMAP54XX_DPLL_SSC_ACK_WIDTH 0x1
1045#define OMAP54XX_DPLL_SSC_ACK_MASK (1 << 13)
1046
1047/*
1048 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
1049 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO1,
1050 * CM_CLKMODE_DPLL_UNIPRO2, CM_CLKMODE_DPLL_USB
1051 */
1052#define OMAP54XX_DPLL_SSC_DOWNSPREAD_SHIFT 14
1053#define OMAP54XX_DPLL_SSC_DOWNSPREAD_WIDTH 0x1
1054#define OMAP54XX_DPLL_SSC_DOWNSPREAD_MASK (1 << 14)
1055
1056/*
1057 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_IVA,
1058 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO1,
1059 * CM_CLKMODE_DPLL_UNIPRO2, CM_CLKMODE_DPLL_USB
1060 */
1061#define OMAP54XX_DPLL_SSC_EN_SHIFT 12
1062#define OMAP54XX_DPLL_SSC_EN_WIDTH 0x1
1063#define OMAP54XX_DPLL_SSC_EN_MASK (1 << 12)
1064
1065/* Used by CM_L4CFG_DYNAMICDEP */
1066#define OMAP54XX_DSP_DYNDEP_SHIFT 1
1067#define OMAP54XX_DSP_DYNDEP_WIDTH 0x1
1068#define OMAP54XX_DSP_DYNDEP_MASK (1 << 1)
1069
1070/* Used by CM_IPU_STATICDEP, CM_MPU_STATICDEP */
1071#define OMAP54XX_DSP_STATDEP_SHIFT 1 61#define OMAP54XX_DSP_STATDEP_SHIFT 1
1072#define OMAP54XX_DSP_STATDEP_WIDTH 0x1
1073#define OMAP54XX_DSP_STATDEP_MASK (1 << 1)
1074
1075/* Used by CM_L3MAIN2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1076#define OMAP54XX_DSS_DYNDEP_SHIFT 8
1077#define OMAP54XX_DSS_DYNDEP_WIDTH 0x1
1078#define OMAP54XX_DSS_DYNDEP_MASK (1 << 8)
1079
1080/* Used by CM_DMA_STATICDEP, CM_IPU_STATICDEP, CM_MPU_STATICDEP */
1081#define OMAP54XX_DSS_STATDEP_SHIFT 8 62#define OMAP54XX_DSS_STATDEP_SHIFT 8
1082#define OMAP54XX_DSS_STATDEP_WIDTH 0x1
1083#define OMAP54XX_DSS_STATDEP_MASK (1 << 8)
1084
1085/*
1086 * Used by CM_C2C_DYNAMICDEP, CM_L3MAIN1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
1087 * CM_MIPIEXT_DYNAMICDEP, CM_MPU_DYNAMICDEP
1088 */
1089#define OMAP54XX_EMIF_DYNDEP_SHIFT 4
1090#define OMAP54XX_EMIF_DYNDEP_WIDTH 0x1
1091#define OMAP54XX_EMIF_DYNDEP_MASK (1 << 4)
1092
1093/*
1094 * Used by CM_C2C_STATICDEP, CM_CAM_STATICDEP, CM_DMA_STATICDEP,
1095 * CM_DSP_STATICDEP, CM_DSS_STATICDEP, CM_GPU_STATICDEP, CM_IPU_STATICDEP,
1096 * CM_IVA_STATICDEP, CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP,
1097 * CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1098 */
1099#define OMAP54XX_EMIF_STATDEP_SHIFT 4 63#define OMAP54XX_EMIF_STATDEP_SHIFT 4
1100#define OMAP54XX_EMIF_STATDEP_WIDTH 0x1
1101#define OMAP54XX_EMIF_STATDEP_MASK (1 << 4)
1102
1103/* Used by CM_SHADOW_FREQ_CONFIG1 */
1104#define OMAP54XX_FREQ_UPDATE_SHIFT 0
1105#define OMAP54XX_FREQ_UPDATE_WIDTH 0x1
1106#define OMAP54XX_FREQ_UPDATE_MASK (1 << 0)
1107
1108/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
1109#define OMAP54XX_FUNC_SHIFT 16
1110#define OMAP54XX_FUNC_WIDTH 0xc
1111#define OMAP54XX_FUNC_MASK (0xfff << 16)
1112
1113/* Used by CM_SHADOW_FREQ_CONFIG2 */
1114#define OMAP54XX_GPMC_FREQ_UPDATE_SHIFT 0
1115#define OMAP54XX_GPMC_FREQ_UPDATE_WIDTH 0x1
1116#define OMAP54XX_GPMC_FREQ_UPDATE_MASK (1 << 0)
1117
1118/* Used by CM_L3MAIN2_DYNAMICDEP */
1119#define OMAP54XX_GPU_DYNDEP_SHIFT 10
1120#define OMAP54XX_GPU_DYNDEP_WIDTH 0x1
1121#define OMAP54XX_GPU_DYNDEP_MASK (1 << 10)
1122
1123/* Used by CM_IPU_STATICDEP, CM_MPU_STATICDEP */
1124#define OMAP54XX_GPU_STATDEP_SHIFT 10 64#define OMAP54XX_GPU_STATDEP_SHIFT 10
1125#define OMAP54XX_GPU_STATDEP_WIDTH 0x1
1126#define OMAP54XX_GPU_STATDEP_MASK (1 << 10)
1127
1128/*
1129 * Used by CM_ABE_AESS_CLKCTRL, CM_ABE_DMIC_CLKCTRL, CM_ABE_L4_ABE_CLKCTRL,
1130 * CM_ABE_MCASP_CLKCTRL, CM_ABE_MCBSP1_CLKCTRL, CM_ABE_MCBSP2_CLKCTRL,
1131 * CM_ABE_MCBSP3_CLKCTRL, CM_ABE_MCPDM_CLKCTRL, CM_ABE_SLIMBUS1_CLKCTRL,
1132 * CM_ABE_TIMER5_CLKCTRL, CM_ABE_TIMER6_CLKCTRL, CM_ABE_TIMER7_CLKCTRL,
1133 * CM_ABE_TIMER8_CLKCTRL, CM_ABE_WD_TIMER3_CLKCTRL, CM_C2C_C2C_CLKCTRL,
1134 * CM_C2C_C2C_OCP_FW_CLKCTRL, CM_C2C_MODEM_ICR_CLKCTRL, CM_CAM_CAL_CLKCTRL,
1135 * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CM_CORE_AON_PROFILING_CLKCTRL,
1136 * CM_CM_CORE_PROFILING_CLKCTRL, CM_COREAON_SMARTREFLEX_CORE_CLKCTRL,
1137 * CM_COREAON_SMARTREFLEX_MM_CLKCTRL, CM_COREAON_SMARTREFLEX_MPU_CLKCTRL,
1138 * CM_CUSTEFUSE_EFUSE_CTRL_CUST_CLKCTRL, CM_DMA_DMA_SYSTEM_CLKCTRL,
1139 * CM_DSP_DSP_CLKCTRL, CM_DSS_BB2D_CLKCTRL, CM_DSS_DSS_CLKCTRL,
1140 * CM_EMIF_DMM_CLKCTRL, CM_EMIF_EMIF1_CLKCTRL, CM_EMIF_EMIF2_CLKCTRL,
1141 * CM_EMIF_EMIF_OCP_FW_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL,
1142 * CM_EMU_MPU_EMU_DBG_CLKCTRL, CM_GPU_GPU_CLKCTRL, CM_IPU_IPU_CLKCTRL,
1143 * CM_IVA_IVA_CLKCTRL, CM_IVA_SL2_CLKCTRL, CM_L3INIT_HSI_CLKCTRL,
1144 * CM_L3INIT_IEEE1500_2_OCP_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
1145 * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_MPHY_UNIPRO2_CLKCTRL,
1146 * CM_L3INIT_OCP2SCP1_CLKCTRL, CM_L3INIT_OCP2SCP3_CLKCTRL,
1147 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_UNIPRO2_CLKCTRL,
1148 * CM_L3INIT_USB_HOST_HS_CLKCTRL, CM_L3INIT_USB_OTG_SS_CLKCTRL,
1149 * CM_L3INIT_USB_TLL_HS_CLKCTRL, CM_L3INSTR_CTRL_MODULE_BANDGAP_CLKCTRL,
1150 * CM_L3INSTR_DLL_AGING_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL,
1151 * CM_L3INSTR_L3_MAIN_3_CLKCTRL, CM_L3INSTR_OCP_WP_NOC_CLKCTRL,
1152 * CM_L3MAIN1_L3_MAIN_1_CLKCTRL, CM_L3MAIN2_GPMC_CLKCTRL,
1153 * CM_L3MAIN2_L3_MAIN_2_CLKCTRL, CM_L3MAIN2_OCMC_RAM_CLKCTRL,
1154 * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL,
1155 * CM_L4CFG_OCP2SCP2_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL,
1156 * CM_L4CFG_SPINLOCK_CLKCTRL, CM_L4PER_ELM_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL,
1157 * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL,
1158 * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO7_CLKCTRL, CM_L4PER_GPIO8_CLKCTRL,
1159 * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL,
1160 * CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL,
1161 * CM_L4PER_L4_PER_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL,
1162 * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MMC3_CLKCTRL,
1163 * CM_L4PER_MMC4_CLKCTRL, CM_L4PER_MMC5_CLKCTRL, CM_L4PER_TIMER10_CLKCTRL,
1164 * CM_L4PER_TIMER11_CLKCTRL, CM_L4PER_TIMER2_CLKCTRL, CM_L4PER_TIMER3_CLKCTRL,
1165 * CM_L4PER_TIMER4_CLKCTRL, CM_L4PER_TIMER9_CLKCTRL, CM_L4PER_UART1_CLKCTRL,
1166 * CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL,
1167 * CM_L4PER_UART5_CLKCTRL, CM_L4PER_UART6_CLKCTRL, CM_L4SEC_AES1_CLKCTRL,
1168 * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
1169 * CM_L4SEC_DMA_CRYPTO_CLKCTRL, CM_L4SEC_FPKA_CLKCTRL, CM_L4SEC_RNG_CLKCTRL,
1170 * CM_L4SEC_SHA2MD5_CLKCTRL, CM_MIPIEXT_LLI_CLKCTRL,
1171 * CM_MIPIEXT_LLI_OCP_FW_CLKCTRL, CM_MIPIEXT_MPHY_CLKCTRL, CM_MPU_MPU_CLKCTRL,
1172 * CM_MPU_MPU_MPU_DBG_CLKCTRL, CM_WKUPAON_COUNTER_32K_CLKCTRL,
1173 * CM_WKUPAON_GPIO1_CLKCTRL, CM_WKUPAON_KBD_CLKCTRL,
1174 * CM_WKUPAON_L4_WKUP_CLKCTRL, CM_WKUPAON_SAR_RAM_CLKCTRL,
1175 * CM_WKUPAON_TIMER12_CLKCTRL, CM_WKUPAON_TIMER1_CLKCTRL,
1176 * CM_WKUPAON_WD_TIMER1_CLKCTRL, CM_WKUPAON_WD_TIMER2_CLKCTRL
1177 */
1178#define OMAP54XX_IDLEST_SHIFT 16
1179#define OMAP54XX_IDLEST_WIDTH 0x2
1180#define OMAP54XX_IDLEST_MASK (0x3 << 16)
1181
1182/* Used by CM_L3MAIN2_DYNAMICDEP */
1183#define OMAP54XX_IPU_DYNDEP_SHIFT 0
1184#define OMAP54XX_IPU_DYNDEP_WIDTH 0x1
1185#define OMAP54XX_IPU_DYNDEP_MASK (1 << 0)
1186
1187/* Used by CM_DMA_STATICDEP, CM_MPU_STATICDEP */
1188#define OMAP54XX_IPU_STATDEP_SHIFT 0 65#define OMAP54XX_IPU_STATDEP_SHIFT 0
1189#define OMAP54XX_IPU_STATDEP_WIDTH 0x1
1190#define OMAP54XX_IPU_STATDEP_MASK (1 << 0)
1191
1192/* Used by CM_DSP_DYNAMICDEP, CM_L3MAIN2_DYNAMICDEP */
1193#define OMAP54XX_IVA_DYNDEP_SHIFT 2
1194#define OMAP54XX_IVA_DYNDEP_WIDTH 0x1
1195#define OMAP54XX_IVA_DYNDEP_MASK (1 << 2)
1196
1197/*
1198 * Used by CM_C2C_STATICDEP, CM_CAM_STATICDEP, CM_DMA_STATICDEP,
1199 * CM_DSP_STATICDEP, CM_DSS_STATICDEP, CM_GPU_STATICDEP, CM_IPU_STATICDEP,
1200 * CM_L3INIT_STATICDEP, CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1201 */
1202#define OMAP54XX_IVA_STATDEP_SHIFT 2 66#define OMAP54XX_IVA_STATDEP_SHIFT 2
1203#define OMAP54XX_IVA_STATDEP_WIDTH 0x1
1204#define OMAP54XX_IVA_STATDEP_MASK (1 << 2)
1205
1206/* Used by CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1207#define OMAP54XX_L3INIT_DYNDEP_SHIFT 7
1208#define OMAP54XX_L3INIT_DYNDEP_WIDTH 0x1
1209#define OMAP54XX_L3INIT_DYNDEP_MASK (1 << 7)
1210
1211/*
1212 * Used by CM_C2C_STATICDEP, CM_DMA_STATICDEP, CM_DSP_STATICDEP,
1213 * CM_IPU_STATICDEP, CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1214 */
1215#define OMAP54XX_L3INIT_STATDEP_SHIFT 7 67#define OMAP54XX_L3INIT_STATDEP_SHIFT 7
1216#define OMAP54XX_L3INIT_STATDEP_WIDTH 0x1
1217#define OMAP54XX_L3INIT_STATDEP_MASK (1 << 7)
1218
1219/*
1220 * Used by CM_DSP_DYNAMICDEP, CM_DSS_DYNAMICDEP, CM_L3INIT_DYNAMICDEP,
1221 * CM_L3MAIN2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_MPU_DYNAMICDEP
1222 */
1223#define OMAP54XX_L3MAIN1_DYNDEP_SHIFT 5
1224#define OMAP54XX_L3MAIN1_DYNDEP_WIDTH 0x1
1225#define OMAP54XX_L3MAIN1_DYNDEP_MASK (1 << 5)
1226
1227/*
1228 * Used by CM_C2C_STATICDEP, CM_CAM_STATICDEP, CM_DMA_STATICDEP,
1229 * CM_DSP_STATICDEP, CM_DSS_STATICDEP, CM_GPU_STATICDEP, CM_IPU_STATICDEP,
1230 * CM_IVA_STATICDEP, CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP,
1231 * CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1232 */
1233#define OMAP54XX_L3MAIN1_STATDEP_SHIFT 5 68#define OMAP54XX_L3MAIN1_STATDEP_SHIFT 5
1234#define OMAP54XX_L3MAIN1_STATDEP_WIDTH 0x1
1235#define OMAP54XX_L3MAIN1_STATDEP_MASK (1 << 5)
1236
1237/*
1238 * Used by CM_C2C_DYNAMICDEP, CM_CAM_DYNAMICDEP, CM_DMA_DYNAMICDEP,
1239 * CM_DSS_DYNAMICDEP, CM_EMU_DYNAMICDEP, CM_GPU_DYNAMICDEP, CM_IPU_DYNAMICDEP,
1240 * CM_IVA_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3MAIN1_DYNAMICDEP,
1241 * CM_L4CFG_DYNAMICDEP, CM_L4SEC_DYNAMICDEP, CM_MIPIEXT_DYNAMICDEP
1242 */
1243#define OMAP54XX_L3MAIN2_DYNDEP_SHIFT 6
1244#define OMAP54XX_L3MAIN2_DYNDEP_WIDTH 0x1
1245#define OMAP54XX_L3MAIN2_DYNDEP_MASK (1 << 6)
1246
1247/*
1248 * Used by CM_C2C_STATICDEP, CM_CAM_STATICDEP, CM_DMA_STATICDEP,
1249 * CM_DSP_STATICDEP, CM_DSS_STATICDEP, CM_GPU_STATICDEP, CM_IPU_STATICDEP,
1250 * CM_IVA_STATICDEP, CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP,
1251 * CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1252 */
1253#define OMAP54XX_L3MAIN2_STATDEP_SHIFT 6 69#define OMAP54XX_L3MAIN2_STATDEP_SHIFT 6
1254#define OMAP54XX_L3MAIN2_STATDEP_WIDTH 0x1
1255#define OMAP54XX_L3MAIN2_STATDEP_MASK (1 << 6)
1256
1257/* Used by CM_L3MAIN1_DYNAMICDEP */
1258#define OMAP54XX_L4CFG_DYNDEP_SHIFT 12
1259#define OMAP54XX_L4CFG_DYNDEP_WIDTH 0x1
1260#define OMAP54XX_L4CFG_DYNDEP_MASK (1 << 12)
1261
1262/*
1263 * Used by CM_C2C_STATICDEP, CM_DMA_STATICDEP, CM_DSP_STATICDEP,
1264 * CM_IPU_STATICDEP, CM_L3INIT_STATICDEP, CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1265 */
1266#define OMAP54XX_L4CFG_STATDEP_SHIFT 12 70#define OMAP54XX_L4CFG_STATDEP_SHIFT 12
1267#define OMAP54XX_L4CFG_STATDEP_WIDTH 0x1
1268#define OMAP54XX_L4CFG_STATDEP_MASK (1 << 12)
1269
1270/* Used by CM_L3MAIN2_DYNAMICDEP */
1271#define OMAP54XX_L4PER_DYNDEP_SHIFT 13
1272#define OMAP54XX_L4PER_DYNDEP_WIDTH 0x1
1273#define OMAP54XX_L4PER_DYNDEP_MASK (1 << 13)
1274
1275/*
1276 * Used by CM_C2C_STATICDEP, CM_DMA_STATICDEP, CM_DSP_STATICDEP,
1277 * CM_IPU_STATICDEP, CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP,
1278 * CM_MIPIEXT_STATICDEP, CM_MPU_STATICDEP
1279 */
1280#define OMAP54XX_L4PER_STATDEP_SHIFT 13 71#define OMAP54XX_L4PER_STATDEP_SHIFT 13
1281#define OMAP54XX_L4PER_STATDEP_WIDTH 0x1
1282#define OMAP54XX_L4PER_STATDEP_MASK (1 << 13)
1283
1284/* Used by CM_L3MAIN2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1285#define OMAP54XX_L4SEC_DYNDEP_SHIFT 14
1286#define OMAP54XX_L4SEC_DYNDEP_WIDTH 0x1
1287#define OMAP54XX_L4SEC_DYNDEP_MASK (1 << 14)
1288
1289/*
1290 * Used by CM_DMA_STATICDEP, CM_IPU_STATICDEP, CM_L3INIT_STATICDEP,
1291 * CM_MPU_STATICDEP
1292 */
1293#define OMAP54XX_L4SEC_STATDEP_SHIFT 14 72#define OMAP54XX_L4SEC_STATDEP_SHIFT 14
1294#define OMAP54XX_L4SEC_STATDEP_WIDTH 0x1
1295#define OMAP54XX_L4SEC_STATDEP_MASK (1 << 14)
1296
1297/* Used by CM_L3MAIN2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
1298#define OMAP54XX_MIPIEXT_DYNDEP_SHIFT 21
1299#define OMAP54XX_MIPIEXT_DYNDEP_WIDTH 0x1
1300#define OMAP54XX_MIPIEXT_DYNDEP_MASK (1 << 21)
1301
1302/* Used by CM_MPU_STATICDEP */
1303#define OMAP54XX_MIPIEXT_STATDEP_SHIFT 21
1304#define OMAP54XX_MIPIEXT_STATDEP_WIDTH 0x1
1305#define OMAP54XX_MIPIEXT_STATDEP_MASK (1 << 21)
1306
1307/*
1308 * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
1309 * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU,
1310 * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO1,
1311 * CM_SSC_MODFREQDIV_DPLL_UNIPRO2, CM_SSC_MODFREQDIV_DPLL_USB
1312 */
1313#define OMAP54XX_MODFREQDIV_EXPONENT_SHIFT 8
1314#define OMAP54XX_MODFREQDIV_EXPONENT_WIDTH 0x3
1315#define OMAP54XX_MODFREQDIV_EXPONENT_MASK (0x7 << 8)
1316
1317/*
1318 * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
1319 * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU,
1320 * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO1,
1321 * CM_SSC_MODFREQDIV_DPLL_UNIPRO2, CM_SSC_MODFREQDIV_DPLL_USB
1322 */
1323#define OMAP54XX_MODFREQDIV_MANTISSA_SHIFT 0
1324#define OMAP54XX_MODFREQDIV_MANTISSA_WIDTH 0x7
1325#define OMAP54XX_MODFREQDIV_MANTISSA_MASK (0x7f << 0)
1326
1327/*
1328 * Used by CM_ABE_AESS_CLKCTRL, CM_ABE_DMIC_CLKCTRL, CM_ABE_L4_ABE_CLKCTRL,
1329 * CM_ABE_MCASP_CLKCTRL, CM_ABE_MCBSP1_CLKCTRL, CM_ABE_MCBSP2_CLKCTRL,
1330 * CM_ABE_MCBSP3_CLKCTRL, CM_ABE_MCPDM_CLKCTRL, CM_ABE_SLIMBUS1_CLKCTRL,
1331 * CM_ABE_TIMER5_CLKCTRL, CM_ABE_TIMER6_CLKCTRL, CM_ABE_TIMER7_CLKCTRL,
1332 * CM_ABE_TIMER8_CLKCTRL, CM_ABE_WD_TIMER3_CLKCTRL, CM_C2C_C2C_CLKCTRL,
1333 * CM_C2C_C2C_OCP_FW_CLKCTRL, CM_C2C_MODEM_ICR_CLKCTRL, CM_CAM_CAL_CLKCTRL,
1334 * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CM_CORE_AON_PROFILING_CLKCTRL,
1335 * CM_CM_CORE_PROFILING_CLKCTRL, CM_COREAON_SMARTREFLEX_CORE_CLKCTRL,
1336 * CM_COREAON_SMARTREFLEX_MM_CLKCTRL, CM_COREAON_SMARTREFLEX_MPU_CLKCTRL,
1337 * CM_CUSTEFUSE_EFUSE_CTRL_CUST_CLKCTRL, CM_DMA_DMA_SYSTEM_CLKCTRL,
1338 * CM_DSP_DSP_CLKCTRL, CM_DSS_BB2D_CLKCTRL, CM_DSS_DSS_CLKCTRL,
1339 * CM_EMIF_DMM_CLKCTRL, CM_EMIF_EMIF1_CLKCTRL, CM_EMIF_EMIF2_CLKCTRL,
1340 * CM_EMIF_EMIF_OCP_FW_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL,
1341 * CM_EMU_MPU_EMU_DBG_CLKCTRL, CM_GPU_GPU_CLKCTRL, CM_IPU_IPU_CLKCTRL,
1342 * CM_IVA_IVA_CLKCTRL, CM_IVA_SL2_CLKCTRL, CM_L3INIT_HSI_CLKCTRL,
1343 * CM_L3INIT_IEEE1500_2_OCP_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
1344 * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_MPHY_UNIPRO2_CLKCTRL,
1345 * CM_L3INIT_OCP2SCP1_CLKCTRL, CM_L3INIT_OCP2SCP3_CLKCTRL,
1346 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_UNIPRO2_CLKCTRL,
1347 * CM_L3INIT_USB_HOST_HS_CLKCTRL, CM_L3INIT_USB_OTG_SS_CLKCTRL,
1348 * CM_L3INIT_USB_TLL_HS_CLKCTRL, CM_L3INSTR_CTRL_MODULE_BANDGAP_CLKCTRL,
1349 * CM_L3INSTR_DLL_AGING_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL,
1350 * CM_L3INSTR_L3_MAIN_3_CLKCTRL, CM_L3INSTR_OCP_WP_NOC_CLKCTRL,
1351 * CM_L3MAIN1_L3_MAIN_1_CLKCTRL, CM_L3MAIN2_GPMC_CLKCTRL,
1352 * CM_L3MAIN2_L3_MAIN_2_CLKCTRL, CM_L3MAIN2_OCMC_RAM_CLKCTRL,
1353 * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL,
1354 * CM_L4CFG_OCP2SCP2_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL,
1355 * CM_L4CFG_SPINLOCK_CLKCTRL, CM_L4PER_ELM_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL,
1356 * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL,
1357 * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO7_CLKCTRL, CM_L4PER_GPIO8_CLKCTRL,
1358 * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL,
1359 * CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL,
1360 * CM_L4PER_L4_PER_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL,
1361 * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MMC3_CLKCTRL,
1362 * CM_L4PER_MMC4_CLKCTRL, CM_L4PER_MMC5_CLKCTRL, CM_L4PER_TIMER10_CLKCTRL,
1363 * CM_L4PER_TIMER11_CLKCTRL, CM_L4PER_TIMER2_CLKCTRL, CM_L4PER_TIMER3_CLKCTRL,
1364 * CM_L4PER_TIMER4_CLKCTRL, CM_L4PER_TIMER9_CLKCTRL, CM_L4PER_UART1_CLKCTRL,
1365 * CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL,
1366 * CM_L4PER_UART5_CLKCTRL, CM_L4PER_UART6_CLKCTRL, CM_L4SEC_AES1_CLKCTRL,
1367 * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
1368 * CM_L4SEC_DMA_CRYPTO_CLKCTRL, CM_L4SEC_FPKA_CLKCTRL, CM_L4SEC_RNG_CLKCTRL,
1369 * CM_L4SEC_SHA2MD5_CLKCTRL, CM_MIPIEXT_LLI_CLKCTRL,
1370 * CM_MIPIEXT_LLI_OCP_FW_CLKCTRL, CM_MIPIEXT_MPHY_CLKCTRL, CM_MPU_MPU_CLKCTRL,
1371 * CM_MPU_MPU_MPU_DBG_CLKCTRL, CM_WKUPAON_COUNTER_32K_CLKCTRL,
1372 * CM_WKUPAON_GPIO1_CLKCTRL, CM_WKUPAON_KBD_CLKCTRL,
1373 * CM_WKUPAON_L4_WKUP_CLKCTRL, CM_WKUPAON_SAR_RAM_CLKCTRL,
1374 * CM_WKUPAON_TIMER12_CLKCTRL, CM_WKUPAON_TIMER1_CLKCTRL,
1375 * CM_WKUPAON_WD_TIMER1_CLKCTRL, CM_WKUPAON_WD_TIMER2_CLKCTRL
1376 */
1377#define OMAP54XX_MODULEMODE_SHIFT 0
1378#define OMAP54XX_MODULEMODE_WIDTH 0x2
1379#define OMAP54XX_MODULEMODE_MASK (0x3 << 0)
1380
1381/* Used by CM_L4CFG_DYNAMICDEP */
1382#define OMAP54XX_MPU_DYNDEP_SHIFT 19
1383#define OMAP54XX_MPU_DYNDEP_WIDTH 0x1
1384#define OMAP54XX_MPU_DYNDEP_MASK (1 << 19)
1385
1386/* Used by CM_DSS_DSS_CLKCTRL */
1387#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_SHIFT 11 73#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_SHIFT 11
1388#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_WIDTH 0x1
1389#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_MASK (1 << 11)
1390
1391/* Renamed from OPTFCLKEN_32KHZ_CLK Used by CM_L3INIT_MMC1_CLKCTRL */
1392#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_8_8_SHIFT 8 74#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_8_8_SHIFT 8
1393#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_8_8_WIDTH 0x1
1394#define OMAP54XX_OPTFCLKEN_32KHZ_CLK_8_8_MASK (1 << 8)
1395
1396/* Used by CM_DSS_DSS_CLKCTRL */
1397#define OMAP54XX_OPTFCLKEN_48MHZ_CLK_SHIFT 9 75#define OMAP54XX_OPTFCLKEN_48MHZ_CLK_SHIFT 9
1398#define OMAP54XX_OPTFCLKEN_48MHZ_CLK_WIDTH 0x1
1399#define OMAP54XX_OPTFCLKEN_48MHZ_CLK_MASK (1 << 9)
1400
1401/* Used by CM_COREAON_USB_PHY_CORE_CLKCTRL */
1402#define OMAP54XX_OPTFCLKEN_CLK32K_SHIFT 8 76#define OMAP54XX_OPTFCLKEN_CLK32K_SHIFT 8
1403#define OMAP54XX_OPTFCLKEN_CLK32K_WIDTH 0x1
1404#define OMAP54XX_OPTFCLKEN_CLK32K_MASK (1 << 8)
1405
1406/* Used by CM_CAM_ISS_CLKCTRL */
1407#define OMAP54XX_OPTFCLKEN_CTRLCLK_SHIFT 8 77#define OMAP54XX_OPTFCLKEN_CTRLCLK_SHIFT 8
1408#define OMAP54XX_OPTFCLKEN_CTRLCLK_WIDTH 0x1
1409#define OMAP54XX_OPTFCLKEN_CTRLCLK_MASK (1 << 8)
1410
1411/*
1412 * Used by CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL,
1413 * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL,
1414 * CM_L4PER_GPIO7_CLKCTRL, CM_L4PER_GPIO8_CLKCTRL, CM_WKUPAON_GPIO1_CLKCTRL
1415 */
1416#define OMAP54XX_OPTFCLKEN_DBCLK_SHIFT 8 78#define OMAP54XX_OPTFCLKEN_DBCLK_SHIFT 8
1417#define OMAP54XX_OPTFCLKEN_DBCLK_WIDTH 0x1
1418#define OMAP54XX_OPTFCLKEN_DBCLK_MASK (1 << 8)
1419
1420/* Used by CM_EMIF_EMIF_DLL_CLKCTRL */
1421#define OMAP54XX_OPTFCLKEN_DLL_CLK_SHIFT 8
1422#define OMAP54XX_OPTFCLKEN_DLL_CLK_WIDTH 0x1
1423#define OMAP54XX_OPTFCLKEN_DLL_CLK_MASK (1 << 8)
1424
1425/* Used by CM_DSS_DSS_CLKCTRL */
1426#define OMAP54XX_OPTFCLKEN_DSSCLK_SHIFT 8 79#define OMAP54XX_OPTFCLKEN_DSSCLK_SHIFT 8
1427#define OMAP54XX_OPTFCLKEN_DSSCLK_WIDTH 0x1
1428#define OMAP54XX_OPTFCLKEN_DSSCLK_MASK (1 << 8)
1429
1430/* Used by CM_ABE_SLIMBUS1_CLKCTRL */
1431#define OMAP54XX_OPTFCLKEN_FCLK0_SHIFT 8
1432#define OMAP54XX_OPTFCLKEN_FCLK0_WIDTH 0x1
1433#define OMAP54XX_OPTFCLKEN_FCLK0_MASK (1 << 8)
1434
1435/* Used by CM_ABE_SLIMBUS1_CLKCTRL */
1436#define OMAP54XX_OPTFCLKEN_FCLK1_SHIFT 9
1437#define OMAP54XX_OPTFCLKEN_FCLK1_WIDTH 0x1
1438#define OMAP54XX_OPTFCLKEN_FCLK1_MASK (1 << 9)
1439
1440/* Used by CM_ABE_SLIMBUS1_CLKCTRL */
1441#define OMAP54XX_OPTFCLKEN_FCLK2_SHIFT 10
1442#define OMAP54XX_OPTFCLKEN_FCLK2_WIDTH 0x1
1443#define OMAP54XX_OPTFCLKEN_FCLK2_MASK (1 << 10)
1444
1445/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1446#define OMAP54XX_OPTFCLKEN_FUNC48M_CLK_SHIFT 15
1447#define OMAP54XX_OPTFCLKEN_FUNC48M_CLK_WIDTH 0x1
1448#define OMAP54XX_OPTFCLKEN_FUNC48M_CLK_MASK (1 << 15)
1449
1450/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1451#define OMAP54XX_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13 80#define OMAP54XX_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13
1452#define OMAP54XX_OPTFCLKEN_HSIC480M_P1_CLK_WIDTH 0x1
1453#define OMAP54XX_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13)
1454
1455/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1456#define OMAP54XX_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14 81#define OMAP54XX_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14
1457#define OMAP54XX_OPTFCLKEN_HSIC480M_P2_CLK_WIDTH 0x1
1458#define OMAP54XX_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14)
1459
1460/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1461#define OMAP54XX_OPTFCLKEN_HSIC480M_P3_CLK_SHIFT 7 82#define OMAP54XX_OPTFCLKEN_HSIC480M_P3_CLK_SHIFT 7
1462#define OMAP54XX_OPTFCLKEN_HSIC480M_P3_CLK_WIDTH 0x1
1463#define OMAP54XX_OPTFCLKEN_HSIC480M_P3_CLK_MASK (1 << 7)
1464
1465/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1466#define OMAP54XX_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11 83#define OMAP54XX_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11
1467#define OMAP54XX_OPTFCLKEN_HSIC60M_P1_CLK_WIDTH 0x1
1468#define OMAP54XX_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11)
1469
1470/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1471#define OMAP54XX_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12 84#define OMAP54XX_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12
1472#define OMAP54XX_OPTFCLKEN_HSIC60M_P2_CLK_WIDTH 0x1
1473#define OMAP54XX_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12)
1474
1475/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1476#define OMAP54XX_OPTFCLKEN_HSIC60M_P3_CLK_SHIFT 6 85#define OMAP54XX_OPTFCLKEN_HSIC60M_P3_CLK_SHIFT 6
1477#define OMAP54XX_OPTFCLKEN_HSIC60M_P3_CLK_WIDTH 0x1
1478#define OMAP54XX_OPTFCLKEN_HSIC60M_P3_CLK_MASK (1 << 6)
1479
1480/* Used by CM_L3INIT_USB_OTG_SS_CLKCTRL */
1481#define OMAP54XX_OPTFCLKEN_REFCLK960M_SHIFT 8 86#define OMAP54XX_OPTFCLKEN_REFCLK960M_SHIFT 8
1482#define OMAP54XX_OPTFCLKEN_REFCLK960M_WIDTH 0x1
1483#define OMAP54XX_OPTFCLKEN_REFCLK960M_MASK (1 << 8)
1484
1485/* Used by CM_L3INIT_SATA_CLKCTRL */
1486#define OMAP54XX_OPTFCLKEN_REF_CLK_SHIFT 8 87#define OMAP54XX_OPTFCLKEN_REF_CLK_SHIFT 8
1487#define OMAP54XX_OPTFCLKEN_REF_CLK_WIDTH 0x1
1488#define OMAP54XX_OPTFCLKEN_REF_CLK_MASK (1 << 8)
1489
1490/* Used by CM_WKUPAON_SCRM_CLKCTRL */
1491#define OMAP54XX_OPTFCLKEN_SCRM_CORE_SHIFT 8
1492#define OMAP54XX_OPTFCLKEN_SCRM_CORE_WIDTH 0x1
1493#define OMAP54XX_OPTFCLKEN_SCRM_CORE_MASK (1 << 8)
1494
1495/* Used by CM_WKUPAON_SCRM_CLKCTRL */
1496#define OMAP54XX_OPTFCLKEN_SCRM_PER_SHIFT 9
1497#define OMAP54XX_OPTFCLKEN_SCRM_PER_WIDTH 0x1
1498#define OMAP54XX_OPTFCLKEN_SCRM_PER_MASK (1 << 9)
1499
1500/* Used by CM_ABE_SLIMBUS1_CLKCTRL */
1501#define OMAP54XX_OPTFCLKEN_SLIMBUS_CLK_SHIFT 11 88#define OMAP54XX_OPTFCLKEN_SLIMBUS_CLK_SHIFT 11
1502#define OMAP54XX_OPTFCLKEN_SLIMBUS_CLK_WIDTH 0x1
1503#define OMAP54XX_OPTFCLKEN_SLIMBUS_CLK_MASK (1 << 11)
1504
1505/* Used by CM_DSS_DSS_CLKCTRL */
1506#define OMAP54XX_OPTFCLKEN_SYS_CLK_SHIFT 10 89#define OMAP54XX_OPTFCLKEN_SYS_CLK_SHIFT 10
1507#define OMAP54XX_OPTFCLKEN_SYS_CLK_WIDTH 0x1
1508#define OMAP54XX_OPTFCLKEN_SYS_CLK_MASK (1 << 10)
1509
1510/* Used by CM_MIPIEXT_LLI_CLKCTRL */
1511#define OMAP54XX_OPTFCLKEN_TXPHY_CLK_SHIFT 8 90#define OMAP54XX_OPTFCLKEN_TXPHY_CLK_SHIFT 8
1512#define OMAP54XX_OPTFCLKEN_TXPHY_CLK_WIDTH 0x1
1513#define OMAP54XX_OPTFCLKEN_TXPHY_CLK_MASK (1 << 8)
1514
1515/* Used by CM_MIPIEXT_LLI_CLKCTRL */
1516#define OMAP54XX_OPTFCLKEN_TXPHY_LS_CLK_SHIFT 9 91#define OMAP54XX_OPTFCLKEN_TXPHY_LS_CLK_SHIFT 9
1517#define OMAP54XX_OPTFCLKEN_TXPHY_LS_CLK_WIDTH 0x1
1518#define OMAP54XX_OPTFCLKEN_TXPHY_LS_CLK_MASK (1 << 9)
1519
1520/* Used by CM_L3INIT_USB_TLL_HS_CLKCTRL */
1521#define OMAP54XX_OPTFCLKEN_USB_CH0_CLK_SHIFT 8 92#define OMAP54XX_OPTFCLKEN_USB_CH0_CLK_SHIFT 8
1522#define OMAP54XX_OPTFCLKEN_USB_CH0_CLK_WIDTH 0x1
1523#define OMAP54XX_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8)
1524
1525/* Used by CM_L3INIT_USB_TLL_HS_CLKCTRL */
1526#define OMAP54XX_OPTFCLKEN_USB_CH1_CLK_SHIFT 9 93#define OMAP54XX_OPTFCLKEN_USB_CH1_CLK_SHIFT 9
1527#define OMAP54XX_OPTFCLKEN_USB_CH1_CLK_WIDTH 0x1
1528#define OMAP54XX_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9)
1529
1530/* Used by CM_L3INIT_USB_TLL_HS_CLKCTRL */
1531#define OMAP54XX_OPTFCLKEN_USB_CH2_CLK_SHIFT 10 94#define OMAP54XX_OPTFCLKEN_USB_CH2_CLK_SHIFT 10
1532#define OMAP54XX_OPTFCLKEN_USB_CH2_CLK_WIDTH 0x1
1533#define OMAP54XX_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10)
1534
1535/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1536#define OMAP54XX_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8 95#define OMAP54XX_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8
1537#define OMAP54XX_OPTFCLKEN_UTMI_P1_CLK_WIDTH 0x1
1538#define OMAP54XX_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8)
1539
1540/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1541#define OMAP54XX_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9 96#define OMAP54XX_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9
1542#define OMAP54XX_OPTFCLKEN_UTMI_P2_CLK_WIDTH 0x1
1543#define OMAP54XX_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9)
1544
1545/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL */
1546#define OMAP54XX_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10 97#define OMAP54XX_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10
1547#define OMAP54XX_OPTFCLKEN_UTMI_P3_CLK_WIDTH 0x1
1548#define OMAP54XX_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10)
1549
1550/* Used by CM_CORE_AON_DEBUG_OUT, CM_CORE_DEBUG_OUT */
1551#define OMAP54XX_OUTPUT_SHIFT 0
1552#define OMAP54XX_OUTPUT_WIDTH 0x20
1553#define OMAP54XX_OUTPUT_MASK (0xffffffff << 0)
1554
1555/* Used by CM_CLKSEL_ABE */
1556#define OMAP54XX_PAD_CLKS_GATE_SHIFT 8 98#define OMAP54XX_PAD_CLKS_GATE_SHIFT 8
1557#define OMAP54XX_PAD_CLKS_GATE_WIDTH 0x1
1558#define OMAP54XX_PAD_CLKS_GATE_MASK (1 << 8)
1559
1560/* Used by CM_RESTORE_ST */
1561#define OMAP54XX_PHASE1_COMPLETED_SHIFT 0
1562#define OMAP54XX_PHASE1_COMPLETED_WIDTH 0x1
1563#define OMAP54XX_PHASE1_COMPLETED_MASK (1 << 0)
1564
1565/* Used by CM_RESTORE_ST */
1566#define OMAP54XX_PHASE2A_COMPLETED_SHIFT 1
1567#define OMAP54XX_PHASE2A_COMPLETED_WIDTH 0x1
1568#define OMAP54XX_PHASE2A_COMPLETED_MASK (1 << 1)
1569
1570/* Used by CM_RESTORE_ST */
1571#define OMAP54XX_PHASE2B_COMPLETED_SHIFT 2
1572#define OMAP54XX_PHASE2B_COMPLETED_WIDTH 0x1
1573#define OMAP54XX_PHASE2B_COMPLETED_MASK (1 << 2)
1574
1575/* Used by CM_DYN_DEP_PRESCAL */
1576#define OMAP54XX_PRESCAL_SHIFT 0
1577#define OMAP54XX_PRESCAL_WIDTH 0x6
1578#define OMAP54XX_PRESCAL_MASK (0x3f << 0)
1579
1580/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
1581#define OMAP54XX_R_RTL_SHIFT 11
1582#define OMAP54XX_R_RTL_WIDTH 0x5
1583#define OMAP54XX_R_RTL_MASK (0x1f << 11)
1584
1585/* Used by CM_L3INIT_USB_HOST_HS_CLKCTRL, CM_L3INIT_USB_TLL_HS_CLKCTRL */
1586#define OMAP54XX_SAR_MODE_SHIFT 4
1587#define OMAP54XX_SAR_MODE_WIDTH 0x1
1588#define OMAP54XX_SAR_MODE_MASK (1 << 4)
1589
1590/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
1591#define OMAP54XX_SCHEME_SHIFT 30
1592#define OMAP54XX_SCHEME_WIDTH 0x2
1593#define OMAP54XX_SCHEME_MASK (0x3 << 30)
1594
1595/* Used by CM_L4CFG_DYNAMICDEP */
1596#define OMAP54XX_SDMA_DYNDEP_SHIFT 11
1597#define OMAP54XX_SDMA_DYNDEP_WIDTH 0x1
1598#define OMAP54XX_SDMA_DYNDEP_MASK (1 << 11)
1599
1600/* Used by CM_IPU_STATICDEP, CM_MPU_STATICDEP */
1601#define OMAP54XX_SDMA_STATDEP_SHIFT 11
1602#define OMAP54XX_SDMA_STATDEP_WIDTH 0x1
1603#define OMAP54XX_SDMA_STATDEP_MASK (1 << 11)
1604
1605/* Used by CM_CORE_AON_DEBUG_CFG */
1606#define OMAP54XX_SEL0_SHIFT 0
1607#define OMAP54XX_SEL0_WIDTH 0x7
1608#define OMAP54XX_SEL0_MASK (0x7f << 0)
1609
1610/* Renamed from SEL0 Used by CM_CORE_DEBUG_CFG */
1611#define OMAP54XX_SEL0_0_7_SHIFT 0
1612#define OMAP54XX_SEL0_0_7_WIDTH 0x8
1613#define OMAP54XX_SEL0_0_7_MASK (0xff << 0)
1614
1615/* Used by CM_CORE_AON_DEBUG_CFG */
1616#define OMAP54XX_SEL1_SHIFT 8
1617#define OMAP54XX_SEL1_WIDTH 0x7
1618#define OMAP54XX_SEL1_MASK (0x7f << 8)
1619
1620/* Renamed from SEL1 Used by CM_CORE_DEBUG_CFG */
1621#define OMAP54XX_SEL1_CORE_DEBUG_CFG_SHIFT 8
1622#define OMAP54XX_SEL1_CORE_DEBUG_CFG_WIDTH 0x8
1623#define OMAP54XX_SEL1_CORE_DEBUG_CFG_MASK (0xff << 8)
1624
1625/* Used by CM_CORE_AON_DEBUG_CFG */
1626#define OMAP54XX_SEL2_SHIFT 16
1627#define OMAP54XX_SEL2_WIDTH 0x7
1628#define OMAP54XX_SEL2_MASK (0x7f << 16)
1629
1630/* Renamed from SEL2 Used by CM_CORE_DEBUG_CFG */
1631#define OMAP54XX_SEL2_CORE_DEBUG_CFG_SHIFT 16
1632#define OMAP54XX_SEL2_CORE_DEBUG_CFG_WIDTH 0x8
1633#define OMAP54XX_SEL2_CORE_DEBUG_CFG_MASK (0xff << 16)
1634
1635/* Used by CM_CORE_AON_DEBUG_CFG */
1636#define OMAP54XX_SEL3_SHIFT 24
1637#define OMAP54XX_SEL3_WIDTH 0x7
1638#define OMAP54XX_SEL3_MASK (0x7f << 24)
1639
1640/* Renamed from SEL3 Used by CM_CORE_DEBUG_CFG */
1641#define OMAP54XX_SEL3_CORE_DEBUG_CFG_SHIFT 24
1642#define OMAP54XX_SEL3_CORE_DEBUG_CFG_WIDTH 0x8
1643#define OMAP54XX_SEL3_CORE_DEBUG_CFG_MASK (0xff << 24)
1644
1645/* Used by CM_CLKSEL_ABE */
1646#define OMAP54XX_SLIMBUS1_CLK_GATE_SHIFT 10 99#define OMAP54XX_SLIMBUS1_CLK_GATE_SHIFT 10
1647#define OMAP54XX_SLIMBUS1_CLK_GATE_WIDTH 0x1
1648#define OMAP54XX_SLIMBUS1_CLK_GATE_MASK (1 << 10)
1649
1650/*
1651 * Used by CM_ABE_AESS_CLKCTRL, CM_C2C_C2C_CLKCTRL, CM_CAM_FDIF_CLKCTRL,
1652 * CM_CAM_ISS_CLKCTRL, CM_DMA_DMA_SYSTEM_CLKCTRL, CM_DSP_DSP_CLKCTRL,
1653 * CM_DSS_BB2D_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL,
1654 * CM_GPU_GPU_CLKCTRL, CM_IPU_IPU_CLKCTRL, CM_IVA_IVA_CLKCTRL,
1655 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_IEEE1500_2_OCP_CLKCTRL,
1656 * CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_SATA_CLKCTRL,
1657 * CM_L3INIT_UNIPRO2_CLKCTRL, CM_L3INIT_USB_HOST_HS_CLKCTRL,
1658 * CM_L3INIT_USB_OTG_SS_CLKCTRL, CM_L4SEC_DMA_CRYPTO_CLKCTRL,
1659 * CM_MIPIEXT_LLI_CLKCTRL, CM_MPU_MPU_CLKCTRL
1660 */
1661#define OMAP54XX_STBYST_SHIFT 18
1662#define OMAP54XX_STBYST_WIDTH 0x1
1663#define OMAP54XX_STBYST_MASK (1 << 18)
1664
1665/*
1666 * Used by CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_IVA,
1667 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER, CM_IDLEST_DPLL_UNIPRO1,
1668 * CM_IDLEST_DPLL_UNIPRO2, CM_IDLEST_DPLL_USB
1669 */
1670#define OMAP54XX_ST_DPLL_CLK_SHIFT 0
1671#define OMAP54XX_ST_DPLL_CLK_WIDTH 0x1
1672#define OMAP54XX_ST_DPLL_CLK_MASK (1 << 0) 100#define OMAP54XX_ST_DPLL_CLK_MASK (1 << 0)
1673
1674/*
1675 * Used by CM_CLKDCOLDO_DPLL_UNIPRO1, CM_CLKDCOLDO_DPLL_UNIPRO2,
1676 * CM_CLKDCOLDO_DPLL_USB
1677 */
1678#define OMAP54XX_ST_DPLL_CLKDCOLDO_SHIFT 9
1679#define OMAP54XX_ST_DPLL_CLKDCOLDO_WIDTH 0x1
1680#define OMAP54XX_ST_DPLL_CLKDCOLDO_MASK (1 << 9)
1681
1682/*
1683 * Used by CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_IVA,
1684 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER, CM_IDLEST_DPLL_UNIPRO1,
1685 * CM_IDLEST_DPLL_UNIPRO2, CM_IDLEST_DPLL_USB
1686 */
1687#define OMAP54XX_ST_DPLL_INIT_SHIFT 4
1688#define OMAP54XX_ST_DPLL_INIT_WIDTH 0x1
1689#define OMAP54XX_ST_DPLL_INIT_MASK (1 << 4)
1690
1691/*
1692 * Used by CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_IVA,
1693 * CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER, CM_IDLEST_DPLL_UNIPRO1,
1694 * CM_IDLEST_DPLL_UNIPRO2, CM_IDLEST_DPLL_USB
1695 */
1696#define OMAP54XX_ST_DPLL_MODE_SHIFT 1
1697#define OMAP54XX_ST_DPLL_MODE_WIDTH 0x3
1698#define OMAP54XX_ST_DPLL_MODE_MASK (0x7 << 1)
1699
1700/* Used by CM_CLKSEL_SYS */
1701#define OMAP54XX_SYS_CLKSEL_SHIFT 0 101#define OMAP54XX_SYS_CLKSEL_SHIFT 0
1702#define OMAP54XX_SYS_CLKSEL_WIDTH 0x3 102#define OMAP54XX_SYS_CLKSEL_WIDTH 0x3
1703#define OMAP54XX_SYS_CLKSEL_MASK (0x7 << 0)
1704
1705/*
1706 * Used by CM_C2C_DYNAMICDEP, CM_DSP_DYNAMICDEP, CM_EMU_DYNAMICDEP,
1707 * CM_IPU_DYNAMICDEP, CM_L3MAIN1_DYNAMICDEP, CM_L3MAIN2_DYNAMICDEP,
1708 * CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP, CM_MIPIEXT_DYNAMICDEP,
1709 * CM_MPU_DYNAMICDEP
1710 */
1711#define OMAP54XX_WINDOWSIZE_SHIFT 24
1712#define OMAP54XX_WINDOWSIZE_WIDTH 0x4
1713#define OMAP54XX_WINDOWSIZE_MASK (0xf << 24)
1714
1715/* Used by CM_L3MAIN1_DYNAMICDEP */
1716#define OMAP54XX_WKUPAON_DYNDEP_SHIFT 15
1717#define OMAP54XX_WKUPAON_DYNDEP_WIDTH 0x1
1718#define OMAP54XX_WKUPAON_DYNDEP_MASK (1 << 15)
1719
1720/*
1721 * Used by CM_DMA_STATICDEP, CM_DSP_STATICDEP, CM_IPU_STATICDEP,
1722 * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP
1723 */
1724#define OMAP54XX_WKUPAON_STATDEP_SHIFT 15 103#define OMAP54XX_WKUPAON_STATDEP_SHIFT 15
1725#define OMAP54XX_WKUPAON_STATDEP_WIDTH 0x1
1726#define OMAP54XX_WKUPAON_STATDEP_MASK (1 << 15)
1727
1728/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
1729#define OMAP54XX_X_MAJOR_SHIFT 8
1730#define OMAP54XX_X_MAJOR_WIDTH 0x3
1731#define OMAP54XX_X_MAJOR_MASK (0x7 << 8)
1732
1733/* Used by REVISION_CM_CORE, REVISION_CM_CORE_AON */
1734#define OMAP54XX_Y_MINOR_SHIFT 0
1735#define OMAP54XX_Y_MINOR_WIDTH 0x6
1736#define OMAP54XX_Y_MINOR_MASK (0x3f << 0)
1737#endif 104#endif
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
index 3c70f5c1860f..b4d04748576b 100644
--- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c
@@ -32,7 +32,6 @@
32#include "cm1_54xx.h" 32#include "cm1_54xx.h"
33#include "cm2_54xx.h" 33#include "cm2_54xx.h"
34#include "prm54xx.h" 34#include "prm54xx.h"
35#include "prm-regbits-54xx.h"
36#include "i2c.h" 35#include "i2c.h"
37#include "mmc.h" 36#include "mmc.h"
38#include "wd_timer.h" 37#include "wd_timer.h"
diff --git a/arch/arm/mach-omap2/powerdomains54xx_data.c b/arch/arm/mach-omap2/powerdomains54xx_data.c
index 81f8a7cc26ee..ce1d752af991 100644
--- a/arch/arm/mach-omap2/powerdomains54xx_data.c
+++ b/arch/arm/mach-omap2/powerdomains54xx_data.c
@@ -25,7 +25,6 @@
25 25
26#include "prcm-common.h" 26#include "prcm-common.h"
27#include "prcm44xx.h" 27#include "prcm44xx.h"
28#include "prm-regbits-54xx.h"
29#include "prm54xx.h" 28#include "prm54xx.h"
30#include "prcm_mpu54xx.h" 29#include "prcm_mpu54xx.h"
31 30
diff --git a/arch/arm/mach-omap2/prm-regbits-24xx.h b/arch/arm/mach-omap2/prm-regbits-24xx.h
index 91aa5106d637..37fc905c9636 100644
--- a/arch/arm/mach-omap2/prm-regbits-24xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-24xx.h
@@ -16,274 +16,27 @@
16 16
17#include "prm2xxx.h" 17#include "prm2xxx.h"
18 18
19/* Bits shared between registers */
20
21/* PRCM_IRQSTATUS_MPU, PM_IRQSTATUS_DSP, PRCM_IRQSTATUS_IVA shared bits */
22#define OMAP24XX_VOLTTRANS_ST_MASK (1 << 2)
23#define OMAP24XX_WKUP2_ST_MASK (1 << 1)
24#define OMAP24XX_WKUP1_ST_MASK (1 << 0)
25
26/* PRCM_IRQENABLE_MPU, PM_IRQENABLE_DSP, PRCM_IRQENABLE_IVA shared bits */
27#define OMAP24XX_VOLTTRANS_EN_MASK (1 << 2)
28#define OMAP24XX_WKUP2_EN_MASK (1 << 1)
29#define OMAP24XX_WKUP1_EN_MASK (1 << 0)
30
31/* PM_WKDEP_GFX, PM_WKDEP_MPU, PM_WKDEP_DSP, PM_WKDEP_MDM shared bits */
32#define OMAP24XX_EN_MPU_SHIFT 1
33#define OMAP24XX_EN_MPU_MASK (1 << 1)
34#define OMAP24XX_EN_CORE_SHIFT 0 19#define OMAP24XX_EN_CORE_SHIFT 0
35#define OMAP24XX_EN_CORE_MASK (1 << 0)
36
37/*
38 * PM_PWSTCTRL_MPU, PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSP, PM_PWSTCTRL_MDM
39 * shared bits
40 */
41#define OMAP24XX_MEMONSTATE_SHIFT 10
42#define OMAP24XX_MEMONSTATE_MASK (0x3 << 10)
43#define OMAP24XX_MEMRETSTATE_MASK (1 << 3)
44
45/* PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSP, PM_PWSTCTRL_MDM shared bits */
46#define OMAP24XX_FORCESTATE_MASK (1 << 18) 20#define OMAP24XX_FORCESTATE_MASK (1 << 18)
47
48/*
49 * PM_PWSTST_CORE, PM_PWSTST_GFX, PM_PWSTST_MPU, PM_PWSTST_DSP,
50 * PM_PWSTST_MDM shared bits
51 */
52#define OMAP24XX_CLKACTIVITY_MASK (1 << 19)
53
54/* PM_PWSTST_MPU, PM_PWSTST_CORE, PM_PWSTST_DSP shared bits */
55#define OMAP24XX_LASTSTATEENTERED_SHIFT 4
56#define OMAP24XX_LASTSTATEENTERED_MASK (0x3 << 4)
57
58/* PM_PWSTST_MPU and PM_PWSTST_DSP shared bits */
59#define OMAP2430_MEMSTATEST_SHIFT 10
60#define OMAP2430_MEMSTATEST_MASK (0x3 << 10)
61
62/* PM_PWSTST_GFX, PM_PWSTST_DSP, PM_PWSTST_MDM shared bits */
63#define OMAP24XX_POWERSTATEST_SHIFT 0
64#define OMAP24XX_POWERSTATEST_MASK (0x3 << 0)
65
66
67/* Bits specific to each register */
68
69/* PRCM_REVISION */
70#define OMAP24XX_REV_SHIFT 0
71#define OMAP24XX_REV_MASK (0xff << 0)
72
73/* PRCM_SYSCONFIG */
74#define OMAP24XX_AUTOIDLE_MASK (1 << 0) 21#define OMAP24XX_AUTOIDLE_MASK (1 << 0)
75
76/* PRCM_IRQSTATUS_MPU specific bits */
77#define OMAP2430_DPLL_RECAL_ST_MASK (1 << 6)
78#define OMAP24XX_TRANSITION_ST_MASK (1 << 5)
79#define OMAP24XX_EVGENOFF_ST_MASK (1 << 4)
80#define OMAP24XX_EVGENON_ST_MASK (1 << 3)
81
82/* PRCM_IRQENABLE_MPU specific bits */
83#define OMAP2430_DPLL_RECAL_EN_MASK (1 << 6)
84#define OMAP24XX_TRANSITION_EN_MASK (1 << 5)
85#define OMAP24XX_EVGENOFF_EN_MASK (1 << 4)
86#define OMAP24XX_EVGENON_EN_MASK (1 << 3)
87
88/* PRCM_VOLTCTRL */
89#define OMAP24XX_AUTO_EXTVOLT_MASK (1 << 15) 22#define OMAP24XX_AUTO_EXTVOLT_MASK (1 << 15)
90#define OMAP24XX_FORCE_EXTVOLT_MASK (1 << 14)
91#define OMAP24XX_SETOFF_LEVEL_SHIFT 12 23#define OMAP24XX_SETOFF_LEVEL_SHIFT 12
92#define OMAP24XX_SETOFF_LEVEL_MASK (0x3 << 12)
93#define OMAP24XX_MEMRETCTRL_MASK (1 << 8) 24#define OMAP24XX_MEMRETCTRL_MASK (1 << 8)
94#define OMAP24XX_SETRET_LEVEL_SHIFT 6 25#define OMAP24XX_SETRET_LEVEL_SHIFT 6
95#define OMAP24XX_SETRET_LEVEL_MASK (0x3 << 6)
96#define OMAP24XX_VOLT_LEVEL_SHIFT 0 26#define OMAP24XX_VOLT_LEVEL_SHIFT 0
97#define OMAP24XX_VOLT_LEVEL_MASK (0x3 << 0)
98
99/* PRCM_VOLTST */
100#define OMAP24XX_ST_VOLTLEVEL_SHIFT 0
101#define OMAP24XX_ST_VOLTLEVEL_MASK (0x3 << 0)
102
103/* PRCM_CLKSRC_CTRL specific bits */
104
105/* PRCM_CLKOUT_CTRL */
106#define OMAP2420_CLKOUT2_EN_SHIFT 15 27#define OMAP2420_CLKOUT2_EN_SHIFT 15
107#define OMAP2420_CLKOUT2_EN_MASK (1 << 15)
108#define OMAP2420_CLKOUT2_DIV_SHIFT 11 28#define OMAP2420_CLKOUT2_DIV_SHIFT 11
109#define OMAP2420_CLKOUT2_DIV_MASK (0x7 << 11)
110#define OMAP2420_CLKOUT2_DIV_WIDTH 3 29#define OMAP2420_CLKOUT2_DIV_WIDTH 3
111#define OMAP2420_CLKOUT2_SOURCE_SHIFT 8
112#define OMAP2420_CLKOUT2_SOURCE_MASK (0x3 << 8) 30#define OMAP2420_CLKOUT2_SOURCE_MASK (0x3 << 8)
113#define OMAP24XX_CLKOUT_EN_SHIFT 7 31#define OMAP24XX_CLKOUT_EN_SHIFT 7
114#define OMAP24XX_CLKOUT_EN_MASK (1 << 7)
115#define OMAP24XX_CLKOUT_DIV_SHIFT 3 32#define OMAP24XX_CLKOUT_DIV_SHIFT 3
116#define OMAP24XX_CLKOUT_DIV_MASK (0x7 << 3)
117#define OMAP24XX_CLKOUT_DIV_WIDTH 3 33#define OMAP24XX_CLKOUT_DIV_WIDTH 3
118#define OMAP24XX_CLKOUT_SOURCE_SHIFT 0
119#define OMAP24XX_CLKOUT_SOURCE_MASK (0x3 << 0) 34#define OMAP24XX_CLKOUT_SOURCE_MASK (0x3 << 0)
120
121/* PRCM_CLKEMUL_CTRL */
122#define OMAP24XX_EMULATION_EN_SHIFT 0 35#define OMAP24XX_EMULATION_EN_SHIFT 0
123#define OMAP24XX_EMULATION_EN_MASK (1 << 0)
124
125/* PRCM_CLKCFG_CTRL */
126#define OMAP24XX_VALID_CONFIG_MASK (1 << 0)
127
128/* PRCM_CLKCFG_STATUS */
129#define OMAP24XX_CONFIG_STATUS_MASK (1 << 0)
130
131/* PRCM_VOLTSETUP specific bits */
132
133/* PRCM_CLKSSETUP specific bits */
134
135/* PRCM_POLCTRL */
136#define OMAP2420_CLKOUT2_POL_MASK (1 << 10)
137#define OMAP24XX_CLKOUT_POL_MASK (1 << 9)
138#define OMAP24XX_CLKREQ_POL_MASK (1 << 8)
139#define OMAP2430_USE_POWEROK_MASK (1 << 2)
140#define OMAP2430_POWEROK_POL_MASK (1 << 1)
141#define OMAP24XX_EXTVOL_POL_MASK (1 << 0)
142
143/* RM_RSTST_MPU specific bits */
144/* 2430 calls GLOBALWMPU_RST "GLOBALWARM_RST" instead */
145
146/* PM_WKDEP_MPU specific bits */
147#define OMAP2430_PM_WKDEP_MPU_EN_MDM_SHIFT 5 36#define OMAP2430_PM_WKDEP_MPU_EN_MDM_SHIFT 5
148#define OMAP2430_PM_WKDEP_MPU_EN_MDM_MASK (1 << 5)
149#define OMAP24XX_PM_WKDEP_MPU_EN_DSP_SHIFT 2 37#define OMAP24XX_PM_WKDEP_MPU_EN_DSP_SHIFT 2
150#define OMAP24XX_PM_WKDEP_MPU_EN_DSP_MASK (1 << 2)
151
152/* PM_EVGENCTRL_MPU specific bits */
153
154/* PM_EVEGENONTIM_MPU specific bits */
155
156/* PM_EVEGENOFFTIM_MPU specific bits */
157
158/* PM_PWSTCTRL_MPU specific bits */
159#define OMAP2430_FORCESTATE_MASK (1 << 18)
160
161/* PM_PWSTST_MPU specific bits */
162/* INTRANSITION, CLKACTIVITY, POWERSTATE, MEMSTATEST are 2430 only */
163
164/* PM_WKEN1_CORE specific bits */
165
166/* PM_WKEN2_CORE specific bits */
167
168/* PM_WKST1_CORE specific bits*/
169
170/* PM_WKST2_CORE specific bits */
171
172/* PM_WKDEP_CORE specific bits*/
173#define OMAP2430_PM_WKDEP_CORE_EN_MDM_MASK (1 << 5)
174#define OMAP24XX_PM_WKDEP_CORE_EN_GFX_MASK (1 << 3)
175#define OMAP24XX_PM_WKDEP_CORE_EN_DSP_MASK (1 << 2)
176
177/* PM_PWSTCTRL_CORE specific bits */
178#define OMAP24XX_MEMORYCHANGE_MASK (1 << 20)
179#define OMAP24XX_MEM3ONSTATE_SHIFT 14
180#define OMAP24XX_MEM3ONSTATE_MASK (0x3 << 14)
181#define OMAP24XX_MEM2ONSTATE_SHIFT 12
182#define OMAP24XX_MEM2ONSTATE_MASK (0x3 << 12)
183#define OMAP24XX_MEM1ONSTATE_SHIFT 10
184#define OMAP24XX_MEM1ONSTATE_MASK (0x3 << 10)
185#define OMAP24XX_MEM3RETSTATE_MASK (1 << 5)
186#define OMAP24XX_MEM2RETSTATE_MASK (1 << 4)
187#define OMAP24XX_MEM1RETSTATE_MASK (1 << 3)
188
189/* PM_PWSTST_CORE specific bits */
190#define OMAP24XX_MEM3STATEST_SHIFT 14
191#define OMAP24XX_MEM3STATEST_MASK (0x3 << 14)
192#define OMAP24XX_MEM2STATEST_SHIFT 12
193#define OMAP24XX_MEM2STATEST_MASK (0x3 << 12)
194#define OMAP24XX_MEM1STATEST_SHIFT 10
195#define OMAP24XX_MEM1STATEST_MASK (0x3 << 10)
196
197/* RM_RSTCTRL_GFX */
198#define OMAP24XX_GFX_RST_MASK (1 << 0)
199
200/* RM_RSTST_GFX specific bits */
201#define OMAP24XX_GFX_SW_RST_MASK (1 << 4)
202
203/* PM_PWSTCTRL_GFX specific bits */
204
205/* PM_WKDEP_GFX specific bits */
206/* 2430 often calls EN_WAKEUP "EN_WKUP" */
207
208/* RM_RSTCTRL_WKUP specific bits */
209
210/* RM_RSTTIME_WKUP specific bits */
211
212/* RM_RSTST_WKUP specific bits */
213/* 2430 calls EXTWMPU_RST "EXTWARM_RST" and GLOBALWMPU_RST "GLOBALWARM_RST" */
214#define OMAP24XX_EXTWMPU_RST_SHIFT 6 38#define OMAP24XX_EXTWMPU_RST_SHIFT 6
215#define OMAP24XX_EXTWMPU_RST_MASK (1 << 6)
216#define OMAP24XX_SECU_WD_RST_SHIFT 5 39#define OMAP24XX_SECU_WD_RST_SHIFT 5
217#define OMAP24XX_SECU_WD_RST_MASK (1 << 5)
218#define OMAP24XX_MPU_WD_RST_SHIFT 4 40#define OMAP24XX_MPU_WD_RST_SHIFT 4
219#define OMAP24XX_MPU_WD_RST_MASK (1 << 4)
220#define OMAP24XX_SECU_VIOL_RST_SHIFT 3 41#define OMAP24XX_SECU_VIOL_RST_SHIFT 3
221#define OMAP24XX_SECU_VIOL_RST_MASK (1 << 3)
222
223/* PM_WKEN_WKUP specific bits */
224
225/* PM_WKST_WKUP specific bits */
226
227/* RM_RSTCTRL_DSP */
228#define OMAP2420_RST_IVA_MASK (1 << 8)
229#define OMAP24XX_RST2_DSP_MASK (1 << 1)
230#define OMAP24XX_RST1_DSP_MASK (1 << 0)
231
232/* RM_RSTST_DSP specific bits */
233/* 2430 calls GLOBALWMPU_RST "GLOBALWARM_RST" */
234#define OMAP2420_IVA_SW_RST_MASK (1 << 8)
235#define OMAP24XX_DSP_SW_RST2_MASK (1 << 5)
236#define OMAP24XX_DSP_SW_RST1_MASK (1 << 4)
237
238/* PM_WKDEP_DSP specific bits */
239
240/* PM_PWSTCTRL_DSP specific bits */
241/* 2430 only: MEMONSTATE, MEMRETSTATE */
242#define OMAP2420_MEMIONSTATE_SHIFT 12
243#define OMAP2420_MEMIONSTATE_MASK (0x3 << 12)
244#define OMAP2420_MEMIRETSTATE_MASK (1 << 4)
245
246/* PM_PWSTST_DSP specific bits */
247/* MEMSTATEST is 2430 only */
248#define OMAP2420_MEMISTATEST_SHIFT 12
249#define OMAP2420_MEMISTATEST_MASK (0x3 << 12)
250
251/* PRCM_IRQSTATUS_DSP specific bits */
252
253/* PRCM_IRQENABLE_DSP specific bits */
254
255/* RM_RSTCTRL_MDM */
256/* 2430 only */
257#define OMAP2430_PWRON1_MDM_MASK (1 << 1)
258#define OMAP2430_RST1_MDM_MASK (1 << 0)
259
260/* RM_RSTST_MDM specific bits */
261/* 2430 only */
262#define OMAP2430_MDM_SECU_VIOL_MASK (1 << 6)
263#define OMAP2430_MDM_SW_PWRON1_MASK (1 << 5)
264#define OMAP2430_MDM_SW_RST1_MASK (1 << 4)
265
266/* PM_WKEN_MDM */
267/* 2430 only */
268#define OMAP2430_PM_WKEN_MDM_EN_MDM_MASK (1 << 0)
269
270/* PM_WKST_MDM specific bits */
271/* 2430 only */
272
273/* PM_WKDEP_MDM specific bits */
274/* 2430 only */
275
276/* PM_PWSTCTRL_MDM specific bits */
277/* 2430 only */
278#define OMAP2430_KILLDOMAINWKUP_MASK (1 << 19)
279
280/* PM_PWSTST_MDM specific bits */
281/* 2430 only */
282
283/* PRCM_IRQSTATUS_IVA */
284/* 2420 only */
285
286/* PRCM_IRQENABLE_IVA */
287/* 2420 only */
288
289#endif 42#endif
diff --git a/arch/arm/mach-omap2/prm-regbits-33xx.h b/arch/arm/mach-omap2/prm-regbits-33xx.h
index 0221b5c20e87..84feecee4fe6 100644
--- a/arch/arm/mach-omap2/prm-regbits-33xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-33xx.h
@@ -18,340 +18,35 @@
18 18
19#include "prm.h" 19#include "prm.h"
20 20
21/* Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_MPU_SETUP */
22#define AM33XX_ABBOFF_ACT_EXPORT_SHIFT 1
23#define AM33XX_ABBOFF_ACT_EXPORT_MASK (1 << 1)
24
25/* Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_MPU_SETUP */
26#define AM33XX_ABBOFF_SLEEP_EXPORT_SHIFT 2
27#define AM33XX_ABBOFF_SLEEP_EXPORT_MASK (1 << 2)
28
29/* Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_MPU_SETUP */
30#define AM33XX_AIPOFF_SHIFT 8
31#define AM33XX_AIPOFF_MASK (1 << 8)
32
33/* Used by PM_WKUP_PWRSTST */
34#define AM33XX_DEBUGSS_MEM_STATEST_SHIFT 17
35#define AM33XX_DEBUGSS_MEM_STATEST_MASK (0x3 << 17)
36
37/* Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_MPU_SETUP */
38#define AM33XX_DISABLE_RTA_EXPORT_SHIFT 0
39#define AM33XX_DISABLE_RTA_EXPORT_MASK (1 << 0)
40
41/* Used by PRM_IRQENABLE_M3, PRM_IRQENABLE_MPU */
42#define AM33XX_DPLL_CORE_RECAL_EN_SHIFT 12
43#define AM33XX_DPLL_CORE_RECAL_EN_MASK (1 << 12)
44
45/* Used by PRM_IRQSTATUS_M3, PRM_IRQSTATUS_MPU */
46#define AM33XX_DPLL_CORE_RECAL_ST_SHIFT 12
47#define AM33XX_DPLL_CORE_RECAL_ST_MASK (1 << 12)
48
49/* Used by PRM_IRQENABLE_M3, PRM_IRQENABLE_MPU */
50#define AM33XX_DPLL_DDR_RECAL_EN_SHIFT 14
51#define AM33XX_DPLL_DDR_RECAL_EN_MASK (1 << 14)
52
53/* Used by PRM_IRQSTATUS_M3, PRM_IRQSTATUS_MPU */
54#define AM33XX_DPLL_DDR_RECAL_ST_SHIFT 14
55#define AM33XX_DPLL_DDR_RECAL_ST_MASK (1 << 14)
56
57/* Used by PRM_IRQENABLE_M3, PRM_IRQENABLE_MPU */
58#define AM33XX_DPLL_DISP_RECAL_EN_SHIFT 15
59#define AM33XX_DPLL_DISP_RECAL_EN_MASK (1 << 15)
60
61/* Used by PRM_IRQSTATUS_M3, PRM_IRQSTATUS_MPU */
62#define AM33XX_DPLL_DISP_RECAL_ST_SHIFT 13
63#define AM33XX_DPLL_DISP_RECAL_ST_MASK (1 << 13)
64
65/* Used by PRM_IRQENABLE_M3, PRM_IRQENABLE_MPU */
66#define AM33XX_DPLL_MPU_RECAL_EN_SHIFT 11
67#define AM33XX_DPLL_MPU_RECAL_EN_MASK (1 << 11)
68
69/* Used by PRM_IRQSTATUS_M3, PRM_IRQSTATUS_MPU */
70#define AM33XX_DPLL_MPU_RECAL_ST_SHIFT 11
71#define AM33XX_DPLL_MPU_RECAL_ST_MASK (1 << 11)
72
73/* Used by PRM_IRQENABLE_M3, PRM_IRQENABLE_MPU */
74#define AM33XX_DPLL_PER_RECAL_EN_SHIFT 13
75#define AM33XX_DPLL_PER_RECAL_EN_MASK (1 << 13)
76
77/* Used by PRM_IRQSTATUS_M3, PRM_IRQSTATUS_MPU */
78#define AM33XX_DPLL_PER_RECAL_ST_SHIFT 15
79#define AM33XX_DPLL_PER_RECAL_ST_MASK (1 << 15)
80
81/* Used by RM_WKUP_RSTST */
82#define AM33XX_EMULATION_M3_RST_SHIFT 6
83#define AM33XX_EMULATION_M3_RST_MASK (1 << 6)
84
85/* Used by RM_MPU_RSTST */
86#define AM33XX_EMULATION_MPU_RST_SHIFT 5
87#define AM33XX_EMULATION_MPU_RST_MASK (1 << 5)
88
89/* Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_MPU_SETUP */
90#define AM33XX_ENFUNC1_EXPORT_SHIFT 3
91#define AM33XX_ENFUNC1_EXPORT_MASK (1 << 3)
92
93/* Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_MPU_SETUP */
94#define AM33XX_ENFUNC3_EXPORT_SHIFT 5
95#define AM33XX_ENFUNC3_EXPORT_MASK (1 << 5)
96
97/* Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_MPU_SETUP */
98#define AM33XX_ENFUNC4_SHIFT 6
99#define AM33XX_ENFUNC4_MASK (1 << 6)
100
101/* Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_MPU_SETUP */
102#define AM33XX_ENFUNC5_SHIFT 7
103#define AM33XX_ENFUNC5_MASK (1 << 7)
104
105/* Used by PRM_RSTST */
106#define AM33XX_EXTERNAL_WARM_RST_SHIFT 5
107#define AM33XX_EXTERNAL_WARM_RST_MASK (1 << 5)
108
109/* Used by PRM_IRQENABLE_M3, PRM_IRQENABLE_MPU */
110#define AM33XX_FORCEWKUP_EN_SHIFT 10
111#define AM33XX_FORCEWKUP_EN_MASK (1 << 10)
112
113/* Used by PRM_IRQSTATUS_M3, PRM_IRQSTATUS_MPU */
114#define AM33XX_FORCEWKUP_ST_SHIFT 10
115#define AM33XX_FORCEWKUP_ST_MASK (1 << 10)
116
117/* Used by PM_GFX_PWRSTCTRL */
118#define AM33XX_GFX_MEM_ONSTATE_SHIFT 17
119#define AM33XX_GFX_MEM_ONSTATE_MASK (0x3 << 17) 21#define AM33XX_GFX_MEM_ONSTATE_MASK (0x3 << 17)
120
121/* Used by PM_GFX_PWRSTCTRL */
122#define AM33XX_GFX_MEM_RETSTATE_SHIFT 6
123#define AM33XX_GFX_MEM_RETSTATE_MASK (1 << 6) 22#define AM33XX_GFX_MEM_RETSTATE_MASK (1 << 6)
124
125/* Used by PM_GFX_PWRSTST */
126#define AM33XX_GFX_MEM_STATEST_SHIFT 4
127#define AM33XX_GFX_MEM_STATEST_MASK (0x3 << 4) 23#define AM33XX_GFX_MEM_STATEST_MASK (0x3 << 4)
128
129/* Used by RM_GFX_RSTCTRL, RM_GFX_RSTST */
130#define AM33XX_GFX_RST_SHIFT 0
131#define AM33XX_GFX_RST_MASK (1 << 0)
132
133/* Used by PRM_RSTST */
134#define AM33XX_GLOBAL_COLD_RST_SHIFT 0
135#define AM33XX_GLOBAL_COLD_RST_MASK (1 << 0)
136
137/* Used by PRM_RSTST */
138#define AM33XX_GLOBAL_WARM_SW_RST_SHIFT 1
139#define AM33XX_GLOBAL_WARM_SW_RST_MASK (1 << 1) 24#define AM33XX_GLOBAL_WARM_SW_RST_MASK (1 << 1)
140 25#define AM33XX_RST_GLOBAL_WARM_SW_MASK (1 << 0)
141/* Used by RM_WKUP_RSTST */
142#define AM33XX_ICECRUSHER_M3_RST_SHIFT 7
143#define AM33XX_ICECRUSHER_M3_RST_MASK (1 << 7)
144
145/* Used by RM_MPU_RSTST */
146#define AM33XX_ICECRUSHER_MPU_RST_SHIFT 6
147#define AM33XX_ICECRUSHER_MPU_RST_MASK (1 << 6)
148
149/* Used by PRM_RSTST */
150#define AM33XX_ICEPICK_RST_SHIFT 9
151#define AM33XX_ICEPICK_RST_MASK (1 << 9)
152
153/* Used by RM_PER_RSTCTRL */
154#define AM33XX_PRUSS_LRST_SHIFT 1
155#define AM33XX_PRUSS_LRST_MASK (1 << 1)
156
157/* Used by PM_PER_PWRSTCTRL */
158#define AM33XX_PRUSS_MEM_ONSTATE_SHIFT 5
159#define AM33XX_PRUSS_MEM_ONSTATE_MASK (0x3 << 5) 26#define AM33XX_PRUSS_MEM_ONSTATE_MASK (0x3 << 5)
160
161/* Used by PM_PER_PWRSTCTRL */
162#define AM33XX_PRUSS_MEM_RETSTATE_SHIFT 7
163#define AM33XX_PRUSS_MEM_RETSTATE_MASK (1 << 7) 27#define AM33XX_PRUSS_MEM_RETSTATE_MASK (1 << 7)
164
165/* Used by PM_PER_PWRSTST */
166#define AM33XX_PRUSS_MEM_STATEST_SHIFT 23
167#define AM33XX_PRUSS_MEM_STATEST_MASK (0x3 << 23) 28#define AM33XX_PRUSS_MEM_STATEST_MASK (0x3 << 23)
168
169/*
170 * Used by PM_GFX_PWRSTST, PM_CEFUSE_PWRSTST, PM_PER_PWRSTST, PM_MPU_PWRSTST,
171 * PM_WKUP_PWRSTST, PM_RTC_PWRSTST
172 */
173#define AM33XX_INTRANSITION_SHIFT 20
174#define AM33XX_INTRANSITION_MASK (1 << 20)
175
176/* Used by PM_CEFUSE_PWRSTST */
177#define AM33XX_LASTPOWERSTATEENTERED_SHIFT 24 29#define AM33XX_LASTPOWERSTATEENTERED_SHIFT 24
178#define AM33XX_LASTPOWERSTATEENTERED_MASK (0x3 << 24) 30#define AM33XX_LASTPOWERSTATEENTERED_MASK (0x3 << 24)
179
180/* Used by PM_GFX_PWRSTCTRL, PM_MPU_PWRSTCTRL, PM_RTC_PWRSTCTRL */
181#define AM33XX_LOGICRETSTATE_SHIFT 2
182#define AM33XX_LOGICRETSTATE_MASK (1 << 2) 31#define AM33XX_LOGICRETSTATE_MASK (1 << 2)
183
184/* Renamed from LOGICRETSTATE Used by PM_PER_PWRSTCTRL, PM_WKUP_PWRSTCTRL */
185#define AM33XX_LOGICRETSTATE_3_3_SHIFT 3
186#define AM33XX_LOGICRETSTATE_3_3_MASK (1 << 3) 32#define AM33XX_LOGICRETSTATE_3_3_MASK (1 << 3)
187
188/*
189 * Used by PM_GFX_PWRSTST, PM_CEFUSE_PWRSTST, PM_PER_PWRSTST, PM_MPU_PWRSTST,
190 * PM_WKUP_PWRSTST, PM_RTC_PWRSTST
191 */
192#define AM33XX_LOGICSTATEST_SHIFT 2 33#define AM33XX_LOGICSTATEST_SHIFT 2
193#define AM33XX_LOGICSTATEST_MASK (1 << 2) 34#define AM33XX_LOGICSTATEST_MASK (1 << 2)
194
195/*
196 * Used by PM_GFX_PWRSTCTRL, PM_CEFUSE_PWRSTCTRL, PM_PER_PWRSTCTRL,
197 * PM_MPU_PWRSTCTRL, PM_WKUP_PWRSTCTRL, PM_RTC_PWRSTCTRL
198 */
199#define AM33XX_LOWPOWERSTATECHANGE_SHIFT 4 35#define AM33XX_LOWPOWERSTATECHANGE_SHIFT 4
200#define AM33XX_LOWPOWERSTATECHANGE_MASK (1 << 4) 36#define AM33XX_LOWPOWERSTATECHANGE_MASK (1 << 4)
201
202/* Used by PM_MPU_PWRSTCTRL */
203#define AM33XX_MPU_L1_ONSTATE_SHIFT 18
204#define AM33XX_MPU_L1_ONSTATE_MASK (0x3 << 18) 37#define AM33XX_MPU_L1_ONSTATE_MASK (0x3 << 18)
205
206/* Used by PM_MPU_PWRSTCTRL */
207#define AM33XX_MPU_L1_RETSTATE_SHIFT 22
208#define AM33XX_MPU_L1_RETSTATE_MASK (1 << 22) 38#define AM33XX_MPU_L1_RETSTATE_MASK (1 << 22)
209
210/* Used by PM_MPU_PWRSTST */
211#define AM33XX_MPU_L1_STATEST_SHIFT 6
212#define AM33XX_MPU_L1_STATEST_MASK (0x3 << 6) 39#define AM33XX_MPU_L1_STATEST_MASK (0x3 << 6)
213
214/* Used by PM_MPU_PWRSTCTRL */
215#define AM33XX_MPU_L2_ONSTATE_SHIFT 20
216#define AM33XX_MPU_L2_ONSTATE_MASK (0x3 << 20) 40#define AM33XX_MPU_L2_ONSTATE_MASK (0x3 << 20)
217
218/* Used by PM_MPU_PWRSTCTRL */
219#define AM33XX_MPU_L2_RETSTATE_SHIFT 23
220#define AM33XX_MPU_L2_RETSTATE_MASK (1 << 23) 41#define AM33XX_MPU_L2_RETSTATE_MASK (1 << 23)
221
222/* Used by PM_MPU_PWRSTST */
223#define AM33XX_MPU_L2_STATEST_SHIFT 8
224#define AM33XX_MPU_L2_STATEST_MASK (0x3 << 8) 42#define AM33XX_MPU_L2_STATEST_MASK (0x3 << 8)
225
226/* Used by PM_MPU_PWRSTCTRL */
227#define AM33XX_MPU_RAM_ONSTATE_SHIFT 16
228#define AM33XX_MPU_RAM_ONSTATE_MASK (0x3 << 16) 43#define AM33XX_MPU_RAM_ONSTATE_MASK (0x3 << 16)
229
230/* Used by PM_MPU_PWRSTCTRL */
231#define AM33XX_MPU_RAM_RETSTATE_SHIFT 24
232#define AM33XX_MPU_RAM_RETSTATE_MASK (1 << 24) 44#define AM33XX_MPU_RAM_RETSTATE_MASK (1 << 24)
233
234/* Used by PM_MPU_PWRSTST */
235#define AM33XX_MPU_RAM_STATEST_SHIFT 4
236#define AM33XX_MPU_RAM_STATEST_MASK (0x3 << 4) 45#define AM33XX_MPU_RAM_STATEST_MASK (0x3 << 4)
237
238/* Used by PRM_RSTST */
239#define AM33XX_MPU_SECURITY_VIOL_RST_SHIFT 2
240#define AM33XX_MPU_SECURITY_VIOL_RST_MASK (1 << 2)
241
242/* Used by PRM_SRAM_COUNT */
243#define AM33XX_PCHARGECNT_VALUE_SHIFT 0
244#define AM33XX_PCHARGECNT_VALUE_MASK (0x3f << 0)
245
246/* Used by RM_PER_RSTCTRL */
247#define AM33XX_PCI_LRST_SHIFT 0
248#define AM33XX_PCI_LRST_MASK (1 << 0)
249
250/* Renamed from PCI_LRST Used by RM_PER_RSTST */
251#define AM33XX_PCI_LRST_5_5_SHIFT 5
252#define AM33XX_PCI_LRST_5_5_MASK (1 << 5)
253
254/* Used by PM_PER_PWRSTCTRL */
255#define AM33XX_PER_MEM_ONSTATE_SHIFT 25
256#define AM33XX_PER_MEM_ONSTATE_MASK (0x3 << 25) 46#define AM33XX_PER_MEM_ONSTATE_MASK (0x3 << 25)
257
258/* Used by PM_PER_PWRSTCTRL */
259#define AM33XX_PER_MEM_RETSTATE_SHIFT 29
260#define AM33XX_PER_MEM_RETSTATE_MASK (1 << 29) 47#define AM33XX_PER_MEM_RETSTATE_MASK (1 << 29)
261
262/* Used by PM_PER_PWRSTST */
263#define AM33XX_PER_MEM_STATEST_SHIFT 17
264#define AM33XX_PER_MEM_STATEST_MASK (0x3 << 17) 48#define AM33XX_PER_MEM_STATEST_MASK (0x3 << 17)
265
266/*
267 * Used by PM_GFX_PWRSTCTRL, PM_CEFUSE_PWRSTCTRL, PM_PER_PWRSTCTRL,
268 * PM_MPU_PWRSTCTRL
269 */
270#define AM33XX_POWERSTATE_SHIFT 0
271#define AM33XX_POWERSTATE_MASK (0x3 << 0)
272
273/* Used by PM_GFX_PWRSTST, PM_CEFUSE_PWRSTST, PM_PER_PWRSTST, PM_MPU_PWRSTST */
274#define AM33XX_POWERSTATEST_SHIFT 0
275#define AM33XX_POWERSTATEST_MASK (0x3 << 0)
276
277/* Used by PM_PER_PWRSTCTRL */
278#define AM33XX_RAM_MEM_ONSTATE_SHIFT 30
279#define AM33XX_RAM_MEM_ONSTATE_MASK (0x3 << 30) 49#define AM33XX_RAM_MEM_ONSTATE_MASK (0x3 << 30)
280
281/* Used by PM_PER_PWRSTCTRL */
282#define AM33XX_RAM_MEM_RETSTATE_SHIFT 27
283#define AM33XX_RAM_MEM_RETSTATE_MASK (1 << 27) 50#define AM33XX_RAM_MEM_RETSTATE_MASK (1 << 27)
284
285/* Used by PM_PER_PWRSTST */
286#define AM33XX_RAM_MEM_STATEST_SHIFT 21
287#define AM33XX_RAM_MEM_STATEST_MASK (0x3 << 21) 51#define AM33XX_RAM_MEM_STATEST_MASK (0x3 << 21)
288
289/* Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_MPU_CTRL */
290#define AM33XX_RETMODE_ENABLE_SHIFT 0
291#define AM33XX_RETMODE_ENABLE_MASK (1 << 0)
292
293/* Used by REVISION_PRM */
294#define AM33XX_REV_SHIFT 0
295#define AM33XX_REV_MASK (0xff << 0)
296
297/* Used by PRM_RSTTIME */
298#define AM33XX_RSTTIME1_SHIFT 0
299#define AM33XX_RSTTIME1_MASK (0xff << 0)
300
301/* Used by PRM_RSTTIME */
302#define AM33XX_RSTTIME2_SHIFT 8
303#define AM33XX_RSTTIME2_MASK (0x1f << 8)
304
305/* Used by PRM_RSTCTRL */
306#define AM33XX_RST_GLOBAL_COLD_SW_SHIFT 1
307#define AM33XX_RST_GLOBAL_COLD_SW_MASK (1 << 1)
308
309/* Used by PRM_RSTCTRL */
310#define AM33XX_RST_GLOBAL_WARM_SW_SHIFT 0
311#define AM33XX_RST_GLOBAL_WARM_SW_MASK (1 << 0)
312
313/* Used by PRM_SRAM_COUNT */
314#define AM33XX_SLPCNT_VALUE_SHIFT 16
315#define AM33XX_SLPCNT_VALUE_MASK (0xff << 16)
316
317/* Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_MPU_CTRL */
318#define AM33XX_SRAMLDO_STATUS_SHIFT 8
319#define AM33XX_SRAMLDO_STATUS_MASK (1 << 8)
320
321/* Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_MPU_CTRL */
322#define AM33XX_SRAM_IN_TRANSITION_SHIFT 9
323#define AM33XX_SRAM_IN_TRANSITION_MASK (1 << 9)
324
325/* Used by PRM_SRAM_COUNT */
326#define AM33XX_STARTUP_COUNT_SHIFT 24
327#define AM33XX_STARTUP_COUNT_MASK (0xff << 24)
328
329/* Used by PRM_IRQENABLE_M3, PRM_IRQENABLE_MPU */
330#define AM33XX_TRANSITION_EN_SHIFT 8
331#define AM33XX_TRANSITION_EN_MASK (1 << 8)
332
333/* Used by PRM_IRQSTATUS_M3, PRM_IRQSTATUS_MPU */
334#define AM33XX_TRANSITION_ST_SHIFT 8
335#define AM33XX_TRANSITION_ST_MASK (1 << 8)
336
337/* Used by PRM_SRAM_COUNT */
338#define AM33XX_VSETUPCNT_VALUE_SHIFT 8
339#define AM33XX_VSETUPCNT_VALUE_MASK (0xff << 8)
340
341/* Used by PRM_RSTST */
342#define AM33XX_WDT0_RST_SHIFT 3
343#define AM33XX_WDT0_RST_MASK (1 << 3)
344
345/* Used by PRM_RSTST */
346#define AM33XX_WDT1_RST_SHIFT 4
347#define AM33XX_WDT1_RST_MASK (1 << 4)
348
349/* Used by RM_WKUP_RSTCTRL */
350#define AM33XX_WKUP_M3_LRST_SHIFT 3
351#define AM33XX_WKUP_M3_LRST_MASK (1 << 3)
352
353/* Renamed from WKUP_M3_LRST Used by RM_WKUP_RSTST */
354#define AM33XX_WKUP_M3_LRST_5_5_SHIFT 5
355#define AM33XX_WKUP_M3_LRST_5_5_MASK (1 << 5)
356
357#endif 52#endif
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
index b0a2142eeb91..cebad565ed37 100644
--- a/arch/arm/mach-omap2/prm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
@@ -16,115 +16,25 @@
16 16
17#include "prm3xxx.h" 17#include "prm3xxx.h"
18 18
19/* Shared register bits */
20
21/* PRM_VC_CMD_VAL_0, PRM_VC_CMD_VAL_1 shared bits */
22#define OMAP3430_ON_SHIFT 24
23#define OMAP3430_ON_MASK (0xff << 24)
24#define OMAP3430_ONLP_SHIFT 16
25#define OMAP3430_ONLP_MASK (0xff << 16)
26#define OMAP3430_RET_SHIFT 8
27#define OMAP3430_RET_MASK (0xff << 8)
28#define OMAP3430_OFF_SHIFT 0
29#define OMAP3430_OFF_MASK (0xff << 0)
30
31/* PRM_VP1_CONFIG, PRM_VP2_CONFIG shared bits */
32#define OMAP3430_ERROROFFSET_SHIFT 24
33#define OMAP3430_ERROROFFSET_MASK (0xff << 24) 19#define OMAP3430_ERROROFFSET_MASK (0xff << 24)
34#define OMAP3430_ERRORGAIN_SHIFT 16
35#define OMAP3430_ERRORGAIN_MASK (0xff << 16) 20#define OMAP3430_ERRORGAIN_MASK (0xff << 16)
36#define OMAP3430_INITVOLTAGE_SHIFT 8
37#define OMAP3430_INITVOLTAGE_MASK (0xff << 8) 21#define OMAP3430_INITVOLTAGE_MASK (0xff << 8)
38#define OMAP3430_TIMEOUTEN_MASK (1 << 3) 22#define OMAP3430_TIMEOUTEN_MASK (1 << 3)
39#define OMAP3430_INITVDD_MASK (1 << 2) 23#define OMAP3430_INITVDD_MASK (1 << 2)
40#define OMAP3430_FORCEUPDATE_MASK (1 << 1) 24#define OMAP3430_FORCEUPDATE_MASK (1 << 1)
41#define OMAP3430_VPENABLE_MASK (1 << 0) 25#define OMAP3430_VPENABLE_MASK (1 << 0)
42
43/* PRM_VP1_VSTEPMIN, PRM_VP2_VSTEPMIN shared bits */
44#define OMAP3430_SMPSWAITTIMEMIN_SHIFT 8 26#define OMAP3430_SMPSWAITTIMEMIN_SHIFT 8
45#define OMAP3430_SMPSWAITTIMEMIN_MASK (0xffff << 8)
46#define OMAP3430_VSTEPMIN_SHIFT 0 27#define OMAP3430_VSTEPMIN_SHIFT 0
47#define OMAP3430_VSTEPMIN_MASK (0xff << 0)
48
49/* PRM_VP1_VSTEPMAX, PRM_VP2_VSTEPMAX shared bits */
50#define OMAP3430_SMPSWAITTIMEMAX_SHIFT 8 28#define OMAP3430_SMPSWAITTIMEMAX_SHIFT 8
51#define OMAP3430_SMPSWAITTIMEMAX_MASK (0xffff << 8)
52#define OMAP3430_VSTEPMAX_SHIFT 0 29#define OMAP3430_VSTEPMAX_SHIFT 0
53#define OMAP3430_VSTEPMAX_MASK (0xff << 0)
54
55/* PRM_VP1_VLIMITTO, PRM_VP2_VLIMITTO shared bits */
56#define OMAP3430_VDDMAX_SHIFT 24 30#define OMAP3430_VDDMAX_SHIFT 24
57#define OMAP3430_VDDMAX_MASK (0xff << 24)
58#define OMAP3430_VDDMIN_SHIFT 16 31#define OMAP3430_VDDMIN_SHIFT 16
59#define OMAP3430_VDDMIN_MASK (0xff << 16)
60#define OMAP3430_TIMEOUT_SHIFT 0 32#define OMAP3430_TIMEOUT_SHIFT 0
61#define OMAP3430_TIMEOUT_MASK (0xffff << 0)
62
63/* PRM_VP1_VOLTAGE, PRM_VP2_VOLTAGE shared bits */
64#define OMAP3430_VPVOLTAGE_SHIFT 0
65#define OMAP3430_VPVOLTAGE_MASK (0xff << 0) 33#define OMAP3430_VPVOLTAGE_MASK (0xff << 0)
66
67/* PRM_VP1_STATUS, PRM_VP2_STATUS shared bits */
68#define OMAP3430_VPINIDLE_MASK (1 << 0)
69
70/* PM_WKDEP_IVA2, PM_WKDEP_MPU shared bits */
71#define OMAP3430_EN_PER_SHIFT 7 34#define OMAP3430_EN_PER_SHIFT 7
72#define OMAP3430_EN_PER_MASK (1 << 7)
73
74/* PM_PWSTCTRL_IVA2, PM_PWSTCTRL_MPU, PM_PWSTCTRL_CORE shared bits */
75#define OMAP3430_MEMORYCHANGE_MASK (1 << 3)
76
77/* PM_PWSTST_IVA2, PM_PWSTST_CORE shared bits */
78#define OMAP3430_LOGICSTATEST_MASK (1 << 2) 35#define OMAP3430_LOGICSTATEST_MASK (1 << 2)
79
80/* PM_PREPWSTST_IVA2, PM_PREPWSTST_CORE shared bits */
81#define OMAP3430_LASTLOGICSTATEENTERED_MASK (1 << 2) 36#define OMAP3430_LASTLOGICSTATEENTERED_MASK (1 << 2)
82
83/*
84 * PM_PREPWSTST_IVA2, PM_PREPWSTST_MPU, PM_PREPWSTST_CORE,
85 * PM_PREPWSTST_GFX, PM_PREPWSTST_DSS, PM_PREPWSTST_CAM,
86 * PM_PREPWSTST_PER, PM_PREPWSTST_NEON shared bits
87 */
88#define OMAP3430_LASTPOWERSTATEENTERED_SHIFT 0
89#define OMAP3430_LASTPOWERSTATEENTERED_MASK (0x3 << 0) 37#define OMAP3430_LASTPOWERSTATEENTERED_MASK (0x3 << 0)
90
91/* PRM_IRQSTATUS_IVA2, PRM_IRQSTATUS_MPU shared bits */
92#define OMAP3430_WKUP_ST_MASK (1 << 0)
93
94/* PRM_IRQENABLE_IVA2, PRM_IRQENABLE_MPU shared bits */
95#define OMAP3430_WKUP_EN_MASK (1 << 0)
96
97/* PM_MPUGRPSEL1_CORE, PM_IVA2GRPSEL1_CORE shared bits */
98#define OMAP3430_GRPSEL_MMC2_MASK (1 << 25)
99#define OMAP3430_GRPSEL_MMC1_MASK (1 << 24)
100#define OMAP3430_GRPSEL_MCSPI4_MASK (1 << 21)
101#define OMAP3430_GRPSEL_MCSPI3_MASK (1 << 20)
102#define OMAP3430_GRPSEL_MCSPI2_MASK (1 << 19)
103#define OMAP3430_GRPSEL_MCSPI1_MASK (1 << 18)
104#define OMAP3430_GRPSEL_I2C3_SHIFT 17
105#define OMAP3430_GRPSEL_I2C3_MASK (1 << 17)
106#define OMAP3430_GRPSEL_I2C2_SHIFT 16
107#define OMAP3430_GRPSEL_I2C2_MASK (1 << 16)
108#define OMAP3430_GRPSEL_I2C1_SHIFT 15
109#define OMAP3430_GRPSEL_I2C1_MASK (1 << 15)
110#define OMAP3430_GRPSEL_UART2_MASK (1 << 14)
111#define OMAP3430_GRPSEL_UART1_MASK (1 << 13)
112#define OMAP3430_GRPSEL_GPT11_MASK (1 << 12)
113#define OMAP3430_GRPSEL_GPT10_MASK (1 << 11)
114#define OMAP3430_GRPSEL_MCBSP5_MASK (1 << 10)
115#define OMAP3430_GRPSEL_MCBSP1_MASK (1 << 9)
116#define OMAP3430_GRPSEL_HSOTGUSB_MASK (1 << 4)
117#define OMAP3430_GRPSEL_D2D_MASK (1 << 3)
118
119/*
120 * PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSS, PM_PWSTCTRL_CAM,
121 * PM_PWSTCTRL_PER shared bits
122 */
123#define OMAP3430_MEMONSTATE_SHIFT 16
124#define OMAP3430_MEMONSTATE_MASK (0x3 << 16)
125#define OMAP3430_MEMRETSTATE_MASK (1 << 8)
126
127/* PM_MPUGRPSEL_PER, PM_IVA2GRPSEL_PER shared bits */
128#define OMAP3630_GRPSEL_UART4_MASK (1 << 18) 38#define OMAP3630_GRPSEL_UART4_MASK (1 << 18)
129#define OMAP3430_GRPSEL_GPIO6_MASK (1 << 17) 39#define OMAP3430_GRPSEL_GPIO6_MASK (1 << 17)
130#define OMAP3430_GRPSEL_GPIO5_MASK (1 << 16) 40#define OMAP3430_GRPSEL_GPIO5_MASK (1 << 16)
@@ -132,480 +42,89 @@
132#define OMAP3430_GRPSEL_GPIO3_MASK (1 << 14) 42#define OMAP3430_GRPSEL_GPIO3_MASK (1 << 14)
133#define OMAP3430_GRPSEL_GPIO2_MASK (1 << 13) 43#define OMAP3430_GRPSEL_GPIO2_MASK (1 << 13)
134#define OMAP3430_GRPSEL_UART3_MASK (1 << 11) 44#define OMAP3430_GRPSEL_UART3_MASK (1 << 11)
135#define OMAP3430_GRPSEL_GPT9_MASK (1 << 10)
136#define OMAP3430_GRPSEL_GPT8_MASK (1 << 9)
137#define OMAP3430_GRPSEL_GPT7_MASK (1 << 8)
138#define OMAP3430_GRPSEL_GPT6_MASK (1 << 7)
139#define OMAP3430_GRPSEL_GPT5_MASK (1 << 6)
140#define OMAP3430_GRPSEL_GPT4_MASK (1 << 5)
141#define OMAP3430_GRPSEL_GPT3_MASK (1 << 4)
142#define OMAP3430_GRPSEL_GPT2_MASK (1 << 3)
143#define OMAP3430_GRPSEL_MCBSP4_MASK (1 << 2) 45#define OMAP3430_GRPSEL_MCBSP4_MASK (1 << 2)
144#define OMAP3430_GRPSEL_MCBSP3_MASK (1 << 1) 46#define OMAP3430_GRPSEL_MCBSP3_MASK (1 << 1)
145#define OMAP3430_GRPSEL_MCBSP2_MASK (1 << 0) 47#define OMAP3430_GRPSEL_MCBSP2_MASK (1 << 0)
146
147/* PM_MPUGRPSEL_WKUP, PM_IVA2GRPSEL_WKUP shared bits */
148#define OMAP3430_GRPSEL_IO_MASK (1 << 8)
149#define OMAP3430_GRPSEL_SR2_MASK (1 << 7)
150#define OMAP3430_GRPSEL_SR1_MASK (1 << 6)
151#define OMAP3430_GRPSEL_GPIO1_MASK (1 << 3) 48#define OMAP3430_GRPSEL_GPIO1_MASK (1 << 3)
152#define OMAP3430_GRPSEL_GPT12_MASK (1 << 1) 49#define OMAP3430_GRPSEL_GPT12_MASK (1 << 1)
153#define OMAP3430_GRPSEL_GPT1_MASK (1 << 0) 50#define OMAP3430_GRPSEL_GPT1_MASK (1 << 0)
154
155/* Bits specific to each register */
156
157/* RM_RSTCTRL_IVA2 */
158#define OMAP3430_RST3_IVA2_MASK (1 << 2) 51#define OMAP3430_RST3_IVA2_MASK (1 << 2)
159#define OMAP3430_RST2_IVA2_MASK (1 << 1) 52#define OMAP3430_RST2_IVA2_MASK (1 << 1)
160#define OMAP3430_RST1_IVA2_MASK (1 << 0) 53#define OMAP3430_RST1_IVA2_MASK (1 << 0)
161
162/* RM_RSTST_IVA2 specific bits */
163#define OMAP3430_EMULATION_VSEQ_RST_MASK (1 << 13)
164#define OMAP3430_EMULATION_VHWA_RST_MASK (1 << 12)
165#define OMAP3430_EMULATION_IVA2_RST_MASK (1 << 11)
166#define OMAP3430_IVA2_SW_RST3_MASK (1 << 10)
167#define OMAP3430_IVA2_SW_RST2_MASK (1 << 9)
168#define OMAP3430_IVA2_SW_RST1_MASK (1 << 8)
169
170/* PM_WKDEP_IVA2 specific bits */
171
172/* PM_PWSTCTRL_IVA2 specific bits */
173#define OMAP3430_L2FLATMEMONSTATE_SHIFT 22
174#define OMAP3430_L2FLATMEMONSTATE_MASK (0x3 << 22) 54#define OMAP3430_L2FLATMEMONSTATE_MASK (0x3 << 22)
175#define OMAP3430_SHAREDL2CACHEFLATONSTATE_SHIFT 20
176#define OMAP3430_SHAREDL2CACHEFLATONSTATE_MASK (0x3 << 20) 55#define OMAP3430_SHAREDL2CACHEFLATONSTATE_MASK (0x3 << 20)
177#define OMAP3430_L1FLATMEMONSTATE_SHIFT 18
178#define OMAP3430_L1FLATMEMONSTATE_MASK (0x3 << 18) 56#define OMAP3430_L1FLATMEMONSTATE_MASK (0x3 << 18)
179#define OMAP3430_SHAREDL1CACHEFLATONSTATE_SHIFT 16
180#define OMAP3430_SHAREDL1CACHEFLATONSTATE_MASK (0x3 << 16) 57#define OMAP3430_SHAREDL1CACHEFLATONSTATE_MASK (0x3 << 16)
181#define OMAP3430_L2FLATMEMRETSTATE_MASK (1 << 11) 58#define OMAP3430_L2FLATMEMRETSTATE_MASK (1 << 11)
182#define OMAP3430_SHAREDL2CACHEFLATRETSTATE_MASK (1 << 10) 59#define OMAP3430_SHAREDL2CACHEFLATRETSTATE_MASK (1 << 10)
183#define OMAP3430_L1FLATMEMRETSTATE_MASK (1 << 9) 60#define OMAP3430_L1FLATMEMRETSTATE_MASK (1 << 9)
184#define OMAP3430_SHAREDL1CACHEFLATRETSTATE_MASK (1 << 8) 61#define OMAP3430_SHAREDL1CACHEFLATRETSTATE_MASK (1 << 8)
185
186/* PM_PWSTST_IVA2 specific bits */
187#define OMAP3430_L2FLATMEMSTATEST_SHIFT 10
188#define OMAP3430_L2FLATMEMSTATEST_MASK (0x3 << 10) 62#define OMAP3430_L2FLATMEMSTATEST_MASK (0x3 << 10)
189#define OMAP3430_SHAREDL2CACHEFLATSTATEST_SHIFT 8
190#define OMAP3430_SHAREDL2CACHEFLATSTATEST_MASK (0x3 << 8) 63#define OMAP3430_SHAREDL2CACHEFLATSTATEST_MASK (0x3 << 8)
191#define OMAP3430_L1FLATMEMSTATEST_SHIFT 6
192#define OMAP3430_L1FLATMEMSTATEST_MASK (0x3 << 6) 64#define OMAP3430_L1FLATMEMSTATEST_MASK (0x3 << 6)
193#define OMAP3430_SHAREDL1CACHEFLATSTATEST_SHIFT 4
194#define OMAP3430_SHAREDL1CACHEFLATSTATEST_MASK (0x3 << 4) 65#define OMAP3430_SHAREDL1CACHEFLATSTATEST_MASK (0x3 << 4)
195
196/* PM_PREPWSTST_IVA2 specific bits */
197#define OMAP3430_LASTL2FLATMEMSTATEENTERED_SHIFT 10
198#define OMAP3430_LASTL2FLATMEMSTATEENTERED_MASK (0x3 << 10) 66#define OMAP3430_LASTL2FLATMEMSTATEENTERED_MASK (0x3 << 10)
199#define OMAP3430_LASTSHAREDL2CACHEFLATSTATEENTERED_SHIFT 8
200#define OMAP3430_LASTSHAREDL2CACHEFLATSTATEENTERED_MASK (0x3 << 8) 67#define OMAP3430_LASTSHAREDL2CACHEFLATSTATEENTERED_MASK (0x3 << 8)
201#define OMAP3430_LASTL1FLATMEMSTATEENTERED_SHIFT 6
202#define OMAP3430_LASTL1FLATMEMSTATEENTERED_MASK (0x3 << 6)
203#define OMAP3430_LASTSHAREDL1CACHEFLATSTATEENTERED_SHIFT 4
204#define OMAP3430_LASTSHAREDL1CACHEFLATSTATEENTERED_MASK (0x3 << 4)
205
206/* PRM_IRQSTATUS_IVA2 specific bits */
207#define OMAP3430_PRM_IRQSTATUS_IVA2_IVA2_DPLL_ST_MASK (1 << 2)
208#define OMAP3430_FORCEWKUP_ST_MASK (1 << 1)
209
210/* PRM_IRQENABLE_IVA2 specific bits */
211#define OMAP3430_PRM_IRQENABLE_IVA2_IVA2_DPLL_RECAL_EN_MASK (1 << 2)
212#define OMAP3430_FORCEWKUP_EN_MASK (1 << 1)
213
214/* PRM_REVISION specific bits */
215
216/* PRM_SYSCONFIG specific bits */
217
218/* PRM_IRQSTATUS_MPU specific bits */
219#define OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT 25 68#define OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT 25
220#define OMAP3430ES2_SND_PERIPH_DPLL_ST_MASK (1 << 25)
221#define OMAP3430_VC_TIMEOUTERR_ST_MASK (1 << 24)
222#define OMAP3430_VC_RAERR_ST_MASK (1 << 23)
223#define OMAP3430_VC_SAERR_ST_MASK (1 << 22)
224#define OMAP3430_VP2_TRANXDONE_ST_MASK (1 << 21) 69#define OMAP3430_VP2_TRANXDONE_ST_MASK (1 << 21)
225#define OMAP3430_VP2_EQVALUE_ST_MASK (1 << 20)
226#define OMAP3430_VP2_NOSMPSACK_ST_MASK (1 << 19)
227#define OMAP3430_VP2_MAXVDD_ST_MASK (1 << 18)
228#define OMAP3430_VP2_MINVDD_ST_MASK (1 << 17)
229#define OMAP3430_VP2_OPPCHANGEDONE_ST_MASK (1 << 16)
230#define OMAP3430_VP1_TRANXDONE_ST_MASK (1 << 15) 70#define OMAP3430_VP1_TRANXDONE_ST_MASK (1 << 15)
231#define OMAP3430_VP1_EQVALUE_ST_MASK (1 << 14)
232#define OMAP3430_VP1_NOSMPSACK_ST_MASK (1 << 13)
233#define OMAP3430_VP1_MAXVDD_ST_MASK (1 << 12)
234#define OMAP3430_VP1_MINVDD_ST_MASK (1 << 11)
235#define OMAP3430_VP1_OPPCHANGEDONE_ST_MASK (1 << 10)
236#define OMAP3430_IO_ST_MASK (1 << 9)
237#define OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_MASK (1 << 8)
238#define OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT 8 71#define OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT 8
239#define OMAP3430_MPU_DPLL_ST_MASK (1 << 7)
240#define OMAP3430_MPU_DPLL_ST_SHIFT 7 72#define OMAP3430_MPU_DPLL_ST_SHIFT 7
241#define OMAP3430_PERIPH_DPLL_ST_MASK (1 << 6)
242#define OMAP3430_PERIPH_DPLL_ST_SHIFT 6 73#define OMAP3430_PERIPH_DPLL_ST_SHIFT 6
243#define OMAP3430_CORE_DPLL_ST_MASK (1 << 5)
244#define OMAP3430_CORE_DPLL_ST_SHIFT 5 74#define OMAP3430_CORE_DPLL_ST_SHIFT 5
245#define OMAP3430_TRANSITION_ST_MASK (1 << 4)
246#define OMAP3430_EVGENOFF_ST_MASK (1 << 3)
247#define OMAP3430_EVGENON_ST_MASK (1 << 2)
248#define OMAP3430_FS_USB_WKUP_ST_MASK (1 << 1)
249
250/* PRM_IRQENABLE_MPU specific bits */
251#define OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT 25 75#define OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT 25
252#define OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_MASK (1 << 25)
253#define OMAP3430_VC_TIMEOUTERR_EN_MASK (1 << 24)
254#define OMAP3430_VC_RAERR_EN_MASK (1 << 23)
255#define OMAP3430_VC_SAERR_EN_MASK (1 << 22)
256#define OMAP3430_VP2_TRANXDONE_EN_MASK (1 << 21)
257#define OMAP3430_VP2_EQVALUE_EN_MASK (1 << 20)
258#define OMAP3430_VP2_NOSMPSACK_EN_MASK (1 << 19)
259#define OMAP3430_VP2_MAXVDD_EN_MASK (1 << 18)
260#define OMAP3430_VP2_MINVDD_EN_MASK (1 << 17)
261#define OMAP3430_VP2_OPPCHANGEDONE_EN_MASK (1 << 16)
262#define OMAP3430_VP1_TRANXDONE_EN_MASK (1 << 15)
263#define OMAP3430_VP1_EQVALUE_EN_MASK (1 << 14)
264#define OMAP3430_VP1_NOSMPSACK_EN_MASK (1 << 13)
265#define OMAP3430_VP1_MAXVDD_EN_MASK (1 << 12)
266#define OMAP3430_VP1_MINVDD_EN_MASK (1 << 11)
267#define OMAP3430_VP1_OPPCHANGEDONE_EN_MASK (1 << 10)
268#define OMAP3430_IO_EN_MASK (1 << 9)
269#define OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_MASK (1 << 8)
270#define OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT 8 76#define OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT 8
271#define OMAP3430_MPU_DPLL_RECAL_EN_MASK (1 << 7)
272#define OMAP3430_MPU_DPLL_RECAL_EN_SHIFT 7 77#define OMAP3430_MPU_DPLL_RECAL_EN_SHIFT 7
273#define OMAP3430_PERIPH_DPLL_RECAL_EN_MASK (1 << 6)
274#define OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT 6 78#define OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT 6
275#define OMAP3430_CORE_DPLL_RECAL_EN_MASK (1 << 5)
276#define OMAP3430_CORE_DPLL_RECAL_EN_SHIFT 5 79#define OMAP3430_CORE_DPLL_RECAL_EN_SHIFT 5
277#define OMAP3430_TRANSITION_EN_MASK (1 << 4)
278#define OMAP3430_EVGENOFF_EN_MASK (1 << 3)
279#define OMAP3430_EVGENON_EN_MASK (1 << 2)
280#define OMAP3430_FS_USB_WKUP_EN_MASK (1 << 1)
281
282/* RM_RSTST_MPU specific bits */
283#define OMAP3430_EMULATION_MPU_RST_MASK (1 << 11)
284
285/* PM_WKDEP_MPU specific bits */
286#define OMAP3430_PM_WKDEP_MPU_EN_DSS_SHIFT 5 80#define OMAP3430_PM_WKDEP_MPU_EN_DSS_SHIFT 5
287#define OMAP3430_PM_WKDEP_MPU_EN_DSS_MASK (1 << 5)
288#define OMAP3430_PM_WKDEP_MPU_EN_IVA2_SHIFT 2 81#define OMAP3430_PM_WKDEP_MPU_EN_IVA2_SHIFT 2
289#define OMAP3430_PM_WKDEP_MPU_EN_IVA2_MASK (1 << 2)
290
291/* PM_EVGENCTRL_MPU */
292#define OMAP3430_OFFLOADMODE_SHIFT 3
293#define OMAP3430_OFFLOADMODE_MASK (0x3 << 3)
294#define OMAP3430_ONLOADMODE_SHIFT 1
295#define OMAP3430_ONLOADMODE_MASK (0x3 << 1)
296#define OMAP3430_ENABLE_MASK (1 << 0)
297
298/* PM_EVGENONTIM_MPU */
299#define OMAP3430_ONTIMEVAL_SHIFT 0
300#define OMAP3430_ONTIMEVAL_MASK (0xffffffff << 0)
301
302/* PM_EVGENOFFTIM_MPU */
303#define OMAP3430_OFFTIMEVAL_SHIFT 0
304#define OMAP3430_OFFTIMEVAL_MASK (0xffffffff << 0)
305
306/* PM_PWSTCTRL_MPU specific bits */
307#define OMAP3430_L2CACHEONSTATE_SHIFT 16
308#define OMAP3430_L2CACHEONSTATE_MASK (0x3 << 16)
309#define OMAP3430_L2CACHERETSTATE_MASK (1 << 8)
310#define OMAP3430_LOGICL1CACHERETSTATE_MASK (1 << 2)
311
312/* PM_PWSTST_MPU specific bits */
313#define OMAP3430_L2CACHESTATEST_SHIFT 6
314#define OMAP3430_L2CACHESTATEST_MASK (0x3 << 6)
315#define OMAP3430_LOGICL1CACHESTATEST_MASK (1 << 2)
316
317/* PM_PREPWSTST_MPU specific bits */
318#define OMAP3430_LASTL2CACHESTATEENTERED_SHIFT 6
319#define OMAP3430_LASTL2CACHESTATEENTERED_MASK (0x3 << 6)
320#define OMAP3430_LASTLOGICL1CACHESTATEENTERED_MASK (1 << 2)
321
322/* RM_RSTCTRL_CORE */
323#define OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK (1 << 1) 82#define OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK (1 << 1)
324#define OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST_MASK (1 << 0) 83#define OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST_MASK (1 << 0)
325
326/* RM_RSTST_CORE specific bits */
327#define OMAP3430_MODEM_SECURITY_VIOL_RST_MASK (1 << 10)
328#define OMAP3430_RM_RSTST_CORE_MODEM_SW_RSTPWRON_MASK (1 << 9)
329#define OMAP3430_RM_RSTST_CORE_MODEM_SW_RST_MASK (1 << 8)
330
331/* PM_WKEN1_CORE specific bits */
332
333/* PM_MPUGRPSEL1_CORE specific bits */
334#define OMAP3430_GRPSEL_FSHOSTUSB_MASK (1 << 5)
335
336/* PM_IVA2GRPSEL1_CORE specific bits */
337
338/* PM_WKST1_CORE specific bits */
339
340/* PM_PWSTCTRL_CORE specific bits */
341#define OMAP3430_MEM2ONSTATE_SHIFT 18
342#define OMAP3430_MEM2ONSTATE_MASK (0x3 << 18)
343#define OMAP3430_MEM1ONSTATE_SHIFT 16
344#define OMAP3430_MEM1ONSTATE_MASK (0x3 << 16)
345#define OMAP3430_MEM2RETSTATE_MASK (1 << 9)
346#define OMAP3430_MEM1RETSTATE_MASK (1 << 8)
347
348/* PM_PWSTST_CORE specific bits */
349#define OMAP3430_MEM2STATEST_SHIFT 6
350#define OMAP3430_MEM2STATEST_MASK (0x3 << 6)
351#define OMAP3430_MEM1STATEST_SHIFT 4
352#define OMAP3430_MEM1STATEST_MASK (0x3 << 4)
353
354/* PM_PREPWSTST_CORE specific bits */
355#define OMAP3430_LASTMEM2STATEENTERED_SHIFT 6
356#define OMAP3430_LASTMEM2STATEENTERED_MASK (0x3 << 6) 84#define OMAP3430_LASTMEM2STATEENTERED_MASK (0x3 << 6)
357#define OMAP3430_LASTMEM1STATEENTERED_SHIFT 4
358#define OMAP3430_LASTMEM1STATEENTERED_MASK (0x3 << 4) 85#define OMAP3430_LASTMEM1STATEENTERED_MASK (0x3 << 4)
359
360/* RM_RSTST_GFX specific bits */
361
362/* PM_WKDEP_GFX specific bits */
363#define OMAP3430_PM_WKDEP_GFX_EN_IVA2_MASK (1 << 2)
364
365/* PM_PWSTCTRL_GFX specific bits */
366
367/* PM_PWSTST_GFX specific bits */
368
369/* PM_PREPWSTST_GFX specific bits */
370
371/* PM_WKEN_WKUP specific bits */
372#define OMAP3430_EN_IO_CHAIN_MASK (1 << 16) 86#define OMAP3430_EN_IO_CHAIN_MASK (1 << 16)
373#define OMAP3430_EN_IO_MASK (1 << 8) 87#define OMAP3430_EN_IO_MASK (1 << 8)
374#define OMAP3430_EN_GPIO1_MASK (1 << 3) 88#define OMAP3430_EN_GPIO1_MASK (1 << 3)
375
376/* PM_MPUGRPSEL_WKUP specific bits */
377
378/* PM_IVA2GRPSEL_WKUP specific bits */
379
380/* PM_WKST_WKUP specific bits */
381#define OMAP3430_ST_IO_CHAIN_MASK (1 << 16) 89#define OMAP3430_ST_IO_CHAIN_MASK (1 << 16)
382#define OMAP3430_ST_IO_MASK (1 << 8) 90#define OMAP3430_ST_IO_MASK (1 << 8)
383
384/* PRM_CLKSEL */
385#define OMAP3430_SYS_CLKIN_SEL_SHIFT 0 91#define OMAP3430_SYS_CLKIN_SEL_SHIFT 0
386#define OMAP3430_SYS_CLKIN_SEL_MASK (0x7 << 0)
387#define OMAP3430_SYS_CLKIN_SEL_WIDTH 3 92#define OMAP3430_SYS_CLKIN_SEL_WIDTH 3
388
389/* PRM_CLKOUT_CTRL */
390#define OMAP3430_CLKOUT_EN_MASK (1 << 7)
391#define OMAP3430_CLKOUT_EN_SHIFT 7 93#define OMAP3430_CLKOUT_EN_SHIFT 7
392
393/* RM_RSTST_DSS specific bits */
394
395/* PM_WKEN_DSS */
396#define OMAP3430_PM_WKEN_DSS_EN_DSS_MASK (1 << 0) 94#define OMAP3430_PM_WKEN_DSS_EN_DSS_MASK (1 << 0)
397
398/* PM_WKDEP_DSS specific bits */
399#define OMAP3430_PM_WKDEP_DSS_EN_IVA2_MASK (1 << 2)
400
401/* PM_PWSTCTRL_DSS specific bits */
402
403/* PM_PWSTST_DSS specific bits */
404
405/* PM_PREPWSTST_DSS specific bits */
406
407/* RM_RSTST_CAM specific bits */
408
409/* PM_WKDEP_CAM specific bits */
410#define OMAP3430_PM_WKDEP_CAM_EN_IVA2_MASK (1 << 2)
411
412/* PM_PWSTCTRL_CAM specific bits */
413
414/* PM_PWSTST_CAM specific bits */
415
416/* PM_PREPWSTST_CAM specific bits */
417
418/* PM_PWSTCTRL_USBHOST specific bits */
419#define OMAP3430ES2_SAVEANDRESTORE_SHIFT 4 95#define OMAP3430ES2_SAVEANDRESTORE_SHIFT 4
420
421/* RM_RSTST_PER specific bits */
422
423/* PM_WKEN_PER specific bits */
424
425/* PM_MPUGRPSEL_PER specific bits */
426
427/* PM_IVA2GRPSEL_PER specific bits */
428
429/* PM_WKST_PER specific bits */
430
431/* PM_WKDEP_PER specific bits */
432#define OMAP3430_PM_WKDEP_PER_EN_IVA2_MASK (1 << 2)
433
434/* PM_PWSTCTRL_PER specific bits */
435
436/* PM_PWSTST_PER specific bits */
437
438/* PM_PREPWSTST_PER specific bits */
439
440/* RM_RSTST_EMU specific bits */
441
442/* PM_PWSTST_EMU specific bits */
443
444/* PRM_VC_SMPS_SA */
445#define OMAP3430_PRM_VC_SMPS_SA_SA1_SHIFT 16 96#define OMAP3430_PRM_VC_SMPS_SA_SA1_SHIFT 16
446#define OMAP3430_PRM_VC_SMPS_SA_SA1_MASK (0x7f << 16) 97#define OMAP3430_PRM_VC_SMPS_SA_SA1_MASK (0x7f << 16)
447#define OMAP3430_PRM_VC_SMPS_SA_SA0_SHIFT 0 98#define OMAP3430_PRM_VC_SMPS_SA_SA0_SHIFT 0
448#define OMAP3430_PRM_VC_SMPS_SA_SA0_MASK (0x7f << 0) 99#define OMAP3430_PRM_VC_SMPS_SA_SA0_MASK (0x7f << 0)
449
450/* PRM_VC_SMPS_VOL_RA */
451#define OMAP3430_VOLRA1_SHIFT 16
452#define OMAP3430_VOLRA1_MASK (0xff << 16) 100#define OMAP3430_VOLRA1_MASK (0xff << 16)
453#define OMAP3430_VOLRA0_SHIFT 0
454#define OMAP3430_VOLRA0_MASK (0xff << 0) 101#define OMAP3430_VOLRA0_MASK (0xff << 0)
455
456/* PRM_VC_SMPS_CMD_RA */
457#define OMAP3430_CMDRA1_SHIFT 16
458#define OMAP3430_CMDRA1_MASK (0xff << 16) 102#define OMAP3430_CMDRA1_MASK (0xff << 16)
459#define OMAP3430_CMDRA0_SHIFT 0
460#define OMAP3430_CMDRA0_MASK (0xff << 0) 103#define OMAP3430_CMDRA0_MASK (0xff << 0)
461
462/* PRM_VC_CMD_VAL_0 specific bits */
463#define OMAP3430_VC_CMD_ON_SHIFT 24 104#define OMAP3430_VC_CMD_ON_SHIFT 24
464#define OMAP3430_VC_CMD_ON_MASK (0xFF << 24) 105#define OMAP3430_VC_CMD_ON_MASK (0xFF << 24)
465#define OMAP3430_VC_CMD_ONLP_SHIFT 16 106#define OMAP3430_VC_CMD_ONLP_SHIFT 16
466#define OMAP3430_VC_CMD_ONLP_MASK (0xFF << 16)
467#define OMAP3430_VC_CMD_RET_SHIFT 8 107#define OMAP3430_VC_CMD_RET_SHIFT 8
468#define OMAP3430_VC_CMD_RET_MASK (0xFF << 8)
469#define OMAP3430_VC_CMD_OFF_SHIFT 0 108#define OMAP3430_VC_CMD_OFF_SHIFT 0
470#define OMAP3430_VC_CMD_OFF_MASK (0xFF << 0)
471
472/* PRM_VC_CMD_VAL_1 specific bits */
473
474/* PRM_VC_CH_CONF */
475#define OMAP3430_CMD1_MASK (1 << 20)
476#define OMAP3430_RACEN1_MASK (1 << 19)
477#define OMAP3430_RAC1_MASK (1 << 18)
478#define OMAP3430_RAV1_MASK (1 << 17)
479#define OMAP3430_PRM_VC_CH_CONF_SA1_MASK (1 << 16)
480#define OMAP3430_CMD0_MASK (1 << 4)
481#define OMAP3430_RACEN0_MASK (1 << 3)
482#define OMAP3430_RAC0_MASK (1 << 2)
483#define OMAP3430_RAV0_MASK (1 << 1)
484#define OMAP3430_PRM_VC_CH_CONF_SA0_MASK (1 << 0)
485
486/* PRM_VC_I2C_CFG */
487#define OMAP3430_HSMASTER_MASK (1 << 5)
488#define OMAP3430_SREN_MASK (1 << 4)
489#define OMAP3430_HSEN_MASK (1 << 3) 109#define OMAP3430_HSEN_MASK (1 << 3)
490#define OMAP3430_MCODE_SHIFT 0
491#define OMAP3430_MCODE_MASK (0x7 << 0) 110#define OMAP3430_MCODE_MASK (0x7 << 0)
492
493/* PRM_VC_BYPASS_VAL */
494#define OMAP3430_VALID_MASK (1 << 24) 111#define OMAP3430_VALID_MASK (1 << 24)
495#define OMAP3430_DATA_SHIFT 16 112#define OMAP3430_DATA_SHIFT 16
496#define OMAP3430_DATA_MASK (0xff << 16)
497#define OMAP3430_REGADDR_SHIFT 8 113#define OMAP3430_REGADDR_SHIFT 8
498#define OMAP3430_REGADDR_MASK (0xff << 8)
499#define OMAP3430_SLAVEADDR_SHIFT 0 114#define OMAP3430_SLAVEADDR_SHIFT 0
500#define OMAP3430_SLAVEADDR_MASK (0x7f << 0)
501
502/* PRM_RSTCTRL */
503#define OMAP3430_RST_DPLL3_MASK (1 << 2)
504#define OMAP3430_RST_GS_MASK (1 << 1)
505
506/* PRM_RSTTIME */
507#define OMAP3430_RSTTIME2_SHIFT 8
508#define OMAP3430_RSTTIME2_MASK (0x1f << 8)
509#define OMAP3430_RSTTIME1_SHIFT 0
510#define OMAP3430_RSTTIME1_MASK (0xff << 0)
511
512/* PRM_RSTST */
513#define OMAP3430_ICECRUSHER_RST_SHIFT 10 115#define OMAP3430_ICECRUSHER_RST_SHIFT 10
514#define OMAP3430_ICECRUSHER_RST_MASK (1 << 10)
515#define OMAP3430_ICEPICK_RST_SHIFT 9 116#define OMAP3430_ICEPICK_RST_SHIFT 9
516#define OMAP3430_ICEPICK_RST_MASK (1 << 9)
517#define OMAP3430_VDD2_VOLTAGE_MANAGER_RST_SHIFT 8 117#define OMAP3430_VDD2_VOLTAGE_MANAGER_RST_SHIFT 8
518#define OMAP3430_VDD2_VOLTAGE_MANAGER_RST_MASK (1 << 8)
519#define OMAP3430_VDD1_VOLTAGE_MANAGER_RST_SHIFT 7 118#define OMAP3430_VDD1_VOLTAGE_MANAGER_RST_SHIFT 7
520#define OMAP3430_VDD1_VOLTAGE_MANAGER_RST_MASK (1 << 7)
521#define OMAP3430_EXTERNAL_WARM_RST_SHIFT 6 119#define OMAP3430_EXTERNAL_WARM_RST_SHIFT 6
522#define OMAP3430_EXTERNAL_WARM_RST_MASK (1 << 6)
523#define OMAP3430_SECURE_WD_RST_SHIFT 5 120#define OMAP3430_SECURE_WD_RST_SHIFT 5
524#define OMAP3430_SECURE_WD_RST_MASK (1 << 5)
525#define OMAP3430_MPU_WD_RST_SHIFT 4 121#define OMAP3430_MPU_WD_RST_SHIFT 4
526#define OMAP3430_MPU_WD_RST_MASK (1 << 4)
527#define OMAP3430_SECURITY_VIOL_RST_SHIFT 3 122#define OMAP3430_SECURITY_VIOL_RST_SHIFT 3
528#define OMAP3430_SECURITY_VIOL_RST_MASK (1 << 3)
529#define OMAP3430_GLOBAL_SW_RST_SHIFT 1 123#define OMAP3430_GLOBAL_SW_RST_SHIFT 1
530#define OMAP3430_GLOBAL_SW_RST_MASK (1 << 1)
531#define OMAP3430_GLOBAL_COLD_RST_SHIFT 0 124#define OMAP3430_GLOBAL_COLD_RST_SHIFT 0
532#define OMAP3430_GLOBAL_COLD_RST_MASK (1 << 0) 125#define OMAP3430_GLOBAL_COLD_RST_MASK (1 << 0)
533
534/* PRM_VOLTCTRL */
535#define OMAP3430_SEL_VMODE_MASK (1 << 4)
536#define OMAP3430_SEL_OFF_MASK (1 << 3) 126#define OMAP3430_SEL_OFF_MASK (1 << 3)
537#define OMAP3430_AUTO_OFF_MASK (1 << 2) 127#define OMAP3430_AUTO_OFF_MASK (1 << 2)
538#define OMAP3430_AUTO_RET_MASK (1 << 1)
539#define OMAP3430_AUTO_SLEEP_MASK (1 << 0)
540
541/* PRM_SRAM_PCHARGE */
542#define OMAP3430_PCHARGE_TIME_SHIFT 0
543#define OMAP3430_PCHARGE_TIME_MASK (0xff << 0)
544
545/* PRM_CLKSRC_CTRL */
546#define OMAP3430_SYSCLKDIV_SHIFT 6
547#define OMAP3430_SYSCLKDIV_MASK (0x3 << 6)
548#define OMAP3430_AUTOEXTCLKMODE_SHIFT 3
549#define OMAP3430_AUTOEXTCLKMODE_MASK (0x3 << 3)
550#define OMAP3430_SYSCLKSEL_SHIFT 0
551#define OMAP3430_SYSCLKSEL_MASK (0x3 << 0)
552
553/* PRM_VOLTSETUP1 */
554#define OMAP3430_SETUP_TIME2_SHIFT 16
555#define OMAP3430_SETUP_TIME2_MASK (0xffff << 16) 128#define OMAP3430_SETUP_TIME2_MASK (0xffff << 16)
556#define OMAP3430_SETUP_TIME1_SHIFT 0
557#define OMAP3430_SETUP_TIME1_MASK (0xffff << 0) 129#define OMAP3430_SETUP_TIME1_MASK (0xffff << 0)
558
559/* PRM_VOLTOFFSET */
560#define OMAP3430_OFFSET_TIME_SHIFT 0
561#define OMAP3430_OFFSET_TIME_MASK (0xffff << 0)
562
563/* PRM_CLKSETUP */
564#define OMAP3430_SETUP_TIME_SHIFT 0
565#define OMAP3430_SETUP_TIME_MASK (0xffff << 0)
566
567/* PRM_POLCTRL */
568#define OMAP3430_OFFMODE_POL_MASK (1 << 3)
569#define OMAP3430_CLKOUT_POL_MASK (1 << 2)
570#define OMAP3430_CLKREQ_POL_MASK (1 << 1)
571#define OMAP3430_EXTVOL_POL_MASK (1 << 0)
572
573/* PRM_VOLTSETUP2 */
574#define OMAP3430_OFFMODESETUPTIME_SHIFT 0
575#define OMAP3430_OFFMODESETUPTIME_MASK (0xffff << 0)
576
577/* PRM_VP1_CONFIG specific bits */
578
579/* PRM_VP1_VSTEPMIN specific bits */
580
581/* PRM_VP1_VSTEPMAX specific bits */
582
583/* PRM_VP1_VLIMITTO specific bits */
584
585/* PRM_VP1_VOLTAGE specific bits */
586
587/* PRM_VP1_STATUS specific bits */
588
589/* PRM_VP2_CONFIG specific bits */
590
591/* PRM_VP2_VSTEPMIN specific bits */
592
593/* PRM_VP2_VSTEPMAX specific bits */
594
595/* PRM_VP2_VLIMITTO specific bits */
596
597/* PRM_VP2_VOLTAGE specific bits */
598
599/* PRM_VP2_STATUS specific bits */
600
601/* RM_RSTST_NEON specific bits */
602
603/* PM_WKDEP_NEON specific bits */
604
605/* PM_PWSTCTRL_NEON specific bits */
606
607/* PM_PWSTST_NEON specific bits */
608
609/* PM_PREPWSTST_NEON specific bits */
610
611#endif 130#endif
diff --git a/arch/arm/mach-omap2/prm-regbits-44xx.h b/arch/arm/mach-omap2/prm-regbits-44xx.h
index 3cb247bebdaa..b1c7a33e00e7 100644
--- a/arch/arm/mach-omap2/prm-regbits-44xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-44xx.h
@@ -22,2306 +22,80 @@
22#ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_44XX_H 22#ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_44XX_H
23#define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_44XX_H 23#define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_44XX_H
24 24
25
26/*
27 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
28 * PRM_LDO_SRAM_MPU_SETUP
29 */
30#define OMAP4430_ABBOFF_ACT_EXPORT_SHIFT 1
31#define OMAP4430_ABBOFF_ACT_EXPORT_MASK (1 << 1)
32
33/*
34 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
35 * PRM_LDO_SRAM_MPU_SETUP
36 */
37#define OMAP4430_ABBOFF_SLEEP_EXPORT_SHIFT 2
38#define OMAP4430_ABBOFF_SLEEP_EXPORT_MASK (1 << 2)
39
40/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
41#define OMAP4430_ABB_IVA_DONE_EN_SHIFT 31
42#define OMAP4430_ABB_IVA_DONE_EN_MASK (1 << 31)
43
44/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
45#define OMAP4430_ABB_IVA_DONE_ST_SHIFT 31
46#define OMAP4430_ABB_IVA_DONE_ST_MASK (1 << 31)
47
48/* Used by PRM_IRQENABLE_MPU_2 */
49#define OMAP4430_ABB_MPU_DONE_EN_SHIFT 7
50#define OMAP4430_ABB_MPU_DONE_EN_MASK (1 << 7)
51
52/* Used by PRM_IRQSTATUS_MPU_2 */
53#define OMAP4430_ABB_MPU_DONE_ST_SHIFT 7
54#define OMAP4430_ABB_MPU_DONE_ST_MASK (1 << 7)
55
56/* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */
57#define OMAP4430_ACTIVE_FBB_SEL_SHIFT 2
58#define OMAP4430_ACTIVE_FBB_SEL_MASK (1 << 2)
59
60/* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */
61#define OMAP4430_ACTIVE_RBB_SEL_SHIFT 1
62#define OMAP4430_ACTIVE_RBB_SEL_MASK (1 << 1)
63
64/* Used by PM_ABE_PWRSTCTRL */
65#define OMAP4430_AESSMEM_ONSTATE_SHIFT 16
66#define OMAP4430_AESSMEM_ONSTATE_MASK (0x3 << 16)
67
68/* Used by PM_ABE_PWRSTCTRL */
69#define OMAP4430_AESSMEM_RETSTATE_SHIFT 8
70#define OMAP4430_AESSMEM_RETSTATE_MASK (1 << 8)
71
72/* Used by PM_ABE_PWRSTST */
73#define OMAP4430_AESSMEM_STATEST_SHIFT 4
74#define OMAP4430_AESSMEM_STATEST_MASK (0x3 << 4)
75
76/*
77 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
78 * PRM_LDO_SRAM_MPU_SETUP
79 */
80#define OMAP4430_AIPOFF_SHIFT 8
81#define OMAP4430_AIPOFF_MASK (1 << 8)
82
83/* Used by PRM_VOLTCTRL */
84#define OMAP4430_AUTO_CTRL_VDD_CORE_L_SHIFT 0
85#define OMAP4430_AUTO_CTRL_VDD_CORE_L_MASK (0x3 << 0)
86
87/* Used by PRM_VOLTCTRL */
88#define OMAP4430_AUTO_CTRL_VDD_IVA_L_SHIFT 4
89#define OMAP4430_AUTO_CTRL_VDD_IVA_L_MASK (0x3 << 4)
90
91/* Used by PRM_VOLTCTRL */
92#define OMAP4430_AUTO_CTRL_VDD_MPU_L_SHIFT 2
93#define OMAP4430_AUTO_CTRL_VDD_MPU_L_MASK (0x3 << 2)
94
95/* Used by PRM_VC_ERRST */
96#define OMAP4430_BYPS_RA_ERR_SHIFT 25
97#define OMAP4430_BYPS_RA_ERR_MASK (1 << 25)
98
99/* Used by PRM_VC_ERRST */
100#define OMAP4430_BYPS_SA_ERR_SHIFT 24
101#define OMAP4430_BYPS_SA_ERR_MASK (1 << 24)
102
103/* Used by PRM_VC_ERRST */
104#define OMAP4430_BYPS_TIMEOUT_ERR_SHIFT 26
105#define OMAP4430_BYPS_TIMEOUT_ERR_MASK (1 << 26)
106
107/* Used by PRM_RSTST */
108#define OMAP4430_C2C_RST_SHIFT 10 25#define OMAP4430_C2C_RST_SHIFT 10
109#define OMAP4430_C2C_RST_MASK (1 << 10)
110
111/* Used by PM_CAM_PWRSTCTRL */
112#define OMAP4430_CAM_MEM_ONSTATE_SHIFT 16
113#define OMAP4430_CAM_MEM_ONSTATE_MASK (0x3 << 16)
114
115/* Used by PM_CAM_PWRSTST */
116#define OMAP4430_CAM_MEM_STATEST_SHIFT 4
117#define OMAP4430_CAM_MEM_STATEST_MASK (0x3 << 4)
118
119/* Used by PRM_CLKREQCTRL */
120#define OMAP4430_CLKREQ_COND_SHIFT 0
121#define OMAP4430_CLKREQ_COND_MASK (0x7 << 0)
122
123/* Used by PRM_VC_VAL_SMPS_RA_CMD */
124#define OMAP4430_CMDRA_VDD_CORE_L_SHIFT 0
125#define OMAP4430_CMDRA_VDD_CORE_L_MASK (0xff << 0) 26#define OMAP4430_CMDRA_VDD_CORE_L_MASK (0xff << 0)
126
127/* Used by PRM_VC_VAL_SMPS_RA_CMD */
128#define OMAP4430_CMDRA_VDD_IVA_L_SHIFT 8
129#define OMAP4430_CMDRA_VDD_IVA_L_MASK (0xff << 8) 27#define OMAP4430_CMDRA_VDD_IVA_L_MASK (0xff << 8)
130
131/* Used by PRM_VC_VAL_SMPS_RA_CMD */
132#define OMAP4430_CMDRA_VDD_MPU_L_SHIFT 16
133#define OMAP4430_CMDRA_VDD_MPU_L_MASK (0xff << 16) 28#define OMAP4430_CMDRA_VDD_MPU_L_MASK (0xff << 16)
134
135/* Used by PRM_VC_CFG_CHANNEL */
136#define OMAP4430_CMD_VDD_CORE_L_SHIFT 4
137#define OMAP4430_CMD_VDD_CORE_L_MASK (1 << 4)
138
139/* Used by PRM_VC_CFG_CHANNEL */
140#define OMAP4430_CMD_VDD_IVA_L_SHIFT 12
141#define OMAP4430_CMD_VDD_IVA_L_MASK (1 << 12)
142
143/* Used by PRM_VC_CFG_CHANNEL */
144#define OMAP4430_CMD_VDD_MPU_L_SHIFT 17
145#define OMAP4430_CMD_VDD_MPU_L_MASK (1 << 17)
146
147/* Used by PM_CORE_PWRSTCTRL */
148#define OMAP4430_CORE_OCMRAM_ONSTATE_SHIFT 18
149#define OMAP4430_CORE_OCMRAM_ONSTATE_MASK (0x3 << 18)
150
151/* Used by PM_CORE_PWRSTCTRL */
152#define OMAP4430_CORE_OCMRAM_RETSTATE_SHIFT 9
153#define OMAP4430_CORE_OCMRAM_RETSTATE_MASK (1 << 9)
154
155/* Used by PM_CORE_PWRSTST */
156#define OMAP4430_CORE_OCMRAM_STATEST_SHIFT 6
157#define OMAP4430_CORE_OCMRAM_STATEST_MASK (0x3 << 6)
158
159/* Used by PM_CORE_PWRSTCTRL */
160#define OMAP4430_CORE_OTHER_BANK_ONSTATE_SHIFT 16
161#define OMAP4430_CORE_OTHER_BANK_ONSTATE_MASK (0x3 << 16)
162
163/* Used by PM_CORE_PWRSTCTRL */
164#define OMAP4430_CORE_OTHER_BANK_RETSTATE_SHIFT 8
165#define OMAP4430_CORE_OTHER_BANK_RETSTATE_MASK (1 << 8)
166
167/* Used by PM_CORE_PWRSTST */
168#define OMAP4430_CORE_OTHER_BANK_STATEST_SHIFT 4
169#define OMAP4430_CORE_OTHER_BANK_STATEST_MASK (0x3 << 4)
170
171/* Used by REVISION_PRM */
172#define OMAP4430_CUSTOM_SHIFT 6
173#define OMAP4430_CUSTOM_MASK (0x3 << 6)
174
175/* Used by PRM_VC_VAL_BYPASS */
176#define OMAP4430_DATA_SHIFT 16 29#define OMAP4430_DATA_SHIFT 16
177#define OMAP4430_DATA_MASK (0xff << 16)
178
179/* Used by PRM_DEVICE_OFF_CTRL */
180#define OMAP4430_DEVICE_OFF_ENABLE_SHIFT 0
181#define OMAP4430_DEVICE_OFF_ENABLE_MASK (1 << 0)
182
183/* Used by PRM_VC_CFG_I2C_MODE */
184#define OMAP4430_DFILTEREN_SHIFT 6
185#define OMAP4430_DFILTEREN_MASK (1 << 6)
186
187/*
188 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
189 * PRM_LDO_SRAM_MPU_SETUP, PRM_SRAM_WKUP_SETUP
190 */
191#define OMAP4430_DISABLE_RTA_EXPORT_SHIFT 0
192#define OMAP4430_DISABLE_RTA_EXPORT_MASK (1 << 0)
193
194/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU, PRM_IRQENABLE_TESLA */
195#define OMAP4430_DPLL_ABE_RECAL_EN_SHIFT 4
196#define OMAP4430_DPLL_ABE_RECAL_EN_MASK (1 << 4)
197
198/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU, PRM_IRQSTATUS_TESLA */
199#define OMAP4430_DPLL_ABE_RECAL_ST_SHIFT 4
200#define OMAP4430_DPLL_ABE_RECAL_ST_MASK (1 << 4)
201
202/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
203#define OMAP4430_DPLL_CORE_RECAL_EN_SHIFT 0
204#define OMAP4430_DPLL_CORE_RECAL_EN_MASK (1 << 0)
205
206/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
207#define OMAP4430_DPLL_CORE_RECAL_ST_SHIFT 0
208#define OMAP4430_DPLL_CORE_RECAL_ST_MASK (1 << 0)
209
210/* Used by PRM_IRQENABLE_MPU */
211#define OMAP4430_DPLL_DDRPHY_RECAL_EN_SHIFT 6
212#define OMAP4430_DPLL_DDRPHY_RECAL_EN_MASK (1 << 6)
213
214/* Used by PRM_IRQSTATUS_MPU */
215#define OMAP4430_DPLL_DDRPHY_RECAL_ST_SHIFT 6
216#define OMAP4430_DPLL_DDRPHY_RECAL_ST_MASK (1 << 6)
217
218/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU, PRM_IRQENABLE_TESLA */
219#define OMAP4430_DPLL_IVA_RECAL_EN_SHIFT 2
220#define OMAP4430_DPLL_IVA_RECAL_EN_MASK (1 << 2)
221
222/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU, PRM_IRQSTATUS_TESLA */
223#define OMAP4430_DPLL_IVA_RECAL_ST_SHIFT 2
224#define OMAP4430_DPLL_IVA_RECAL_ST_MASK (1 << 2)
225
226/* Used by PRM_IRQENABLE_MPU */
227#define OMAP4430_DPLL_MPU_RECAL_EN_SHIFT 1
228#define OMAP4430_DPLL_MPU_RECAL_EN_MASK (1 << 1)
229
230/* Used by PRM_IRQSTATUS_MPU */
231#define OMAP4430_DPLL_MPU_RECAL_ST_SHIFT 1
232#define OMAP4430_DPLL_MPU_RECAL_ST_MASK (1 << 1)
233
234/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
235#define OMAP4430_DPLL_PER_RECAL_EN_SHIFT 3
236#define OMAP4430_DPLL_PER_RECAL_EN_MASK (1 << 3)
237
238/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
239#define OMAP4430_DPLL_PER_RECAL_ST_SHIFT 3
240#define OMAP4430_DPLL_PER_RECAL_ST_MASK (1 << 3)
241
242/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
243#define OMAP4430_DPLL_UNIPRO_RECAL_EN_SHIFT 7
244#define OMAP4430_DPLL_UNIPRO_RECAL_EN_MASK (1 << 7)
245
246/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
247#define OMAP4430_DPLL_UNIPRO_RECAL_ST_SHIFT 7
248#define OMAP4430_DPLL_UNIPRO_RECAL_ST_MASK (1 << 7)
249
250/* Used by PM_DSS_PWRSTCTRL */
251#define OMAP4430_DSS_MEM_ONSTATE_SHIFT 16
252#define OMAP4430_DSS_MEM_ONSTATE_MASK (0x3 << 16)
253
254/* Used by PM_DSS_PWRSTCTRL */
255#define OMAP4430_DSS_MEM_RETSTATE_SHIFT 8
256#define OMAP4430_DSS_MEM_RETSTATE_MASK (1 << 8)
257
258/* Used by PM_DSS_PWRSTST */
259#define OMAP4430_DSS_MEM_STATEST_SHIFT 4
260#define OMAP4430_DSS_MEM_STATEST_MASK (0x3 << 4)
261
262/* Used by PM_CORE_PWRSTCTRL */
263#define OMAP4430_DUCATI_L2RAM_ONSTATE_SHIFT 20
264#define OMAP4430_DUCATI_L2RAM_ONSTATE_MASK (0x3 << 20)
265
266/* Used by PM_CORE_PWRSTCTRL */
267#define OMAP4430_DUCATI_L2RAM_RETSTATE_SHIFT 10
268#define OMAP4430_DUCATI_L2RAM_RETSTATE_MASK (1 << 10)
269
270/* Used by PM_CORE_PWRSTST */
271#define OMAP4430_DUCATI_L2RAM_STATEST_SHIFT 8
272#define OMAP4430_DUCATI_L2RAM_STATEST_MASK (0x3 << 8)
273
274/* Used by PM_CORE_PWRSTCTRL */
275#define OMAP4430_DUCATI_UNICACHE_ONSTATE_SHIFT 22
276#define OMAP4430_DUCATI_UNICACHE_ONSTATE_MASK (0x3 << 22)
277
278/* Used by PM_CORE_PWRSTCTRL */
279#define OMAP4430_DUCATI_UNICACHE_RETSTATE_SHIFT 11
280#define OMAP4430_DUCATI_UNICACHE_RETSTATE_MASK (1 << 11)
281
282/* Used by PM_CORE_PWRSTST */
283#define OMAP4430_DUCATI_UNICACHE_STATEST_SHIFT 10
284#define OMAP4430_DUCATI_UNICACHE_STATEST_MASK (0x3 << 10)
285
286/* Used by PRM_DEVICE_OFF_CTRL */
287#define OMAP4460_EMIF1_OFFWKUP_DISABLE_SHIFT 8
288#define OMAP4460_EMIF1_OFFWKUP_DISABLE_MASK (1 << 8)
289
290/* Used by PRM_DEVICE_OFF_CTRL */
291#define OMAP4460_EMIF2_OFFWKUP_DISABLE_SHIFT 9
292#define OMAP4460_EMIF2_OFFWKUP_DISABLE_MASK (1 << 9)
293
294/* Used by RM_MPU_RSTST */
295#define OMAP4430_EMULATION_RST_SHIFT 0
296#define OMAP4430_EMULATION_RST_MASK (1 << 0)
297
298/* Used by RM_DUCATI_RSTST */
299#define OMAP4430_EMULATION_RST1ST_SHIFT 3
300#define OMAP4430_EMULATION_RST1ST_MASK (1 << 3)
301
302/* Used by RM_DUCATI_RSTST */
303#define OMAP4430_EMULATION_RST2ST_SHIFT 4
304#define OMAP4430_EMULATION_RST2ST_MASK (1 << 4)
305
306/* Used by RM_IVAHD_RSTST */
307#define OMAP4430_EMULATION_SEQ1_RST1ST_SHIFT 3
308#define OMAP4430_EMULATION_SEQ1_RST1ST_MASK (1 << 3)
309
310/* Used by RM_IVAHD_RSTST */
311#define OMAP4430_EMULATION_SEQ2_RST2ST_SHIFT 4
312#define OMAP4430_EMULATION_SEQ2_RST2ST_MASK (1 << 4)
313
314/* Used by PM_EMU_PWRSTCTRL */
315#define OMAP4430_EMU_BANK_ONSTATE_SHIFT 16
316#define OMAP4430_EMU_BANK_ONSTATE_MASK (0x3 << 16)
317
318/* Used by PM_EMU_PWRSTST */
319#define OMAP4430_EMU_BANK_STATEST_SHIFT 4
320#define OMAP4430_EMU_BANK_STATEST_MASK (0x3 << 4)
321
322/*
323 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
324 * PRM_LDO_SRAM_MPU_SETUP
325 */
326#define OMAP4430_ENFUNC1_EXPORT_SHIFT 3
327#define OMAP4430_ENFUNC1_EXPORT_MASK (1 << 3)
328
329/*
330 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
331 * PRM_LDO_SRAM_MPU_SETUP
332 */
333#define OMAP4430_ENFUNC3_EXPORT_SHIFT 5
334#define OMAP4430_ENFUNC3_EXPORT_MASK (1 << 5)
335
336/*
337 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
338 * PRM_LDO_SRAM_MPU_SETUP
339 */
340#define OMAP4430_ENFUNC4_SHIFT 6
341#define OMAP4430_ENFUNC4_MASK (1 << 6)
342
343/*
344 * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP,
345 * PRM_LDO_SRAM_MPU_SETUP
346 */
347#define OMAP4430_ENFUNC5_SHIFT 7
348#define OMAP4430_ENFUNC5_MASK (1 << 7)
349
350/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
351#define OMAP4430_ERRORGAIN_SHIFT 16
352#define OMAP4430_ERRORGAIN_MASK (0xff << 16) 30#define OMAP4430_ERRORGAIN_MASK (0xff << 16)
353
354/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
355#define OMAP4430_ERROROFFSET_SHIFT 24
356#define OMAP4430_ERROROFFSET_MASK (0xff << 24) 31#define OMAP4430_ERROROFFSET_MASK (0xff << 24)
357
358/* Used by PRM_RSTST */
359#define OMAP4430_EXTERNAL_WARM_RST_SHIFT 5 32#define OMAP4430_EXTERNAL_WARM_RST_SHIFT 5
360#define OMAP4430_EXTERNAL_WARM_RST_MASK (1 << 5)
361
362/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
363#define OMAP4430_FORCEUPDATE_SHIFT 1
364#define OMAP4430_FORCEUPDATE_MASK (1 << 1) 33#define OMAP4430_FORCEUPDATE_MASK (1 << 1)
365
366/* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_IVA_VOLTAGE, PRM_VP_MPU_VOLTAGE */
367#define OMAP4430_FORCEUPDATEWAIT_SHIFT 8
368#define OMAP4430_FORCEUPDATEWAIT_MASK (0xffffff << 8)
369
370/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_TESLA */
371#define OMAP4430_FORCEWKUP_EN_SHIFT 10
372#define OMAP4430_FORCEWKUP_EN_MASK (1 << 10)
373
374/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_TESLA */
375#define OMAP4430_FORCEWKUP_ST_SHIFT 10
376#define OMAP4430_FORCEWKUP_ST_MASK (1 << 10)
377
378/* Used by REVISION_PRM */
379#define OMAP4430_FUNC_SHIFT 16
380#define OMAP4430_FUNC_MASK (0xfff << 16)
381
382/* Used by PM_GFX_PWRSTCTRL */
383#define OMAP4430_GFX_MEM_ONSTATE_SHIFT 16
384#define OMAP4430_GFX_MEM_ONSTATE_MASK (0x3 << 16)
385
386/* Used by PM_GFX_PWRSTST */
387#define OMAP4430_GFX_MEM_STATEST_SHIFT 4
388#define OMAP4430_GFX_MEM_STATEST_MASK (0x3 << 4)
389
390/* Used by PRM_RSTST */
391#define OMAP4430_GLOBAL_COLD_RST_SHIFT 0 34#define OMAP4430_GLOBAL_COLD_RST_SHIFT 0
392#define OMAP4430_GLOBAL_COLD_RST_MASK (1 << 0)
393
394/* Used by PRM_RSTST */
395#define OMAP4430_GLOBAL_WARM_SW_RST_SHIFT 1 35#define OMAP4430_GLOBAL_WARM_SW_RST_SHIFT 1
396#define OMAP4430_GLOBAL_WARM_SW_RST_MASK (1 << 1)
397
398/* Used by PRM_IO_PMCTRL */
399#define OMAP4430_GLOBAL_WUEN_SHIFT 16
400#define OMAP4430_GLOBAL_WUEN_MASK (1 << 16) 36#define OMAP4430_GLOBAL_WUEN_MASK (1 << 16)
401
402/* Used by PRM_VC_CFG_I2C_MODE */
403#define OMAP4430_HSMCODE_SHIFT 0
404#define OMAP4430_HSMCODE_MASK (0x7 << 0) 37#define OMAP4430_HSMCODE_MASK (0x7 << 0)
405
406/* Used by PRM_VC_CFG_I2C_MODE */
407#define OMAP4430_HSMODEEN_SHIFT 3
408#define OMAP4430_HSMODEEN_MASK (1 << 3) 38#define OMAP4430_HSMODEEN_MASK (1 << 3)
409
410/* Used by PRM_VC_CFG_I2C_CLK */
411#define OMAP4430_HSSCLH_SHIFT 16
412#define OMAP4430_HSSCLH_MASK (0xff << 16)
413
414/* Used by PRM_VC_CFG_I2C_CLK */
415#define OMAP4430_HSSCLL_SHIFT 24 39#define OMAP4430_HSSCLL_SHIFT 24
416#define OMAP4430_HSSCLL_MASK (0xff << 24)
417
418/* Used by PM_IVAHD_PWRSTCTRL */
419#define OMAP4430_HWA_MEM_ONSTATE_SHIFT 16
420#define OMAP4430_HWA_MEM_ONSTATE_MASK (0x3 << 16)
421
422/* Used by PM_IVAHD_PWRSTCTRL */
423#define OMAP4430_HWA_MEM_RETSTATE_SHIFT 8
424#define OMAP4430_HWA_MEM_RETSTATE_MASK (1 << 8)
425
426/* Used by PM_IVAHD_PWRSTST */
427#define OMAP4430_HWA_MEM_STATEST_SHIFT 4
428#define OMAP4430_HWA_MEM_STATEST_MASK (0x3 << 4)
429
430/* Used by RM_MPU_RSTST */
431#define OMAP4430_ICECRUSHER_MPU_RST_SHIFT 1
432#define OMAP4430_ICECRUSHER_MPU_RST_MASK (1 << 1)
433
434/* Used by RM_DUCATI_RSTST */
435#define OMAP4430_ICECRUSHER_RST1ST_SHIFT 5
436#define OMAP4430_ICECRUSHER_RST1ST_MASK (1 << 5)
437
438/* Used by RM_DUCATI_RSTST */
439#define OMAP4430_ICECRUSHER_RST2ST_SHIFT 6
440#define OMAP4430_ICECRUSHER_RST2ST_MASK (1 << 6)
441
442/* Used by RM_IVAHD_RSTST */
443#define OMAP4430_ICECRUSHER_SEQ1_RST1ST_SHIFT 5
444#define OMAP4430_ICECRUSHER_SEQ1_RST1ST_MASK (1 << 5)
445
446/* Used by RM_IVAHD_RSTST */
447#define OMAP4430_ICECRUSHER_SEQ2_RST2ST_SHIFT 6
448#define OMAP4430_ICECRUSHER_SEQ2_RST2ST_MASK (1 << 6)
449
450/* Used by PRM_RSTST */
451#define OMAP4430_ICEPICK_RST_SHIFT 9 40#define OMAP4430_ICEPICK_RST_SHIFT 9
452#define OMAP4430_ICEPICK_RST_MASK (1 << 9)
453
454/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
455#define OMAP4430_INITVDD_SHIFT 2
456#define OMAP4430_INITVDD_MASK (1 << 2) 41#define OMAP4430_INITVDD_MASK (1 << 2)
457
458/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
459#define OMAP4430_INITVOLTAGE_SHIFT 8
460#define OMAP4430_INITVOLTAGE_MASK (0xff << 8) 42#define OMAP4430_INITVOLTAGE_MASK (0xff << 8)
461
462/*
463 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CEFUSE_PWRSTST, PM_CORE_PWRSTST,
464 * PM_DSS_PWRSTST, PM_EMU_PWRSTST, PM_GFX_PWRSTST, PM_IVAHD_PWRSTST,
465 * PM_L3INIT_PWRSTST, PM_L4PER_PWRSTST, PM_MPU_PWRSTST, PM_TESLA_PWRSTST
466 */
467#define OMAP4430_INTRANSITION_SHIFT 20
468#define OMAP4430_INTRANSITION_MASK (1 << 20)
469
470/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
471#define OMAP4430_IO_EN_SHIFT 9
472#define OMAP4430_IO_EN_MASK (1 << 9)
473
474/* Used by PRM_IO_PMCTRL */
475#define OMAP4430_IO_ON_STATUS_SHIFT 5
476#define OMAP4430_IO_ON_STATUS_MASK (1 << 5)
477
478/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
479#define OMAP4430_IO_ST_SHIFT 9
480#define OMAP4430_IO_ST_MASK (1 << 9)
481
482/* Used by PRM_IO_PMCTRL */
483#define OMAP4430_ISOCLK_OVERRIDE_SHIFT 0
484#define OMAP4430_ISOCLK_OVERRIDE_MASK (1 << 0)
485
486/* Used by PRM_IO_PMCTRL */
487#define OMAP4430_ISOCLK_STATUS_SHIFT 1
488#define OMAP4430_ISOCLK_STATUS_MASK (1 << 1)
489
490/* Used by PRM_IO_PMCTRL */
491#define OMAP4430_ISOOVR_EXTEND_SHIFT 4
492#define OMAP4430_ISOOVR_EXTEND_MASK (1 << 4)
493
494/* Used by PRM_IO_COUNT */
495#define OMAP4430_ISO_2_ON_TIME_SHIFT 0
496#define OMAP4430_ISO_2_ON_TIME_MASK (0xff << 0)
497
498/* Used by PM_L3INIT_PWRSTCTRL */
499#define OMAP4430_L3INIT_BANK1_ONSTATE_SHIFT 16
500#define OMAP4430_L3INIT_BANK1_ONSTATE_MASK (0x3 << 16)
501
502/* Used by PM_L3INIT_PWRSTCTRL */
503#define OMAP4430_L3INIT_BANK1_RETSTATE_SHIFT 8
504#define OMAP4430_L3INIT_BANK1_RETSTATE_MASK (1 << 8)
505
506/* Used by PM_L3INIT_PWRSTST */
507#define OMAP4430_L3INIT_BANK1_STATEST_SHIFT 4
508#define OMAP4430_L3INIT_BANK1_STATEST_MASK (0x3 << 4)
509
510/*
511 * Used by PM_ABE_PWRSTST, PM_CORE_PWRSTST, PM_IVAHD_PWRSTST,
512 * PM_L3INIT_PWRSTST, PM_L4PER_PWRSTST, PM_MPU_PWRSTST, PM_TESLA_PWRSTST
513 */
514#define OMAP4430_LASTPOWERSTATEENTERED_SHIFT 24 43#define OMAP4430_LASTPOWERSTATEENTERED_SHIFT 24
515#define OMAP4430_LASTPOWERSTATEENTERED_MASK (0x3 << 24) 44#define OMAP4430_LASTPOWERSTATEENTERED_MASK (0x3 << 24)
516
517/*
518 * Used by PM_ABE_PWRSTCTRL, PM_CORE_PWRSTCTRL, PM_DSS_PWRSTCTRL,
519 * PM_IVAHD_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, PM_L4PER_PWRSTCTRL,
520 * PM_MPU_PWRSTCTRL, PM_TESLA_PWRSTCTRL
521 */
522#define OMAP4430_LOGICRETSTATE_SHIFT 2 45#define OMAP4430_LOGICRETSTATE_SHIFT 2
523#define OMAP4430_LOGICRETSTATE_MASK (1 << 2) 46#define OMAP4430_LOGICRETSTATE_MASK (1 << 2)
524
525/*
526 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CEFUSE_PWRSTST, PM_CORE_PWRSTST,
527 * PM_DSS_PWRSTST, PM_EMU_PWRSTST, PM_GFX_PWRSTST, PM_IVAHD_PWRSTST,
528 * PM_L3INIT_PWRSTST, PM_L4PER_PWRSTST, PM_MPU_PWRSTST, PM_TESLA_PWRSTST
529 */
530#define OMAP4430_LOGICSTATEST_SHIFT 2 47#define OMAP4430_LOGICSTATEST_SHIFT 2
531#define OMAP4430_LOGICSTATEST_MASK (1 << 2) 48#define OMAP4430_LOGICSTATEST_MASK (1 << 2)
532
533/*
534 * Used by RM_ABE_AESS_CONTEXT, RM_ABE_DMIC_CONTEXT, RM_ABE_MCASP_CONTEXT,
535 * RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT, RM_ABE_MCBSP3_CONTEXT,
536 * RM_ABE_PDM_CONTEXT, RM_ABE_SLIMBUS_CONTEXT, RM_ABE_TIMER5_CONTEXT,
537 * RM_ABE_TIMER6_CONTEXT, RM_ABE_TIMER7_CONTEXT, RM_ABE_TIMER8_CONTEXT,
538 * RM_ABE_WDT3_CONTEXT, RM_ALWON_MDMINTC_CONTEXT, RM_ALWON_SR_CORE_CONTEXT,
539 * RM_ALWON_SR_IVA_CONTEXT, RM_ALWON_SR_MPU_CONTEXT, RM_CAM_FDIF_CONTEXT,
540 * RM_CAM_ISS_CONTEXT, RM_CEFUSE_CEFUSE_CONTEXT, RM_D2D_SAD2D_CONTEXT,
541 * RM_D2D_SAD2D_FW_CONTEXT, RM_DSS_DEISS_CONTEXT, RM_DSS_DSS_CONTEXT,
542 * RM_DUCATI_DUCATI_CONTEXT, RM_EMU_DEBUGSS_CONTEXT, RM_GFX_GFX_CONTEXT,
543 * RM_IVAHD_IVAHD_CONTEXT, RM_IVAHD_SL2_CONTEXT, RM_L3INIT_CCPTX_CONTEXT,
544 * RM_L3INIT_EMAC_CONTEXT, RM_L3INIT_P1500_CONTEXT, RM_L3INIT_PCIESS_CONTEXT,
545 * RM_L3INIT_SATA_CONTEXT, RM_L3INIT_TPPSS_CONTEXT, RM_L3INIT_UNIPRO1_CONTEXT,
546 * RM_L3INIT_USBPHYOCP2SCP_CONTEXT, RM_L3INIT_XHPI_CONTEXT,
547 * RM_L3INSTR_L3_3_CONTEXT, RM_L3INSTR_L3_INSTR_CONTEXT,
548 * RM_L3INSTR_OCP_WP1_CONTEXT, RM_L3_1_L3_1_CONTEXT, RM_L3_2_L3_2_CONTEXT,
549 * RM_L3_2_OCMC_RAM_CONTEXT, RM_L4CFG_L4_CFG_CONTEXT, RM_L4CFG_SAR_ROM_CONTEXT,
550 * RM_L4PER_ADC_CONTEXT, RM_L4PER_DMTIMER10_CONTEXT,
551 * RM_L4PER_DMTIMER11_CONTEXT, RM_L4PER_DMTIMER2_CONTEXT,
552 * RM_L4PER_DMTIMER3_CONTEXT, RM_L4PER_DMTIMER4_CONTEXT,
553 * RM_L4PER_DMTIMER9_CONTEXT, RM_L4PER_ELM_CONTEXT, RM_L4PER_HDQ1W_CONTEXT,
554 * RM_L4PER_HECC1_CONTEXT, RM_L4PER_HECC2_CONTEXT, RM_L4PER_I2C2_CONTEXT,
555 * RM_L4PER_I2C3_CONTEXT, RM_L4PER_I2C4_CONTEXT, RM_L4PER_I2C5_CONTEXT,
556 * RM_L4PER_L4_PER_CONTEXT, RM_L4PER_MCASP2_CONTEXT, RM_L4PER_MCASP3_CONTEXT,
557 * RM_L4PER_MCBSP4_CONTEXT, RM_L4PER_MCSPI1_CONTEXT, RM_L4PER_MCSPI2_CONTEXT,
558 * RM_L4PER_MCSPI3_CONTEXT, RM_L4PER_MCSPI4_CONTEXT, RM_L4PER_MGATE_CONTEXT,
559 * RM_L4PER_MMCSD3_CONTEXT, RM_L4PER_MMCSD4_CONTEXT, RM_L4PER_MMCSD5_CONTEXT,
560 * RM_L4PER_MSPROHG_CONTEXT, RM_L4PER_SLIMBUS2_CONTEXT,
561 * RM_L4SEC_PKAEIP29_CONTEXT, RM_MEMIF_DLL_CONTEXT, RM_MEMIF_DLL_H_CONTEXT,
562 * RM_MEMIF_DMM_CONTEXT, RM_MEMIF_EMIF_1_CONTEXT, RM_MEMIF_EMIF_2_CONTEXT,
563 * RM_MEMIF_EMIF_FW_CONTEXT, RM_MPU_MPU_CONTEXT, RM_TESLA_TESLA_CONTEXT,
564 * RM_WKUP_GPIO1_CONTEXT, RM_WKUP_KEYBOARD_CONTEXT, RM_WKUP_L4WKUP_CONTEXT,
565 * RM_WKUP_RTC_CONTEXT, RM_WKUP_SARRAM_CONTEXT, RM_WKUP_SYNCTIMER_CONTEXT,
566 * RM_WKUP_TIMER12_CONTEXT, RM_WKUP_TIMER1_CONTEXT, RM_WKUP_USIM_CONTEXT,
567 * RM_WKUP_WDT1_CONTEXT, RM_WKUP_WDT2_CONTEXT
568 */
569#define OMAP4430_LOSTCONTEXT_DFF_SHIFT 0
570#define OMAP4430_LOSTCONTEXT_DFF_MASK (1 << 0) 49#define OMAP4430_LOSTCONTEXT_DFF_MASK (1 << 0)
571
572/*
573 * Used by RM_D2D_MODEM_ICR_CONTEXT, RM_D2D_SAD2D_CONTEXT,
574 * RM_D2D_SAD2D_FW_CONTEXT, RM_DSS_DSS_CONTEXT, RM_DUCATI_DUCATI_CONTEXT,
575 * RM_L3INIT_HSI_CONTEXT, RM_L3INIT_MMC1_CONTEXT, RM_L3INIT_MMC2_CONTEXT,
576 * RM_L3INIT_MMC6_CONTEXT, RM_L3INIT_USB_HOST_CONTEXT,
577 * RM_L3INIT_USB_HOST_FS_CONTEXT, RM_L3INIT_USB_OTG_CONTEXT,
578 * RM_L3INIT_USB_TLL_CONTEXT, RM_L3INSTR_L3_3_CONTEXT,
579 * RM_L3INSTR_OCP_WP1_CONTEXT, RM_L3_1_L3_1_CONTEXT, RM_L3_2_GPMC_CONTEXT,
580 * RM_L3_2_L3_2_CONTEXT, RM_L4CFG_HW_SEM_CONTEXT, RM_L4CFG_L4_CFG_CONTEXT,
581 * RM_L4CFG_MAILBOX_CONTEXT, RM_L4PER_GPIO2_CONTEXT, RM_L4PER_GPIO3_CONTEXT,
582 * RM_L4PER_GPIO4_CONTEXT, RM_L4PER_GPIO5_CONTEXT, RM_L4PER_GPIO6_CONTEXT,
583 * RM_L4PER_I2C1_CONTEXT, RM_L4PER_L4_PER_CONTEXT, RM_L4PER_UART1_CONTEXT,
584 * RM_L4PER_UART2_CONTEXT, RM_L4PER_UART3_CONTEXT, RM_L4PER_UART4_CONTEXT,
585 * RM_L4SEC_AES1_CONTEXT, RM_L4SEC_AES2_CONTEXT, RM_L4SEC_CRYPTODMA_CONTEXT,
586 * RM_L4SEC_DES3DES_CONTEXT, RM_L4SEC_RNG_CONTEXT, RM_L4SEC_SHA2MD51_CONTEXT,
587 * RM_MEMIF_DMM_CONTEXT, RM_MEMIF_EMIF_1_CONTEXT, RM_MEMIF_EMIF_2_CONTEXT,
588 * RM_MEMIF_EMIF_FW_CONTEXT, RM_MEMIF_EMIF_H1_CONTEXT,
589 * RM_MEMIF_EMIF_H2_CONTEXT, RM_SDMA_SDMA_CONTEXT, RM_TESLA_TESLA_CONTEXT
590 */
591#define OMAP4430_LOSTCONTEXT_RFF_SHIFT 1
592#define OMAP4430_LOSTCONTEXT_RFF_MASK (1 << 1)
593
594/* Used by RM_ABE_AESS_CONTEXT */
595#define OMAP4430_LOSTMEM_AESSMEM_SHIFT 8
596#define OMAP4430_LOSTMEM_AESSMEM_MASK (1 << 8) 50#define OMAP4430_LOSTMEM_AESSMEM_MASK (1 << 8)
597
598/* Used by RM_CAM_FDIF_CONTEXT, RM_CAM_ISS_CONTEXT */
599#define OMAP4430_LOSTMEM_CAM_MEM_SHIFT 8
600#define OMAP4430_LOSTMEM_CAM_MEM_MASK (1 << 8)
601
602/* Used by RM_L3INSTR_OCP_WP1_CONTEXT */
603#define OMAP4430_LOSTMEM_CORE_NRET_BANK_SHIFT 8
604#define OMAP4430_LOSTMEM_CORE_NRET_BANK_MASK (1 << 8)
605
606/* Renamed from LOSTMEM_CORE_NRET_BANK Used by RM_MEMIF_DMM_CONTEXT */
607#define OMAP4430_LOSTMEM_CORE_NRET_BANK_9_9_SHIFT 9
608#define OMAP4430_LOSTMEM_CORE_NRET_BANK_9_9_MASK (1 << 9)
609
610/* Used by RM_L3_2_OCMC_RAM_CONTEXT */
611#define OMAP4430_LOSTMEM_CORE_OCMRAM_SHIFT 8
612#define OMAP4430_LOSTMEM_CORE_OCMRAM_MASK (1 << 8)
613
614/*
615 * Used by RM_D2D_MODEM_ICR_CONTEXT, RM_MEMIF_DMM_CONTEXT,
616 * RM_SDMA_SDMA_CONTEXT
617 */
618#define OMAP4430_LOSTMEM_CORE_OTHER_BANK_SHIFT 8
619#define OMAP4430_LOSTMEM_CORE_OTHER_BANK_MASK (1 << 8)
620
621/* Used by RM_DSS_DEISS_CONTEXT, RM_DSS_DSS_CONTEXT */
622#define OMAP4430_LOSTMEM_DSS_MEM_SHIFT 8
623#define OMAP4430_LOSTMEM_DSS_MEM_MASK (1 << 8)
624
625/* Used by RM_DUCATI_DUCATI_CONTEXT */
626#define OMAP4430_LOSTMEM_DUCATI_L2RAM_SHIFT 9
627#define OMAP4430_LOSTMEM_DUCATI_L2RAM_MASK (1 << 9)
628
629/* Used by RM_DUCATI_DUCATI_CONTEXT */
630#define OMAP4430_LOSTMEM_DUCATI_UNICACHE_SHIFT 8
631#define OMAP4430_LOSTMEM_DUCATI_UNICACHE_MASK (1 << 8)
632
633/* Used by RM_EMU_DEBUGSS_CONTEXT */
634#define OMAP4430_LOSTMEM_EMU_BANK_SHIFT 8
635#define OMAP4430_LOSTMEM_EMU_BANK_MASK (1 << 8)
636
637/* Used by RM_GFX_GFX_CONTEXT */
638#define OMAP4430_LOSTMEM_GFX_MEM_SHIFT 8
639#define OMAP4430_LOSTMEM_GFX_MEM_MASK (1 << 8)
640
641/* Used by RM_IVAHD_IVAHD_CONTEXT */
642#define OMAP4430_LOSTMEM_HWA_MEM_SHIFT 10
643#define OMAP4430_LOSTMEM_HWA_MEM_MASK (1 << 10)
644
645/*
646 * Used by RM_L3INIT_CCPTX_CONTEXT, RM_L3INIT_EMAC_CONTEXT,
647 * RM_L3INIT_HSI_CONTEXT, RM_L3INIT_MMC1_CONTEXT, RM_L3INIT_MMC2_CONTEXT,
648 * RM_L3INIT_MMC6_CONTEXT, RM_L3INIT_PCIESS_CONTEXT, RM_L3INIT_SATA_CONTEXT,
649 * RM_L3INIT_TPPSS_CONTEXT, RM_L3INIT_UNIPRO1_CONTEXT,
650 * RM_L3INIT_USB_OTG_CONTEXT, RM_L3INIT_XHPI_CONTEXT
651 */
652#define OMAP4430_LOSTMEM_L3INIT_BANK1_SHIFT 8
653#define OMAP4430_LOSTMEM_L3INIT_BANK1_MASK (1 << 8)
654
655/* Used by RM_MPU_MPU_CONTEXT */
656#define OMAP4430_LOSTMEM_MPU_L1_SHIFT 8
657#define OMAP4430_LOSTMEM_MPU_L1_MASK (1 << 8)
658
659/* Used by RM_MPU_MPU_CONTEXT */
660#define OMAP4430_LOSTMEM_MPU_L2_SHIFT 9
661#define OMAP4430_LOSTMEM_MPU_L2_MASK (1 << 9)
662
663/* Used by RM_MPU_MPU_CONTEXT */
664#define OMAP4430_LOSTMEM_MPU_RAM_SHIFT 10
665#define OMAP4430_LOSTMEM_MPU_RAM_MASK (1 << 10)
666
667/*
668 * Used by RM_L4PER_HECC1_CONTEXT, RM_L4PER_HECC2_CONTEXT,
669 * RM_L4PER_MCBSP4_CONTEXT, RM_L4PER_MMCSD3_CONTEXT, RM_L4PER_MMCSD4_CONTEXT,
670 * RM_L4PER_MMCSD5_CONTEXT, RM_L4PER_SLIMBUS2_CONTEXT, RM_L4SEC_PKAEIP29_CONTEXT
671 */
672#define OMAP4430_LOSTMEM_NONRETAINED_BANK_SHIFT 8
673#define OMAP4430_LOSTMEM_NONRETAINED_BANK_MASK (1 << 8)
674
675/*
676 * Used by RM_ABE_DMIC_CONTEXT, RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT,
677 * RM_ABE_MCBSP3_CONTEXT, RM_ABE_PDM_CONTEXT, RM_ABE_SLIMBUS_CONTEXT
678 */
679#define OMAP4430_LOSTMEM_PERIHPMEM_SHIFT 8
680#define OMAP4430_LOSTMEM_PERIHPMEM_MASK (1 << 8)
681
682/*
683 * Used by RM_L4PER_MSPROHG_CONTEXT, RM_L4PER_UART1_CONTEXT,
684 * RM_L4PER_UART2_CONTEXT, RM_L4PER_UART3_CONTEXT, RM_L4PER_UART4_CONTEXT,
685 * RM_L4SEC_CRYPTODMA_CONTEXT
686 */
687#define OMAP4430_LOSTMEM_RETAINED_BANK_SHIFT 8
688#define OMAP4430_LOSTMEM_RETAINED_BANK_MASK (1 << 8)
689
690/* Used by RM_IVAHD_SL2_CONTEXT */
691#define OMAP4430_LOSTMEM_SL2_MEM_SHIFT 8
692#define OMAP4430_LOSTMEM_SL2_MEM_MASK (1 << 8)
693
694/* Used by RM_IVAHD_IVAHD_CONTEXT */
695#define OMAP4430_LOSTMEM_TCM1_MEM_SHIFT 8
696#define OMAP4430_LOSTMEM_TCM1_MEM_MASK (1 << 8)
697
698/* Used by RM_IVAHD_IVAHD_CONTEXT */
699#define OMAP4430_LOSTMEM_TCM2_MEM_SHIFT 9
700#define OMAP4430_LOSTMEM_TCM2_MEM_MASK (1 << 9)
701
702/* Used by RM_TESLA_TESLA_CONTEXT */
703#define OMAP4430_LOSTMEM_TESLA_EDMA_SHIFT 10
704#define OMAP4430_LOSTMEM_TESLA_EDMA_MASK (1 << 10)
705
706/* Used by RM_TESLA_TESLA_CONTEXT */
707#define OMAP4430_LOSTMEM_TESLA_L1_SHIFT 8
708#define OMAP4430_LOSTMEM_TESLA_L1_MASK (1 << 8)
709
710/* Used by RM_TESLA_TESLA_CONTEXT */
711#define OMAP4430_LOSTMEM_TESLA_L2_SHIFT 9
712#define OMAP4430_LOSTMEM_TESLA_L2_MASK (1 << 9)
713
714/* Used by RM_WKUP_SARRAM_CONTEXT */
715#define OMAP4430_LOSTMEM_WKUP_BANK_SHIFT 8
716#define OMAP4430_LOSTMEM_WKUP_BANK_MASK (1 << 8)
717
718/*
719 * Used by PM_ABE_PWRSTCTRL, PM_CAM_PWRSTCTRL, PM_CEFUSE_PWRSTCTRL,
720 * PM_CORE_PWRSTCTRL, PM_DSS_PWRSTCTRL, PM_GFX_PWRSTCTRL, PM_IVAHD_PWRSTCTRL,
721 * PM_L3INIT_PWRSTCTRL, PM_L4PER_PWRSTCTRL, PM_MPU_PWRSTCTRL, PM_TESLA_PWRSTCTRL
722 */
723#define OMAP4430_LOWPOWERSTATECHANGE_SHIFT 4 51#define OMAP4430_LOWPOWERSTATECHANGE_SHIFT 4
724#define OMAP4430_LOWPOWERSTATECHANGE_MASK (1 << 4) 52#define OMAP4430_LOWPOWERSTATECHANGE_MASK (1 << 4)
725
726/* Used by PRM_MODEM_IF_CTRL */
727#define OMAP4430_MODEM_READY_SHIFT 1
728#define OMAP4430_MODEM_READY_MASK (1 << 1)
729
730/* Used by PRM_MODEM_IF_CTRL */
731#define OMAP4430_MODEM_SHUTDOWN_IRQ_SHIFT 9
732#define OMAP4430_MODEM_SHUTDOWN_IRQ_MASK (1 << 9)
733
734/* Used by PRM_MODEM_IF_CTRL */
735#define OMAP4430_MODEM_SLEEP_ST_SHIFT 16
736#define OMAP4430_MODEM_SLEEP_ST_MASK (1 << 16)
737
738/* Used by PRM_MODEM_IF_CTRL */
739#define OMAP4430_MODEM_WAKE_IRQ_SHIFT 8
740#define OMAP4430_MODEM_WAKE_IRQ_MASK (1 << 8)
741
742/* Used by PM_MPU_PWRSTCTRL */
743#define OMAP4430_MPU_L1_ONSTATE_SHIFT 16
744#define OMAP4430_MPU_L1_ONSTATE_MASK (0x3 << 16)
745
746/* Used by PM_MPU_PWRSTCTRL */
747#define OMAP4430_MPU_L1_RETSTATE_SHIFT 8
748#define OMAP4430_MPU_L1_RETSTATE_MASK (1 << 8)
749
750/* Used by PM_MPU_PWRSTST */
751#define OMAP4430_MPU_L1_STATEST_SHIFT 4
752#define OMAP4430_MPU_L1_STATEST_MASK (0x3 << 4)
753
754/* Used by PM_MPU_PWRSTCTRL */
755#define OMAP4430_MPU_L2_ONSTATE_SHIFT 18
756#define OMAP4430_MPU_L2_ONSTATE_MASK (0x3 << 18)
757
758/* Used by PM_MPU_PWRSTCTRL */
759#define OMAP4430_MPU_L2_RETSTATE_SHIFT 9
760#define OMAP4430_MPU_L2_RETSTATE_MASK (1 << 9)
761
762/* Used by PM_MPU_PWRSTST */
763#define OMAP4430_MPU_L2_STATEST_SHIFT 6
764#define OMAP4430_MPU_L2_STATEST_MASK (0x3 << 6)
765
766/* Used by PM_MPU_PWRSTCTRL */
767#define OMAP4430_MPU_RAM_ONSTATE_SHIFT 20
768#define OMAP4430_MPU_RAM_ONSTATE_MASK (0x3 << 20)
769
770/* Used by PM_MPU_PWRSTCTRL */
771#define OMAP4430_MPU_RAM_RETSTATE_SHIFT 10
772#define OMAP4430_MPU_RAM_RETSTATE_MASK (1 << 10)
773
774/* Used by PM_MPU_PWRSTST */
775#define OMAP4430_MPU_RAM_STATEST_SHIFT 8
776#define OMAP4430_MPU_RAM_STATEST_MASK (0x3 << 8)
777
778/* Used by PRM_RSTST */
779#define OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT 2 53#define OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT 2
780#define OMAP4430_MPU_SECURITY_VIOL_RST_MASK (1 << 2)
781
782/* Used by PRM_RSTST */
783#define OMAP4430_MPU_WDT_RST_SHIFT 3 54#define OMAP4430_MPU_WDT_RST_SHIFT 3
784#define OMAP4430_MPU_WDT_RST_MASK (1 << 3)
785
786/* Used by PM_L4PER_PWRSTCTRL */
787#define OMAP4430_NONRETAINED_BANK_ONSTATE_SHIFT 18
788#define OMAP4430_NONRETAINED_BANK_ONSTATE_MASK (0x3 << 18)
789
790/* Used by PM_L4PER_PWRSTCTRL */
791#define OMAP4430_NONRETAINED_BANK_RETSTATE_SHIFT 9
792#define OMAP4430_NONRETAINED_BANK_RETSTATE_MASK (1 << 9)
793
794/* Used by PM_L4PER_PWRSTST */
795#define OMAP4430_NONRETAINED_BANK_STATEST_SHIFT 6
796#define OMAP4430_NONRETAINED_BANK_STATEST_MASK (0x3 << 6)
797
798/* Used by PM_CORE_PWRSTCTRL */
799#define OMAP4430_OCP_NRET_BANK_ONSTATE_SHIFT 24
800#define OMAP4430_OCP_NRET_BANK_ONSTATE_MASK (0x3 << 24) 55#define OMAP4430_OCP_NRET_BANK_ONSTATE_MASK (0x3 << 24)
801
802/* Used by PM_CORE_PWRSTCTRL */
803#define OMAP4430_OCP_NRET_BANK_RETSTATE_SHIFT 12
804#define OMAP4430_OCP_NRET_BANK_RETSTATE_MASK (1 << 12) 56#define OMAP4430_OCP_NRET_BANK_RETSTATE_MASK (1 << 12)
805
806/* Used by PM_CORE_PWRSTST */
807#define OMAP4430_OCP_NRET_BANK_STATEST_SHIFT 12
808#define OMAP4430_OCP_NRET_BANK_STATEST_MASK (0x3 << 12) 57#define OMAP4430_OCP_NRET_BANK_STATEST_MASK (0x3 << 12)
809
810/*
811 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L,
812 * PRM_VC_VAL_CMD_VDD_MPU_L
813 */
814#define OMAP4430_OFF_SHIFT 0 58#define OMAP4430_OFF_SHIFT 0
815#define OMAP4430_OFF_MASK (0xff << 0)
816
817/*
818 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L,
819 * PRM_VC_VAL_CMD_VDD_MPU_L
820 */
821#define OMAP4430_ON_SHIFT 24 59#define OMAP4430_ON_SHIFT 24
822#define OMAP4430_ON_MASK (0xff << 24) 60#define OMAP4430_ON_MASK (0xff << 24)
823
824/*
825 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L,
826 * PRM_VC_VAL_CMD_VDD_MPU_L
827 */
828#define OMAP4430_ONLP_SHIFT 16 61#define OMAP4430_ONLP_SHIFT 16
829#define OMAP4430_ONLP_MASK (0xff << 16)
830
831/* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */
832#define OMAP4430_OPP_CHANGE_SHIFT 2
833#define OMAP4430_OPP_CHANGE_MASK (1 << 2)
834
835/* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */
836#define OMAP4430_OPP_SEL_SHIFT 0
837#define OMAP4430_OPP_SEL_MASK (0x3 << 0)
838
839/* Used by PRM_SRAM_COUNT */
840#define OMAP4430_PCHARGECNT_VALUE_SHIFT 0
841#define OMAP4430_PCHARGECNT_VALUE_MASK (0x3f << 0)
842
843/* Used by PRM_PSCON_COUNT */
844#define OMAP4430_PCHARGE_TIME_SHIFT 0
845#define OMAP4430_PCHARGE_TIME_MASK (0xff << 0)
846
847/* Used by PM_ABE_PWRSTCTRL */
848#define OMAP4430_PERIPHMEM_ONSTATE_SHIFT 20
849#define OMAP4430_PERIPHMEM_ONSTATE_MASK (0x3 << 20)
850
851/* Used by PM_ABE_PWRSTCTRL */
852#define OMAP4430_PERIPHMEM_RETSTATE_SHIFT 10
853#define OMAP4430_PERIPHMEM_RETSTATE_MASK (1 << 10)
854
855/* Used by PM_ABE_PWRSTST */
856#define OMAP4430_PERIPHMEM_STATEST_SHIFT 8
857#define OMAP4430_PERIPHMEM_STATEST_MASK (0x3 << 8)
858
859/* Used by PRM_PHASE1_CNDP */
860#define OMAP4430_PHASE1_CNDP_SHIFT 0
861#define OMAP4430_PHASE1_CNDP_MASK (0xffffffff << 0)
862
863/* Used by PRM_PHASE2A_CNDP */
864#define OMAP4430_PHASE2A_CNDP_SHIFT 0
865#define OMAP4430_PHASE2A_CNDP_MASK (0xffffffff << 0)
866
867/* Used by PRM_PHASE2B_CNDP */
868#define OMAP4430_PHASE2B_CNDP_SHIFT 0
869#define OMAP4430_PHASE2B_CNDP_MASK (0xffffffff << 0)
870
871/* Used by PRM_PSCON_COUNT */
872#define OMAP4430_PONOUT_2_PGOODIN_TIME_SHIFT 8
873#define OMAP4430_PONOUT_2_PGOODIN_TIME_MASK (0xff << 8)
874
875/*
876 * Used by PM_ABE_PWRSTCTRL, PM_CAM_PWRSTCTRL, PM_CEFUSE_PWRSTCTRL,
877 * PM_CORE_PWRSTCTRL, PM_DSS_PWRSTCTRL, PM_EMU_PWRSTCTRL, PM_GFX_PWRSTCTRL,
878 * PM_IVAHD_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, PM_L4PER_PWRSTCTRL,
879 * PM_MPU_PWRSTCTRL, PM_TESLA_PWRSTCTRL
880 */
881#define OMAP4430_POWERSTATE_SHIFT 0
882#define OMAP4430_POWERSTATE_MASK (0x3 << 0)
883
884/*
885 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CEFUSE_PWRSTST, PM_CORE_PWRSTST,
886 * PM_DSS_PWRSTST, PM_EMU_PWRSTST, PM_GFX_PWRSTST, PM_IVAHD_PWRSTST,
887 * PM_L3INIT_PWRSTST, PM_L4PER_PWRSTST, PM_MPU_PWRSTST, PM_TESLA_PWRSTST
888 */
889#define OMAP4430_POWERSTATEST_SHIFT 0
890#define OMAP4430_POWERSTATEST_MASK (0x3 << 0)
891
892/* Used by PRM_PWRREQCTRL */
893#define OMAP4430_PWRREQ_COND_SHIFT 0
894#define OMAP4430_PWRREQ_COND_MASK (0x3 << 0)
895
896/* Used by PRM_VC_CFG_CHANNEL */
897#define OMAP4430_RACEN_VDD_CORE_L_SHIFT 3
898#define OMAP4430_RACEN_VDD_CORE_L_MASK (1 << 3)
899
900/* Used by PRM_VC_CFG_CHANNEL */
901#define OMAP4430_RACEN_VDD_IVA_L_SHIFT 11
902#define OMAP4430_RACEN_VDD_IVA_L_MASK (1 << 11)
903
904/* Used by PRM_VC_CFG_CHANNEL */
905#define OMAP4430_RACEN_VDD_MPU_L_SHIFT 20
906#define OMAP4430_RACEN_VDD_MPU_L_MASK (1 << 20)
907
908/* Used by PRM_VC_CFG_CHANNEL */
909#define OMAP4430_RAC_VDD_CORE_L_SHIFT 2
910#define OMAP4430_RAC_VDD_CORE_L_MASK (1 << 2)
911
912/* Used by PRM_VC_CFG_CHANNEL */
913#define OMAP4430_RAC_VDD_IVA_L_SHIFT 10
914#define OMAP4430_RAC_VDD_IVA_L_MASK (1 << 10)
915
916/* Used by PRM_VC_CFG_CHANNEL */
917#define OMAP4430_RAC_VDD_MPU_L_SHIFT 19
918#define OMAP4430_RAC_VDD_MPU_L_MASK (1 << 19)
919
920/*
921 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
922 * PRM_VOLTSETUP_IVA_OFF, PRM_VOLTSETUP_IVA_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
923 * PRM_VOLTSETUP_MPU_RET_SLEEP
924 */
925#define OMAP4430_RAMP_DOWN_COUNT_SHIFT 16 62#define OMAP4430_RAMP_DOWN_COUNT_SHIFT 16
926#define OMAP4430_RAMP_DOWN_COUNT_MASK (0x3f << 16)
927
928/*
929 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
930 * PRM_VOLTSETUP_IVA_OFF, PRM_VOLTSETUP_IVA_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
931 * PRM_VOLTSETUP_MPU_RET_SLEEP
932 */
933#define OMAP4430_RAMP_DOWN_PRESCAL_SHIFT 24
934#define OMAP4430_RAMP_DOWN_PRESCAL_MASK (0x3 << 24)
935
936/*
937 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
938 * PRM_VOLTSETUP_IVA_OFF, PRM_VOLTSETUP_IVA_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
939 * PRM_VOLTSETUP_MPU_RET_SLEEP
940 */
941#define OMAP4430_RAMP_UP_COUNT_SHIFT 0 63#define OMAP4430_RAMP_UP_COUNT_SHIFT 0
942#define OMAP4430_RAMP_UP_COUNT_MASK (0x3f << 0)
943
944/*
945 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
946 * PRM_VOLTSETUP_IVA_OFF, PRM_VOLTSETUP_IVA_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
947 * PRM_VOLTSETUP_MPU_RET_SLEEP
948 */
949#define OMAP4430_RAMP_UP_PRESCAL_SHIFT 8 64#define OMAP4430_RAMP_UP_PRESCAL_SHIFT 8
950#define OMAP4430_RAMP_UP_PRESCAL_MASK (0x3 << 8)
951
952/* Used by PRM_VC_CFG_CHANNEL */
953#define OMAP4430_RAV_VDD_CORE_L_SHIFT 1
954#define OMAP4430_RAV_VDD_CORE_L_MASK (1 << 1)
955
956/* Used by PRM_VC_CFG_CHANNEL */
957#define OMAP4430_RAV_VDD_IVA_L_SHIFT 9
958#define OMAP4430_RAV_VDD_IVA_L_MASK (1 << 9)
959
960/* Used by PRM_VC_CFG_CHANNEL */
961#define OMAP4430_RAV_VDD_MPU_L_SHIFT 18
962#define OMAP4430_RAV_VDD_MPU_L_MASK (1 << 18)
963
964/* Used by PRM_VC_VAL_BYPASS */
965#define OMAP4430_REGADDR_SHIFT 8 65#define OMAP4430_REGADDR_SHIFT 8
966#define OMAP4430_REGADDR_MASK (0xff << 8)
967
968/*
969 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L,
970 * PRM_VC_VAL_CMD_VDD_MPU_L
971 */
972#define OMAP4430_RET_SHIFT 8 66#define OMAP4430_RET_SHIFT 8
973#define OMAP4430_RET_MASK (0xff << 8)
974
975/* Used by PM_L4PER_PWRSTCTRL */
976#define OMAP4430_RETAINED_BANK_ONSTATE_SHIFT 16
977#define OMAP4430_RETAINED_BANK_ONSTATE_MASK (0x3 << 16)
978
979/* Used by PM_L4PER_PWRSTCTRL */
980#define OMAP4430_RETAINED_BANK_RETSTATE_SHIFT 8
981#define OMAP4430_RETAINED_BANK_RETSTATE_MASK (1 << 8)
982
983/* Used by PM_L4PER_PWRSTST */
984#define OMAP4430_RETAINED_BANK_STATEST_SHIFT 4
985#define OMAP4430_RETAINED_BANK_STATEST_MASK (0x3 << 4)
986
987/*
988 * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL,
989 * PRM_LDO_SRAM_MPU_CTRL
990 */
991#define OMAP4430_RETMODE_ENABLE_SHIFT 0
992#define OMAP4430_RETMODE_ENABLE_MASK (1 << 0)
993
994/* Used by RM_DUCATI_RSTCTRL, RM_IVAHD_RSTCTRL, RM_TESLA_RSTCTRL */
995#define OMAP4430_RST1_SHIFT 0
996#define OMAP4430_RST1_MASK (1 << 0)
997
998/* Used by RM_DUCATI_RSTST, RM_IVAHD_RSTST, RM_TESLA_RSTST */
999#define OMAP4430_RST1ST_SHIFT 0
1000#define OMAP4430_RST1ST_MASK (1 << 0)
1001
1002/* Used by RM_DUCATI_RSTCTRL, RM_IVAHD_RSTCTRL, RM_TESLA_RSTCTRL */
1003#define OMAP4430_RST2_SHIFT 1
1004#define OMAP4430_RST2_MASK (1 << 1)
1005
1006/* Used by RM_DUCATI_RSTST, RM_IVAHD_RSTST, RM_TESLA_RSTST */
1007#define OMAP4430_RST2ST_SHIFT 1
1008#define OMAP4430_RST2ST_MASK (1 << 1)
1009
1010/* Used by RM_DUCATI_RSTCTRL, RM_IVAHD_RSTCTRL */
1011#define OMAP4430_RST3_SHIFT 2
1012#define OMAP4430_RST3_MASK (1 << 2)
1013
1014/* Used by RM_DUCATI_RSTST, RM_IVAHD_RSTST */
1015#define OMAP4430_RST3ST_SHIFT 2
1016#define OMAP4430_RST3ST_MASK (1 << 2)
1017
1018/* Used by PRM_RSTTIME */
1019#define OMAP4430_RSTTIME1_SHIFT 0
1020#define OMAP4430_RSTTIME1_MASK (0x3ff << 0)
1021
1022/* Used by PRM_RSTTIME */
1023#define OMAP4430_RSTTIME2_SHIFT 10
1024#define OMAP4430_RSTTIME2_MASK (0x1f << 10)
1025
1026/* Used by PRM_RSTCTRL */
1027#define OMAP4430_RST_GLOBAL_COLD_SW_SHIFT 1
1028#define OMAP4430_RST_GLOBAL_COLD_SW_MASK (1 << 1)
1029
1030/* Used by PRM_RSTCTRL */
1031#define OMAP4430_RST_GLOBAL_WARM_SW_SHIFT 0
1032#define OMAP4430_RST_GLOBAL_WARM_SW_MASK (1 << 0) 67#define OMAP4430_RST_GLOBAL_WARM_SW_MASK (1 << 0)
1033
1034/* Used by REVISION_PRM */
1035#define OMAP4430_R_RTL_SHIFT 11
1036#define OMAP4430_R_RTL_MASK (0x1f << 11)
1037
1038/* Used by PRM_VC_CFG_CHANNEL */
1039#define OMAP4430_SA_VDD_CORE_L_SHIFT 0 68#define OMAP4430_SA_VDD_CORE_L_SHIFT 0
1040#define OMAP4430_SA_VDD_CORE_L_MASK (1 << 0)
1041
1042/* Renamed from SA_VDD_CORE_L Used by PRM_VC_SMPS_SA */
1043#define OMAP4430_SA_VDD_CORE_L_0_6_SHIFT 0
1044#define OMAP4430_SA_VDD_CORE_L_0_6_MASK (0x7f << 0) 69#define OMAP4430_SA_VDD_CORE_L_0_6_MASK (0x7f << 0)
1045
1046/* Used by PRM_VC_CFG_CHANNEL */
1047#define OMAP4430_SA_VDD_IVA_L_SHIFT 8 70#define OMAP4430_SA_VDD_IVA_L_SHIFT 8
1048#define OMAP4430_SA_VDD_IVA_L_MASK (1 << 8)
1049
1050/* Renamed from SA_VDD_IVA_L Used by PRM_VC_SMPS_SA */
1051#define OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_SHIFT 8
1052#define OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_MASK (0x7f << 8) 71#define OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_MASK (0x7f << 8)
1053
1054/* Used by PRM_VC_CFG_CHANNEL */
1055#define OMAP4430_SA_VDD_MPU_L_SHIFT 16 72#define OMAP4430_SA_VDD_MPU_L_SHIFT 16
1056#define OMAP4430_SA_VDD_MPU_L_MASK (1 << 16)
1057
1058/* Renamed from SA_VDD_MPU_L Used by PRM_VC_SMPS_SA */
1059#define OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_SHIFT 16
1060#define OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_MASK (0x7f << 16) 73#define OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_MASK (0x7f << 16)
1061
1062/* Used by REVISION_PRM */
1063#define OMAP4430_SCHEME_SHIFT 30
1064#define OMAP4430_SCHEME_MASK (0x3 << 30)
1065
1066/* Used by PRM_VC_CFG_I2C_CLK */
1067#define OMAP4430_SCLH_SHIFT 0 74#define OMAP4430_SCLH_SHIFT 0
1068#define OMAP4430_SCLH_MASK (0xff << 0)
1069
1070/* Used by PRM_VC_CFG_I2C_CLK */
1071#define OMAP4430_SCLL_SHIFT 8 75#define OMAP4430_SCLL_SHIFT 8
1072#define OMAP4430_SCLL_MASK (0xff << 8)
1073
1074/* Used by PRM_RSTST */
1075#define OMAP4430_SECURE_WDT_RST_SHIFT 4 76#define OMAP4430_SECURE_WDT_RST_SHIFT 4
1076#define OMAP4430_SECURE_WDT_RST_MASK (1 << 4)
1077
1078/* Used by PM_IVAHD_PWRSTCTRL */
1079#define OMAP4430_SL2_MEM_ONSTATE_SHIFT 18
1080#define OMAP4430_SL2_MEM_ONSTATE_MASK (0x3 << 18)
1081
1082/* Used by PM_IVAHD_PWRSTCTRL */
1083#define OMAP4430_SL2_MEM_RETSTATE_SHIFT 9
1084#define OMAP4430_SL2_MEM_RETSTATE_MASK (1 << 9)
1085
1086/* Used by PM_IVAHD_PWRSTST */
1087#define OMAP4430_SL2_MEM_STATEST_SHIFT 6
1088#define OMAP4430_SL2_MEM_STATEST_MASK (0x3 << 6)
1089
1090/* Used by PRM_VC_VAL_BYPASS */
1091#define OMAP4430_SLAVEADDR_SHIFT 0 77#define OMAP4430_SLAVEADDR_SHIFT 0
1092#define OMAP4430_SLAVEADDR_MASK (0x7f << 0)
1093
1094/* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */
1095#define OMAP4430_SLEEP_RBB_SEL_SHIFT 3
1096#define OMAP4430_SLEEP_RBB_SEL_MASK (1 << 3)
1097
1098/* Used by PRM_SRAM_COUNT */
1099#define OMAP4430_SLPCNT_VALUE_SHIFT 16
1100#define OMAP4430_SLPCNT_VALUE_MASK (0xff << 16)
1101
1102/* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_IVA_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */
1103#define OMAP4430_SMPSWAITTIMEMAX_SHIFT 8 78#define OMAP4430_SMPSWAITTIMEMAX_SHIFT 8
1104#define OMAP4430_SMPSWAITTIMEMAX_MASK (0xffff << 8)
1105
1106/* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_IVA_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */
1107#define OMAP4430_SMPSWAITTIMEMIN_SHIFT 8 79#define OMAP4430_SMPSWAITTIMEMIN_SHIFT 8
1108#define OMAP4430_SMPSWAITTIMEMIN_MASK (0xffff << 8)
1109
1110/* Used by PRM_VC_ERRST */
1111#define OMAP4430_SMPS_RA_ERR_CORE_SHIFT 1
1112#define OMAP4430_SMPS_RA_ERR_CORE_MASK (1 << 1)
1113
1114/* Used by PRM_VC_ERRST */
1115#define OMAP4430_SMPS_RA_ERR_IVA_SHIFT 9
1116#define OMAP4430_SMPS_RA_ERR_IVA_MASK (1 << 9)
1117
1118/* Used by PRM_VC_ERRST */
1119#define OMAP4430_SMPS_RA_ERR_MPU_SHIFT 17
1120#define OMAP4430_SMPS_RA_ERR_MPU_MASK (1 << 17)
1121
1122/* Used by PRM_VC_ERRST */
1123#define OMAP4430_SMPS_SA_ERR_CORE_SHIFT 0
1124#define OMAP4430_SMPS_SA_ERR_CORE_MASK (1 << 0)
1125
1126/* Used by PRM_VC_ERRST */
1127#define OMAP4430_SMPS_SA_ERR_IVA_SHIFT 8
1128#define OMAP4430_SMPS_SA_ERR_IVA_MASK (1 << 8)
1129
1130/* Used by PRM_VC_ERRST */
1131#define OMAP4430_SMPS_SA_ERR_MPU_SHIFT 16
1132#define OMAP4430_SMPS_SA_ERR_MPU_MASK (1 << 16)
1133
1134/* Used by PRM_VC_ERRST */
1135#define OMAP4430_SMPS_TIMEOUT_ERR_CORE_SHIFT 2
1136#define OMAP4430_SMPS_TIMEOUT_ERR_CORE_MASK (1 << 2)
1137
1138/* Used by PRM_VC_ERRST */
1139#define OMAP4430_SMPS_TIMEOUT_ERR_IVA_SHIFT 10
1140#define OMAP4430_SMPS_TIMEOUT_ERR_IVA_MASK (1 << 10)
1141
1142/* Used by PRM_VC_ERRST */
1143#define OMAP4430_SMPS_TIMEOUT_ERR_MPU_SHIFT 18
1144#define OMAP4430_SMPS_TIMEOUT_ERR_MPU_MASK (1 << 18)
1145
1146/* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */
1147#define OMAP4430_SR2EN_SHIFT 0
1148#define OMAP4430_SR2EN_MASK (1 << 0)
1149
1150/* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */
1151#define OMAP4430_SR2_IN_TRANSITION_SHIFT 6
1152#define OMAP4430_SR2_IN_TRANSITION_MASK (1 << 6)
1153
1154/* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */
1155#define OMAP4430_SR2_STATUS_SHIFT 3
1156#define OMAP4430_SR2_STATUS_MASK (0x3 << 3)
1157
1158/* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */
1159#define OMAP4430_SR2_WTCNT_VALUE_SHIFT 8
1160#define OMAP4430_SR2_WTCNT_VALUE_MASK (0xff << 8)
1161
1162/*
1163 * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL,
1164 * PRM_LDO_SRAM_MPU_CTRL
1165 */
1166#define OMAP4430_SRAMLDO_STATUS_SHIFT 8
1167#define OMAP4430_SRAMLDO_STATUS_MASK (1 << 8)
1168
1169/*
1170 * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL,
1171 * PRM_LDO_SRAM_MPU_CTRL
1172 */
1173#define OMAP4430_SRAM_IN_TRANSITION_SHIFT 9
1174#define OMAP4430_SRAM_IN_TRANSITION_MASK (1 << 9)
1175
1176/* Used by PRM_VC_CFG_I2C_MODE */
1177#define OMAP4430_SRMODEEN_SHIFT 4
1178#define OMAP4430_SRMODEEN_MASK (1 << 4)
1179
1180/* Used by PRM_VOLTSETUP_WARMRESET */
1181#define OMAP4430_STABLE_COUNT_SHIFT 0
1182#define OMAP4430_STABLE_COUNT_MASK (0x3f << 0)
1183
1184/* Used by PRM_VOLTSETUP_WARMRESET */
1185#define OMAP4430_STABLE_PRESCAL_SHIFT 8
1186#define OMAP4430_STABLE_PRESCAL_MASK (0x3 << 8)
1187
1188/* Used by PRM_LDO_BANDGAP_SETUP */
1189#define OMAP4430_STARTUP_COUNT_SHIFT 0
1190#define OMAP4430_STARTUP_COUNT_MASK (0xff << 0)
1191
1192/* Renamed from STARTUP_COUNT Used by PRM_SRAM_COUNT */
1193#define OMAP4430_STARTUP_COUNT_24_31_SHIFT 24
1194#define OMAP4430_STARTUP_COUNT_24_31_MASK (0xff << 24)
1195
1196/* Used by PM_IVAHD_PWRSTCTRL */
1197#define OMAP4430_TCM1_MEM_ONSTATE_SHIFT 20
1198#define OMAP4430_TCM1_MEM_ONSTATE_MASK (0x3 << 20)
1199
1200/* Used by PM_IVAHD_PWRSTCTRL */
1201#define OMAP4430_TCM1_MEM_RETSTATE_SHIFT 10
1202#define OMAP4430_TCM1_MEM_RETSTATE_MASK (1 << 10)
1203
1204/* Used by PM_IVAHD_PWRSTST */
1205#define OMAP4430_TCM1_MEM_STATEST_SHIFT 8
1206#define OMAP4430_TCM1_MEM_STATEST_MASK (0x3 << 8)
1207
1208/* Used by PM_IVAHD_PWRSTCTRL */
1209#define OMAP4430_TCM2_MEM_ONSTATE_SHIFT 22
1210#define OMAP4430_TCM2_MEM_ONSTATE_MASK (0x3 << 22)
1211
1212/* Used by PM_IVAHD_PWRSTCTRL */
1213#define OMAP4430_TCM2_MEM_RETSTATE_SHIFT 11
1214#define OMAP4430_TCM2_MEM_RETSTATE_MASK (1 << 11)
1215
1216/* Used by PM_IVAHD_PWRSTST */
1217#define OMAP4430_TCM2_MEM_STATEST_SHIFT 10
1218#define OMAP4430_TCM2_MEM_STATEST_MASK (0x3 << 10)
1219
1220/* Used by RM_TESLA_RSTST */
1221#define OMAP4430_TESLASS_EMU_RSTST_SHIFT 2
1222#define OMAP4430_TESLASS_EMU_RSTST_MASK (1 << 2)
1223
1224/* Used by RM_TESLA_RSTST */
1225#define OMAP4430_TESLA_DSP_EMU_REQ_RSTST_SHIFT 3
1226#define OMAP4430_TESLA_DSP_EMU_REQ_RSTST_MASK (1 << 3)
1227
1228/* Used by PM_TESLA_PWRSTCTRL */
1229#define OMAP4430_TESLA_EDMA_ONSTATE_SHIFT 20
1230#define OMAP4430_TESLA_EDMA_ONSTATE_MASK (0x3 << 20)
1231
1232/* Used by PM_TESLA_PWRSTCTRL */
1233#define OMAP4430_TESLA_EDMA_RETSTATE_SHIFT 10
1234#define OMAP4430_TESLA_EDMA_RETSTATE_MASK (1 << 10)
1235
1236/* Used by PM_TESLA_PWRSTST */
1237#define OMAP4430_TESLA_EDMA_STATEST_SHIFT 8
1238#define OMAP4430_TESLA_EDMA_STATEST_MASK (0x3 << 8)
1239
1240/* Used by PM_TESLA_PWRSTCTRL */
1241#define OMAP4430_TESLA_L1_ONSTATE_SHIFT 16
1242#define OMAP4430_TESLA_L1_ONSTATE_MASK (0x3 << 16)
1243
1244/* Used by PM_TESLA_PWRSTCTRL */
1245#define OMAP4430_TESLA_L1_RETSTATE_SHIFT 8
1246#define OMAP4430_TESLA_L1_RETSTATE_MASK (1 << 8)
1247
1248/* Used by PM_TESLA_PWRSTST */
1249#define OMAP4430_TESLA_L1_STATEST_SHIFT 4
1250#define OMAP4430_TESLA_L1_STATEST_MASK (0x3 << 4)
1251
1252/* Used by PM_TESLA_PWRSTCTRL */
1253#define OMAP4430_TESLA_L2_ONSTATE_SHIFT 18
1254#define OMAP4430_TESLA_L2_ONSTATE_MASK (0x3 << 18)
1255
1256/* Used by PM_TESLA_PWRSTCTRL */
1257#define OMAP4430_TESLA_L2_RETSTATE_SHIFT 9
1258#define OMAP4430_TESLA_L2_RETSTATE_MASK (1 << 9)
1259
1260/* Used by PM_TESLA_PWRSTST */
1261#define OMAP4430_TESLA_L2_STATEST_SHIFT 6
1262#define OMAP4430_TESLA_L2_STATEST_MASK (0x3 << 6)
1263
1264/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1265#define OMAP4430_TIMEOUT_SHIFT 0 80#define OMAP4430_TIMEOUT_SHIFT 0
1266#define OMAP4430_TIMEOUT_MASK (0xffff << 0)
1267
1268/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
1269#define OMAP4430_TIMEOUTEN_SHIFT 3
1270#define OMAP4430_TIMEOUTEN_MASK (1 << 3) 81#define OMAP4430_TIMEOUTEN_MASK (1 << 3)
1271
1272/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1273#define OMAP4430_TRANSITION_EN_SHIFT 8
1274#define OMAP4430_TRANSITION_EN_MASK (1 << 8)
1275
1276/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1277#define OMAP4430_TRANSITION_ST_SHIFT 8
1278#define OMAP4430_TRANSITION_ST_MASK (1 << 8)
1279
1280/* Used by PRM_VC_VAL_BYPASS */
1281#define OMAP4430_VALID_SHIFT 24
1282#define OMAP4430_VALID_MASK (1 << 24) 82#define OMAP4430_VALID_MASK (1 << 24)
1283
1284/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1285#define OMAP4430_VC_BYPASSACK_EN_SHIFT 14
1286#define OMAP4430_VC_BYPASSACK_EN_MASK (1 << 14)
1287
1288/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1289#define OMAP4430_VC_BYPASSACK_ST_SHIFT 14
1290#define OMAP4430_VC_BYPASSACK_ST_MASK (1 << 14)
1291
1292/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1293#define OMAP4430_VC_CORE_VPACK_EN_SHIFT 22
1294#define OMAP4430_VC_CORE_VPACK_EN_MASK (1 << 22)
1295
1296/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1297#define OMAP4430_VC_CORE_VPACK_ST_SHIFT 22
1298#define OMAP4430_VC_CORE_VPACK_ST_MASK (1 << 22)
1299
1300/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1301#define OMAP4430_VC_IVA_VPACK_EN_SHIFT 30
1302#define OMAP4430_VC_IVA_VPACK_EN_MASK (1 << 30)
1303
1304/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1305#define OMAP4430_VC_IVA_VPACK_ST_SHIFT 30
1306#define OMAP4430_VC_IVA_VPACK_ST_MASK (1 << 30)
1307
1308/* Used by PRM_IRQENABLE_MPU_2 */
1309#define OMAP4430_VC_MPU_VPACK_EN_SHIFT 6
1310#define OMAP4430_VC_MPU_VPACK_EN_MASK (1 << 6)
1311
1312/* Used by PRM_IRQSTATUS_MPU_2 */
1313#define OMAP4430_VC_MPU_VPACK_ST_SHIFT 6
1314#define OMAP4430_VC_MPU_VPACK_ST_MASK (1 << 6)
1315
1316/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1317#define OMAP4430_VC_RAERR_EN_SHIFT 12
1318#define OMAP4430_VC_RAERR_EN_MASK (1 << 12)
1319
1320/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1321#define OMAP4430_VC_RAERR_ST_SHIFT 12
1322#define OMAP4430_VC_RAERR_ST_MASK (1 << 12)
1323
1324/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1325#define OMAP4430_VC_SAERR_EN_SHIFT 11
1326#define OMAP4430_VC_SAERR_EN_MASK (1 << 11)
1327
1328/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1329#define OMAP4430_VC_SAERR_ST_SHIFT 11
1330#define OMAP4430_VC_SAERR_ST_MASK (1 << 11)
1331
1332/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1333#define OMAP4430_VC_TOERR_EN_SHIFT 13
1334#define OMAP4430_VC_TOERR_EN_MASK (1 << 13)
1335
1336/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1337#define OMAP4430_VC_TOERR_ST_SHIFT 13
1338#define OMAP4430_VC_TOERR_ST_MASK (1 << 13)
1339
1340/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1341#define OMAP4430_VDDMAX_SHIFT 24 83#define OMAP4430_VDDMAX_SHIFT 24
1342#define OMAP4430_VDDMAX_MASK (0xff << 24)
1343
1344/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1345#define OMAP4430_VDDMIN_SHIFT 16 84#define OMAP4430_VDDMIN_SHIFT 16
1346#define OMAP4430_VDDMIN_MASK (0xff << 16)
1347
1348/* Used by PRM_VOLTCTRL */
1349#define OMAP4430_VDD_CORE_I2C_DISABLE_SHIFT 12
1350#define OMAP4430_VDD_CORE_I2C_DISABLE_MASK (1 << 12)
1351
1352/* Used by PRM_RSTST */
1353#define OMAP4430_VDD_CORE_VOLT_MGR_RST_SHIFT 8 85#define OMAP4430_VDD_CORE_VOLT_MGR_RST_SHIFT 8
1354#define OMAP4430_VDD_CORE_VOLT_MGR_RST_MASK (1 << 8)
1355
1356/* Used by PRM_VOLTCTRL */
1357#define OMAP4430_VDD_IVA_I2C_DISABLE_SHIFT 14
1358#define OMAP4430_VDD_IVA_I2C_DISABLE_MASK (1 << 14)
1359
1360/* Used by PRM_VOLTCTRL */
1361#define OMAP4430_VDD_IVA_PRESENCE_SHIFT 9
1362#define OMAP4430_VDD_IVA_PRESENCE_MASK (1 << 9)
1363
1364/* Used by PRM_RSTST */
1365#define OMAP4430_VDD_IVA_VOLT_MGR_RST_SHIFT 7 86#define OMAP4430_VDD_IVA_VOLT_MGR_RST_SHIFT 7
1366#define OMAP4430_VDD_IVA_VOLT_MGR_RST_MASK (1 << 7)
1367
1368/* Used by PRM_VOLTCTRL */
1369#define OMAP4430_VDD_MPU_I2C_DISABLE_SHIFT 13
1370#define OMAP4430_VDD_MPU_I2C_DISABLE_MASK (1 << 13)
1371
1372/* Used by PRM_VOLTCTRL */
1373#define OMAP4430_VDD_MPU_PRESENCE_SHIFT 8
1374#define OMAP4430_VDD_MPU_PRESENCE_MASK (1 << 8)
1375
1376/* Used by PRM_RSTST */
1377#define OMAP4430_VDD_MPU_VOLT_MGR_RST_SHIFT 6 87#define OMAP4430_VDD_MPU_VOLT_MGR_RST_SHIFT 6
1378#define OMAP4430_VDD_MPU_VOLT_MGR_RST_MASK (1 << 6)
1379
1380/* Used by PRM_VC_ERRST */
1381#define OMAP4430_VFSM_RA_ERR_CORE_SHIFT 4
1382#define OMAP4430_VFSM_RA_ERR_CORE_MASK (1 << 4)
1383
1384/* Used by PRM_VC_ERRST */
1385#define OMAP4430_VFSM_RA_ERR_IVA_SHIFT 12
1386#define OMAP4430_VFSM_RA_ERR_IVA_MASK (1 << 12)
1387
1388/* Used by PRM_VC_ERRST */
1389#define OMAP4430_VFSM_RA_ERR_MPU_SHIFT 20
1390#define OMAP4430_VFSM_RA_ERR_MPU_MASK (1 << 20)
1391
1392/* Used by PRM_VC_ERRST */
1393#define OMAP4430_VFSM_SA_ERR_CORE_SHIFT 3
1394#define OMAP4430_VFSM_SA_ERR_CORE_MASK (1 << 3)
1395
1396/* Used by PRM_VC_ERRST */
1397#define OMAP4430_VFSM_SA_ERR_IVA_SHIFT 11
1398#define OMAP4430_VFSM_SA_ERR_IVA_MASK (1 << 11)
1399
1400/* Used by PRM_VC_ERRST */
1401#define OMAP4430_VFSM_SA_ERR_MPU_SHIFT 19
1402#define OMAP4430_VFSM_SA_ERR_MPU_MASK (1 << 19)
1403
1404/* Used by PRM_VC_ERRST */
1405#define OMAP4430_VFSM_TIMEOUT_ERR_CORE_SHIFT 5
1406#define OMAP4430_VFSM_TIMEOUT_ERR_CORE_MASK (1 << 5)
1407
1408/* Used by PRM_VC_ERRST */
1409#define OMAP4430_VFSM_TIMEOUT_ERR_IVA_SHIFT 13
1410#define OMAP4430_VFSM_TIMEOUT_ERR_IVA_MASK (1 << 13)
1411
1412/* Used by PRM_VC_ERRST */
1413#define OMAP4430_VFSM_TIMEOUT_ERR_MPU_SHIFT 21
1414#define OMAP4430_VFSM_TIMEOUT_ERR_MPU_MASK (1 << 21)
1415
1416/* Used by PRM_VC_VAL_SMPS_RA_VOL */
1417#define OMAP4430_VOLRA_VDD_CORE_L_SHIFT 0
1418#define OMAP4430_VOLRA_VDD_CORE_L_MASK (0xff << 0) 88#define OMAP4430_VOLRA_VDD_CORE_L_MASK (0xff << 0)
1419
1420/* Used by PRM_VC_VAL_SMPS_RA_VOL */
1421#define OMAP4430_VOLRA_VDD_IVA_L_SHIFT 8
1422#define OMAP4430_VOLRA_VDD_IVA_L_MASK (0xff << 8) 89#define OMAP4430_VOLRA_VDD_IVA_L_MASK (0xff << 8)
1423
1424/* Used by PRM_VC_VAL_SMPS_RA_VOL */
1425#define OMAP4430_VOLRA_VDD_MPU_L_SHIFT 16
1426#define OMAP4430_VOLRA_VDD_MPU_L_MASK (0xff << 16) 90#define OMAP4430_VOLRA_VDD_MPU_L_MASK (0xff << 16)
1427
1428/* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */
1429#define OMAP4430_VPENABLE_SHIFT 0
1430#define OMAP4430_VPENABLE_MASK (1 << 0) 91#define OMAP4430_VPENABLE_MASK (1 << 0)
1431
1432/* Used by PRM_VP_CORE_STATUS, PRM_VP_IVA_STATUS, PRM_VP_MPU_STATUS */
1433#define OMAP4430_VPINIDLE_SHIFT 0
1434#define OMAP4430_VPINIDLE_MASK (1 << 0)
1435
1436/* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_IVA_VOLTAGE, PRM_VP_MPU_VOLTAGE */
1437#define OMAP4430_VPVOLTAGE_SHIFT 0
1438#define OMAP4430_VPVOLTAGE_MASK (0xff << 0) 92#define OMAP4430_VPVOLTAGE_MASK (0xff << 0)
1439
1440/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1441#define OMAP4430_VP_CORE_EQVALUE_EN_SHIFT 20
1442#define OMAP4430_VP_CORE_EQVALUE_EN_MASK (1 << 20)
1443
1444/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1445#define OMAP4430_VP_CORE_EQVALUE_ST_SHIFT 20
1446#define OMAP4430_VP_CORE_EQVALUE_ST_MASK (1 << 20)
1447
1448/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1449#define OMAP4430_VP_CORE_MAXVDD_EN_SHIFT 18
1450#define OMAP4430_VP_CORE_MAXVDD_EN_MASK (1 << 18)
1451
1452/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1453#define OMAP4430_VP_CORE_MAXVDD_ST_SHIFT 18
1454#define OMAP4430_VP_CORE_MAXVDD_ST_MASK (1 << 18)
1455
1456/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1457#define OMAP4430_VP_CORE_MINVDD_EN_SHIFT 17
1458#define OMAP4430_VP_CORE_MINVDD_EN_MASK (1 << 17)
1459
1460/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1461#define OMAP4430_VP_CORE_MINVDD_ST_SHIFT 17
1462#define OMAP4430_VP_CORE_MINVDD_ST_MASK (1 << 17)
1463
1464/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1465#define OMAP4430_VP_CORE_NOSMPSACK_EN_SHIFT 19
1466#define OMAP4430_VP_CORE_NOSMPSACK_EN_MASK (1 << 19)
1467
1468/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1469#define OMAP4430_VP_CORE_NOSMPSACK_ST_SHIFT 19
1470#define OMAP4430_VP_CORE_NOSMPSACK_ST_MASK (1 << 19)
1471
1472/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1473#define OMAP4430_VP_CORE_OPPCHANGEDONE_EN_SHIFT 16
1474#define OMAP4430_VP_CORE_OPPCHANGEDONE_EN_MASK (1 << 16)
1475
1476/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1477#define OMAP4430_VP_CORE_OPPCHANGEDONE_ST_SHIFT 16
1478#define OMAP4430_VP_CORE_OPPCHANGEDONE_ST_MASK (1 << 16)
1479
1480/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1481#define OMAP4430_VP_CORE_TRANXDONE_EN_SHIFT 21
1482#define OMAP4430_VP_CORE_TRANXDONE_EN_MASK (1 << 21)
1483
1484/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1485#define OMAP4430_VP_CORE_TRANXDONE_ST_SHIFT 21
1486#define OMAP4430_VP_CORE_TRANXDONE_ST_MASK (1 << 21) 93#define OMAP4430_VP_CORE_TRANXDONE_ST_MASK (1 << 21)
1487
1488/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1489#define OMAP4430_VP_IVA_EQVALUE_EN_SHIFT 28
1490#define OMAP4430_VP_IVA_EQVALUE_EN_MASK (1 << 28)
1491
1492/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1493#define OMAP4430_VP_IVA_EQVALUE_ST_SHIFT 28
1494#define OMAP4430_VP_IVA_EQVALUE_ST_MASK (1 << 28)
1495
1496/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1497#define OMAP4430_VP_IVA_MAXVDD_EN_SHIFT 26
1498#define OMAP4430_VP_IVA_MAXVDD_EN_MASK (1 << 26)
1499
1500/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1501#define OMAP4430_VP_IVA_MAXVDD_ST_SHIFT 26
1502#define OMAP4430_VP_IVA_MAXVDD_ST_MASK (1 << 26)
1503
1504/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1505#define OMAP4430_VP_IVA_MINVDD_EN_SHIFT 25
1506#define OMAP4430_VP_IVA_MINVDD_EN_MASK (1 << 25)
1507
1508/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1509#define OMAP4430_VP_IVA_MINVDD_ST_SHIFT 25
1510#define OMAP4430_VP_IVA_MINVDD_ST_MASK (1 << 25)
1511
1512/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1513#define OMAP4430_VP_IVA_NOSMPSACK_EN_SHIFT 27
1514#define OMAP4430_VP_IVA_NOSMPSACK_EN_MASK (1 << 27)
1515
1516/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1517#define OMAP4430_VP_IVA_NOSMPSACK_ST_SHIFT 27
1518#define OMAP4430_VP_IVA_NOSMPSACK_ST_MASK (1 << 27)
1519
1520/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1521#define OMAP4430_VP_IVA_OPPCHANGEDONE_EN_SHIFT 24
1522#define OMAP4430_VP_IVA_OPPCHANGEDONE_EN_MASK (1 << 24)
1523
1524/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1525#define OMAP4430_VP_IVA_OPPCHANGEDONE_ST_SHIFT 24
1526#define OMAP4430_VP_IVA_OPPCHANGEDONE_ST_MASK (1 << 24)
1527
1528/* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */
1529#define OMAP4430_VP_IVA_TRANXDONE_EN_SHIFT 29
1530#define OMAP4430_VP_IVA_TRANXDONE_EN_MASK (1 << 29)
1531
1532/* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */
1533#define OMAP4430_VP_IVA_TRANXDONE_ST_SHIFT 29
1534#define OMAP4430_VP_IVA_TRANXDONE_ST_MASK (1 << 29) 94#define OMAP4430_VP_IVA_TRANXDONE_ST_MASK (1 << 29)
1535
1536/* Used by PRM_IRQENABLE_MPU_2 */
1537#define OMAP4430_VP_MPU_EQVALUE_EN_SHIFT 4
1538#define OMAP4430_VP_MPU_EQVALUE_EN_MASK (1 << 4)
1539
1540/* Used by PRM_IRQSTATUS_MPU_2 */
1541#define OMAP4430_VP_MPU_EQVALUE_ST_SHIFT 4
1542#define OMAP4430_VP_MPU_EQVALUE_ST_MASK (1 << 4)
1543
1544/* Used by PRM_IRQENABLE_MPU_2 */
1545#define OMAP4430_VP_MPU_MAXVDD_EN_SHIFT 2
1546#define OMAP4430_VP_MPU_MAXVDD_EN_MASK (1 << 2)
1547
1548/* Used by PRM_IRQSTATUS_MPU_2 */
1549#define OMAP4430_VP_MPU_MAXVDD_ST_SHIFT 2
1550#define OMAP4430_VP_MPU_MAXVDD_ST_MASK (1 << 2)
1551
1552/* Used by PRM_IRQENABLE_MPU_2 */
1553#define OMAP4430_VP_MPU_MINVDD_EN_SHIFT 1
1554#define OMAP4430_VP_MPU_MINVDD_EN_MASK (1 << 1)
1555
1556/* Used by PRM_IRQSTATUS_MPU_2 */
1557#define OMAP4430_VP_MPU_MINVDD_ST_SHIFT 1
1558#define OMAP4430_VP_MPU_MINVDD_ST_MASK (1 << 1)
1559
1560/* Used by PRM_IRQENABLE_MPU_2 */
1561#define OMAP4430_VP_MPU_NOSMPSACK_EN_SHIFT 3
1562#define OMAP4430_VP_MPU_NOSMPSACK_EN_MASK (1 << 3)
1563
1564/* Used by PRM_IRQSTATUS_MPU_2 */
1565#define OMAP4430_VP_MPU_NOSMPSACK_ST_SHIFT 3
1566#define OMAP4430_VP_MPU_NOSMPSACK_ST_MASK (1 << 3)
1567
1568/* Used by PRM_IRQENABLE_MPU_2 */
1569#define OMAP4430_VP_MPU_OPPCHANGEDONE_EN_SHIFT 0
1570#define OMAP4430_VP_MPU_OPPCHANGEDONE_EN_MASK (1 << 0)
1571
1572/* Used by PRM_IRQSTATUS_MPU_2 */
1573#define OMAP4430_VP_MPU_OPPCHANGEDONE_ST_SHIFT 0
1574#define OMAP4430_VP_MPU_OPPCHANGEDONE_ST_MASK (1 << 0)
1575
1576/* Used by PRM_IRQENABLE_MPU_2 */
1577#define OMAP4430_VP_MPU_TRANXDONE_EN_SHIFT 5
1578#define OMAP4430_VP_MPU_TRANXDONE_EN_MASK (1 << 5)
1579
1580/* Used by PRM_IRQSTATUS_MPU_2 */
1581#define OMAP4430_VP_MPU_TRANXDONE_ST_SHIFT 5
1582#define OMAP4430_VP_MPU_TRANXDONE_ST_MASK (1 << 5) 95#define OMAP4430_VP_MPU_TRANXDONE_ST_MASK (1 << 5)
1583
1584/* Used by PRM_SRAM_COUNT */
1585#define OMAP4430_VSETUPCNT_VALUE_SHIFT 8
1586#define OMAP4430_VSETUPCNT_VALUE_MASK (0xff << 8)
1587
1588/* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_IVA_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */
1589#define OMAP4430_VSTEPMAX_SHIFT 0 96#define OMAP4430_VSTEPMAX_SHIFT 0
1590#define OMAP4430_VSTEPMAX_MASK (0xff << 0)
1591
1592/* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_IVA_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */
1593#define OMAP4430_VSTEPMIN_SHIFT 0 97#define OMAP4430_VSTEPMIN_SHIFT 0
1594#define OMAP4430_VSTEPMIN_MASK (0xff << 0)
1595
1596/* Used by PRM_MODEM_IF_CTRL */
1597#define OMAP4430_WAKE_MODEM_SHIFT 0
1598#define OMAP4430_WAKE_MODEM_MASK (1 << 0)
1599
1600/* Used by PM_DSS_DSS_WKDEP */
1601#define OMAP4430_WKUPDEP_DISPC_DUCATI_SHIFT 1
1602#define OMAP4430_WKUPDEP_DISPC_DUCATI_MASK (1 << 1)
1603
1604/* Used by PM_DSS_DSS_WKDEP */
1605#define OMAP4430_WKUPDEP_DISPC_MPU_SHIFT 0
1606#define OMAP4430_WKUPDEP_DISPC_MPU_MASK (1 << 0)
1607
1608/* Used by PM_DSS_DSS_WKDEP */
1609#define OMAP4430_WKUPDEP_DISPC_SDMA_SHIFT 3
1610#define OMAP4430_WKUPDEP_DISPC_SDMA_MASK (1 << 3)
1611
1612/* Used by PM_DSS_DSS_WKDEP */
1613#define OMAP4430_WKUPDEP_DISPC_TESLA_SHIFT 2
1614#define OMAP4430_WKUPDEP_DISPC_TESLA_MASK (1 << 2)
1615
1616/* Used by PM_ABE_DMIC_WKDEP */
1617#define OMAP4430_WKUPDEP_DMIC_DMA_SDMA_SHIFT 7
1618#define OMAP4430_WKUPDEP_DMIC_DMA_SDMA_MASK (1 << 7)
1619
1620/* Used by PM_ABE_DMIC_WKDEP */
1621#define OMAP4430_WKUPDEP_DMIC_DMA_TESLA_SHIFT 6
1622#define OMAP4430_WKUPDEP_DMIC_DMA_TESLA_MASK (1 << 6)
1623
1624/* Used by PM_ABE_DMIC_WKDEP */
1625#define OMAP4430_WKUPDEP_DMIC_IRQ_MPU_SHIFT 0
1626#define OMAP4430_WKUPDEP_DMIC_IRQ_MPU_MASK (1 << 0)
1627
1628/* Used by PM_ABE_DMIC_WKDEP */
1629#define OMAP4430_WKUPDEP_DMIC_IRQ_TESLA_SHIFT 2
1630#define OMAP4430_WKUPDEP_DMIC_IRQ_TESLA_MASK (1 << 2)
1631
1632/* Used by PM_L4PER_DMTIMER10_WKDEP */
1633#define OMAP4430_WKUPDEP_DMTIMER10_MPU_SHIFT 0
1634#define OMAP4430_WKUPDEP_DMTIMER10_MPU_MASK (1 << 0)
1635
1636/* Used by PM_L4PER_DMTIMER11_WKDEP */
1637#define OMAP4430_WKUPDEP_DMTIMER11_DUCATI_SHIFT 1
1638#define OMAP4430_WKUPDEP_DMTIMER11_DUCATI_MASK (1 << 1)
1639
1640/* Used by PM_L4PER_DMTIMER11_WKDEP */
1641#define OMAP4430_WKUPDEP_DMTIMER11_MPU_SHIFT 0
1642#define OMAP4430_WKUPDEP_DMTIMER11_MPU_MASK (1 << 0)
1643
1644/* Used by PM_L4PER_DMTIMER2_WKDEP */
1645#define OMAP4430_WKUPDEP_DMTIMER2_MPU_SHIFT 0
1646#define OMAP4430_WKUPDEP_DMTIMER2_MPU_MASK (1 << 0)
1647
1648/* Used by PM_L4PER_DMTIMER3_WKDEP */
1649#define OMAP4430_WKUPDEP_DMTIMER3_DUCATI_SHIFT 1
1650#define OMAP4430_WKUPDEP_DMTIMER3_DUCATI_MASK (1 << 1)
1651
1652/* Used by PM_L4PER_DMTIMER3_WKDEP */
1653#define OMAP4430_WKUPDEP_DMTIMER3_MPU_SHIFT 0
1654#define OMAP4430_WKUPDEP_DMTIMER3_MPU_MASK (1 << 0)
1655
1656/* Used by PM_L4PER_DMTIMER4_WKDEP */
1657#define OMAP4430_WKUPDEP_DMTIMER4_DUCATI_SHIFT 1
1658#define OMAP4430_WKUPDEP_DMTIMER4_DUCATI_MASK (1 << 1)
1659
1660/* Used by PM_L4PER_DMTIMER4_WKDEP */
1661#define OMAP4430_WKUPDEP_DMTIMER4_MPU_SHIFT 0
1662#define OMAP4430_WKUPDEP_DMTIMER4_MPU_MASK (1 << 0)
1663
1664/* Used by PM_L4PER_DMTIMER9_WKDEP */
1665#define OMAP4430_WKUPDEP_DMTIMER9_DUCATI_SHIFT 1
1666#define OMAP4430_WKUPDEP_DMTIMER9_DUCATI_MASK (1 << 1)
1667
1668/* Used by PM_L4PER_DMTIMER9_WKDEP */
1669#define OMAP4430_WKUPDEP_DMTIMER9_MPU_SHIFT 0
1670#define OMAP4430_WKUPDEP_DMTIMER9_MPU_MASK (1 << 0)
1671
1672/* Used by PM_DSS_DSS_WKDEP */
1673#define OMAP4430_WKUPDEP_DSI1_DUCATI_SHIFT 5
1674#define OMAP4430_WKUPDEP_DSI1_DUCATI_MASK (1 << 5)
1675
1676/* Used by PM_DSS_DSS_WKDEP */
1677#define OMAP4430_WKUPDEP_DSI1_MPU_SHIFT 4
1678#define OMAP4430_WKUPDEP_DSI1_MPU_MASK (1 << 4)
1679
1680/* Used by PM_DSS_DSS_WKDEP */
1681#define OMAP4430_WKUPDEP_DSI1_SDMA_SHIFT 7
1682#define OMAP4430_WKUPDEP_DSI1_SDMA_MASK (1 << 7)
1683
1684/* Used by PM_DSS_DSS_WKDEP */
1685#define OMAP4430_WKUPDEP_DSI1_TESLA_SHIFT 6
1686#define OMAP4430_WKUPDEP_DSI1_TESLA_MASK (1 << 6)
1687
1688/* Used by PM_DSS_DSS_WKDEP */
1689#define OMAP4430_WKUPDEP_DSI2_DUCATI_SHIFT 9
1690#define OMAP4430_WKUPDEP_DSI2_DUCATI_MASK (1 << 9)
1691
1692/* Used by PM_DSS_DSS_WKDEP */
1693#define OMAP4430_WKUPDEP_DSI2_MPU_SHIFT 8
1694#define OMAP4430_WKUPDEP_DSI2_MPU_MASK (1 << 8)
1695
1696/* Used by PM_DSS_DSS_WKDEP */
1697#define OMAP4430_WKUPDEP_DSI2_SDMA_SHIFT 11
1698#define OMAP4430_WKUPDEP_DSI2_SDMA_MASK (1 << 11)
1699
1700/* Used by PM_DSS_DSS_WKDEP */
1701#define OMAP4430_WKUPDEP_DSI2_TESLA_SHIFT 10
1702#define OMAP4430_WKUPDEP_DSI2_TESLA_MASK (1 << 10)
1703
1704/* Used by PM_WKUP_GPIO1_WKDEP */
1705#define OMAP4430_WKUPDEP_GPIO1_IRQ1_DUCATI_SHIFT 1
1706#define OMAP4430_WKUPDEP_GPIO1_IRQ1_DUCATI_MASK (1 << 1)
1707
1708/* Used by PM_WKUP_GPIO1_WKDEP */
1709#define OMAP4430_WKUPDEP_GPIO1_IRQ1_MPU_SHIFT 0
1710#define OMAP4430_WKUPDEP_GPIO1_IRQ1_MPU_MASK (1 << 0)
1711
1712/* Used by PM_WKUP_GPIO1_WKDEP */
1713#define OMAP4430_WKUPDEP_GPIO1_IRQ2_TESLA_SHIFT 6
1714#define OMAP4430_WKUPDEP_GPIO1_IRQ2_TESLA_MASK (1 << 6)
1715
1716/* Used by PM_L4PER_GPIO2_WKDEP */
1717#define OMAP4430_WKUPDEP_GPIO2_IRQ1_DUCATI_SHIFT 1
1718#define OMAP4430_WKUPDEP_GPIO2_IRQ1_DUCATI_MASK (1 << 1)
1719
1720/* Used by PM_L4PER_GPIO2_WKDEP */
1721#define OMAP4430_WKUPDEP_GPIO2_IRQ1_MPU_SHIFT 0
1722#define OMAP4430_WKUPDEP_GPIO2_IRQ1_MPU_MASK (1 << 0)
1723
1724/* Used by PM_L4PER_GPIO2_WKDEP */
1725#define OMAP4430_WKUPDEP_GPIO2_IRQ2_TESLA_SHIFT 6
1726#define OMAP4430_WKUPDEP_GPIO2_IRQ2_TESLA_MASK (1 << 6)
1727
1728/* Used by PM_L4PER_GPIO3_WKDEP */
1729#define OMAP4430_WKUPDEP_GPIO3_IRQ1_MPU_SHIFT 0
1730#define OMAP4430_WKUPDEP_GPIO3_IRQ1_MPU_MASK (1 << 0)
1731
1732/* Used by PM_L4PER_GPIO3_WKDEP */
1733#define OMAP4430_WKUPDEP_GPIO3_IRQ2_TESLA_SHIFT 6
1734#define OMAP4430_WKUPDEP_GPIO3_IRQ2_TESLA_MASK (1 << 6)
1735
1736/* Used by PM_L4PER_GPIO4_WKDEP */
1737#define OMAP4430_WKUPDEP_GPIO4_IRQ1_MPU_SHIFT 0
1738#define OMAP4430_WKUPDEP_GPIO4_IRQ1_MPU_MASK (1 << 0)
1739
1740/* Used by PM_L4PER_GPIO4_WKDEP */
1741#define OMAP4430_WKUPDEP_GPIO4_IRQ2_TESLA_SHIFT 6
1742#define OMAP4430_WKUPDEP_GPIO4_IRQ2_TESLA_MASK (1 << 6)
1743
1744/* Used by PM_L4PER_GPIO5_WKDEP */
1745#define OMAP4430_WKUPDEP_GPIO5_IRQ1_MPU_SHIFT 0
1746#define OMAP4430_WKUPDEP_GPIO5_IRQ1_MPU_MASK (1 << 0)
1747
1748/* Used by PM_L4PER_GPIO5_WKDEP */
1749#define OMAP4430_WKUPDEP_GPIO5_IRQ2_TESLA_SHIFT 6
1750#define OMAP4430_WKUPDEP_GPIO5_IRQ2_TESLA_MASK (1 << 6)
1751
1752/* Used by PM_L4PER_GPIO6_WKDEP */
1753#define OMAP4430_WKUPDEP_GPIO6_IRQ1_MPU_SHIFT 0
1754#define OMAP4430_WKUPDEP_GPIO6_IRQ1_MPU_MASK (1 << 0)
1755
1756/* Used by PM_L4PER_GPIO6_WKDEP */
1757#define OMAP4430_WKUPDEP_GPIO6_IRQ2_TESLA_SHIFT 6
1758#define OMAP4430_WKUPDEP_GPIO6_IRQ2_TESLA_MASK (1 << 6)
1759
1760/* Used by PM_DSS_DSS_WKDEP */
1761#define OMAP4430_WKUPDEP_HDMIDMA_SDMA_SHIFT 19
1762#define OMAP4430_WKUPDEP_HDMIDMA_SDMA_MASK (1 << 19)
1763
1764/* Used by PM_DSS_DSS_WKDEP */
1765#define OMAP4430_WKUPDEP_HDMIIRQ_DUCATI_SHIFT 13
1766#define OMAP4430_WKUPDEP_HDMIIRQ_DUCATI_MASK (1 << 13)
1767
1768/* Used by PM_DSS_DSS_WKDEP */
1769#define OMAP4430_WKUPDEP_HDMIIRQ_MPU_SHIFT 12
1770#define OMAP4430_WKUPDEP_HDMIIRQ_MPU_MASK (1 << 12)
1771
1772/* Used by PM_DSS_DSS_WKDEP */
1773#define OMAP4430_WKUPDEP_HDMIIRQ_TESLA_SHIFT 14
1774#define OMAP4430_WKUPDEP_HDMIIRQ_TESLA_MASK (1 << 14)
1775
1776/* Used by PM_L4PER_HECC1_WKDEP */
1777#define OMAP4430_WKUPDEP_HECC1_MPU_SHIFT 0
1778#define OMAP4430_WKUPDEP_HECC1_MPU_MASK (1 << 0)
1779
1780/* Used by PM_L4PER_HECC2_WKDEP */
1781#define OMAP4430_WKUPDEP_HECC2_MPU_SHIFT 0
1782#define OMAP4430_WKUPDEP_HECC2_MPU_MASK (1 << 0)
1783
1784/* Used by PM_L3INIT_HSI_WKDEP */
1785#define OMAP4430_WKUPDEP_HSI_DSP_TESLA_SHIFT 6
1786#define OMAP4430_WKUPDEP_HSI_DSP_TESLA_MASK (1 << 6)
1787
1788/* Used by PM_L3INIT_HSI_WKDEP */
1789#define OMAP4430_WKUPDEP_HSI_MCU_DUCATI_SHIFT 1
1790#define OMAP4430_WKUPDEP_HSI_MCU_DUCATI_MASK (1 << 1)
1791
1792/* Used by PM_L3INIT_HSI_WKDEP */
1793#define OMAP4430_WKUPDEP_HSI_MCU_MPU_SHIFT 0
1794#define OMAP4430_WKUPDEP_HSI_MCU_MPU_MASK (1 << 0)
1795
1796/* Used by PM_L4PER_I2C1_WKDEP */
1797#define OMAP4430_WKUPDEP_I2C1_DMA_SDMA_SHIFT 7
1798#define OMAP4430_WKUPDEP_I2C1_DMA_SDMA_MASK (1 << 7)
1799
1800/* Used by PM_L4PER_I2C1_WKDEP */
1801#define OMAP4430_WKUPDEP_I2C1_IRQ_DUCATI_SHIFT 1
1802#define OMAP4430_WKUPDEP_I2C1_IRQ_DUCATI_MASK (1 << 1)
1803
1804/* Used by PM_L4PER_I2C1_WKDEP */
1805#define OMAP4430_WKUPDEP_I2C1_IRQ_MPU_SHIFT 0
1806#define OMAP4430_WKUPDEP_I2C1_IRQ_MPU_MASK (1 << 0)
1807
1808/* Used by PM_L4PER_I2C2_WKDEP */
1809#define OMAP4430_WKUPDEP_I2C2_DMA_SDMA_SHIFT 7
1810#define OMAP4430_WKUPDEP_I2C2_DMA_SDMA_MASK (1 << 7)
1811
1812/* Used by PM_L4PER_I2C2_WKDEP */
1813#define OMAP4430_WKUPDEP_I2C2_IRQ_DUCATI_SHIFT 1
1814#define OMAP4430_WKUPDEP_I2C2_IRQ_DUCATI_MASK (1 << 1)
1815
1816/* Used by PM_L4PER_I2C2_WKDEP */
1817#define OMAP4430_WKUPDEP_I2C2_IRQ_MPU_SHIFT 0
1818#define OMAP4430_WKUPDEP_I2C2_IRQ_MPU_MASK (1 << 0)
1819
1820/* Used by PM_L4PER_I2C3_WKDEP */
1821#define OMAP4430_WKUPDEP_I2C3_DMA_SDMA_SHIFT 7
1822#define OMAP4430_WKUPDEP_I2C3_DMA_SDMA_MASK (1 << 7)
1823
1824/* Used by PM_L4PER_I2C3_WKDEP */
1825#define OMAP4430_WKUPDEP_I2C3_IRQ_DUCATI_SHIFT 1
1826#define OMAP4430_WKUPDEP_I2C3_IRQ_DUCATI_MASK (1 << 1)
1827
1828/* Used by PM_L4PER_I2C3_WKDEP */
1829#define OMAP4430_WKUPDEP_I2C3_IRQ_MPU_SHIFT 0
1830#define OMAP4430_WKUPDEP_I2C3_IRQ_MPU_MASK (1 << 0)
1831
1832/* Used by PM_L4PER_I2C4_WKDEP */
1833#define OMAP4430_WKUPDEP_I2C4_DMA_SDMA_SHIFT 7
1834#define OMAP4430_WKUPDEP_I2C4_DMA_SDMA_MASK (1 << 7)
1835
1836/* Used by PM_L4PER_I2C4_WKDEP */
1837#define OMAP4430_WKUPDEP_I2C4_IRQ_DUCATI_SHIFT 1
1838#define OMAP4430_WKUPDEP_I2C4_IRQ_DUCATI_MASK (1 << 1)
1839
1840/* Used by PM_L4PER_I2C4_WKDEP */
1841#define OMAP4430_WKUPDEP_I2C4_IRQ_MPU_SHIFT 0
1842#define OMAP4430_WKUPDEP_I2C4_IRQ_MPU_MASK (1 << 0)
1843
1844/* Used by PM_L4PER_I2C5_WKDEP */
1845#define OMAP4430_WKUPDEP_I2C5_DMA_SDMA_SHIFT 7
1846#define OMAP4430_WKUPDEP_I2C5_DMA_SDMA_MASK (1 << 7)
1847
1848/* Used by PM_L4PER_I2C5_WKDEP */
1849#define OMAP4430_WKUPDEP_I2C5_IRQ_MPU_SHIFT 0
1850#define OMAP4430_WKUPDEP_I2C5_IRQ_MPU_MASK (1 << 0)
1851
1852/* Used by PM_WKUP_KEYBOARD_WKDEP */
1853#define OMAP4430_WKUPDEP_KEYBOARD_MPU_SHIFT 0
1854#define OMAP4430_WKUPDEP_KEYBOARD_MPU_MASK (1 << 0)
1855
1856/* Used by PM_ABE_MCASP_WKDEP */
1857#define OMAP4430_WKUPDEP_MCASP1_DMA_SDMA_SHIFT 7
1858#define OMAP4430_WKUPDEP_MCASP1_DMA_SDMA_MASK (1 << 7)
1859
1860/* Used by PM_ABE_MCASP_WKDEP */
1861#define OMAP4430_WKUPDEP_MCASP1_DMA_TESLA_SHIFT 6
1862#define OMAP4430_WKUPDEP_MCASP1_DMA_TESLA_MASK (1 << 6)
1863
1864/* Used by PM_ABE_MCASP_WKDEP */
1865#define OMAP4430_WKUPDEP_MCASP1_IRQ_MPU_SHIFT 0
1866#define OMAP4430_WKUPDEP_MCASP1_IRQ_MPU_MASK (1 << 0)
1867
1868/* Used by PM_ABE_MCASP_WKDEP */
1869#define OMAP4430_WKUPDEP_MCASP1_IRQ_TESLA_SHIFT 2
1870#define OMAP4430_WKUPDEP_MCASP1_IRQ_TESLA_MASK (1 << 2)
1871
1872/* Used by PM_L4PER_MCASP2_WKDEP */
1873#define OMAP4430_WKUPDEP_MCASP2_DMA_SDMA_SHIFT 7
1874#define OMAP4430_WKUPDEP_MCASP2_DMA_SDMA_MASK (1 << 7)
1875
1876/* Used by PM_L4PER_MCASP2_WKDEP */
1877#define OMAP4430_WKUPDEP_MCASP2_DMA_TESLA_SHIFT 6
1878#define OMAP4430_WKUPDEP_MCASP2_DMA_TESLA_MASK (1 << 6)
1879
1880/* Used by PM_L4PER_MCASP2_WKDEP */
1881#define OMAP4430_WKUPDEP_MCASP2_IRQ_MPU_SHIFT 0
1882#define OMAP4430_WKUPDEP_MCASP2_IRQ_MPU_MASK (1 << 0)
1883
1884/* Used by PM_L4PER_MCASP2_WKDEP */
1885#define OMAP4430_WKUPDEP_MCASP2_IRQ_TESLA_SHIFT 2
1886#define OMAP4430_WKUPDEP_MCASP2_IRQ_TESLA_MASK (1 << 2)
1887
1888/* Used by PM_L4PER_MCASP3_WKDEP */
1889#define OMAP4430_WKUPDEP_MCASP3_DMA_SDMA_SHIFT 7
1890#define OMAP4430_WKUPDEP_MCASP3_DMA_SDMA_MASK (1 << 7)
1891
1892/* Used by PM_L4PER_MCASP3_WKDEP */
1893#define OMAP4430_WKUPDEP_MCASP3_DMA_TESLA_SHIFT 6
1894#define OMAP4430_WKUPDEP_MCASP3_DMA_TESLA_MASK (1 << 6)
1895
1896/* Used by PM_L4PER_MCASP3_WKDEP */
1897#define OMAP4430_WKUPDEP_MCASP3_IRQ_MPU_SHIFT 0
1898#define OMAP4430_WKUPDEP_MCASP3_IRQ_MPU_MASK (1 << 0)
1899
1900/* Used by PM_L4PER_MCASP3_WKDEP */
1901#define OMAP4430_WKUPDEP_MCASP3_IRQ_TESLA_SHIFT 2
1902#define OMAP4430_WKUPDEP_MCASP3_IRQ_TESLA_MASK (1 << 2)
1903
1904/* Used by PM_ABE_MCBSP1_WKDEP */
1905#define OMAP4430_WKUPDEP_MCBSP1_MPU_SHIFT 0
1906#define OMAP4430_WKUPDEP_MCBSP1_MPU_MASK (1 << 0)
1907
1908/* Used by PM_ABE_MCBSP1_WKDEP */
1909#define OMAP4430_WKUPDEP_MCBSP1_SDMA_SHIFT 3
1910#define OMAP4430_WKUPDEP_MCBSP1_SDMA_MASK (1 << 3)
1911
1912/* Used by PM_ABE_MCBSP1_WKDEP */
1913#define OMAP4430_WKUPDEP_MCBSP1_TESLA_SHIFT 2
1914#define OMAP4430_WKUPDEP_MCBSP1_TESLA_MASK (1 << 2)
1915
1916/* Used by PM_ABE_MCBSP2_WKDEP */
1917#define OMAP4430_WKUPDEP_MCBSP2_MPU_SHIFT 0
1918#define OMAP4430_WKUPDEP_MCBSP2_MPU_MASK (1 << 0)
1919
1920/* Used by PM_ABE_MCBSP2_WKDEP */
1921#define OMAP4430_WKUPDEP_MCBSP2_SDMA_SHIFT 3
1922#define OMAP4430_WKUPDEP_MCBSP2_SDMA_MASK (1 << 3)
1923
1924/* Used by PM_ABE_MCBSP2_WKDEP */
1925#define OMAP4430_WKUPDEP_MCBSP2_TESLA_SHIFT 2
1926#define OMAP4430_WKUPDEP_MCBSP2_TESLA_MASK (1 << 2)
1927
1928/* Used by PM_ABE_MCBSP3_WKDEP */
1929#define OMAP4430_WKUPDEP_MCBSP3_MPU_SHIFT 0
1930#define OMAP4430_WKUPDEP_MCBSP3_MPU_MASK (1 << 0)
1931
1932/* Used by PM_ABE_MCBSP3_WKDEP */
1933#define OMAP4430_WKUPDEP_MCBSP3_SDMA_SHIFT 3
1934#define OMAP4430_WKUPDEP_MCBSP3_SDMA_MASK (1 << 3)
1935
1936/* Used by PM_ABE_MCBSP3_WKDEP */
1937#define OMAP4430_WKUPDEP_MCBSP3_TESLA_SHIFT 2
1938#define OMAP4430_WKUPDEP_MCBSP3_TESLA_MASK (1 << 2)
1939
1940/* Used by PM_L4PER_MCBSP4_WKDEP */
1941#define OMAP4430_WKUPDEP_MCBSP4_MPU_SHIFT 0
1942#define OMAP4430_WKUPDEP_MCBSP4_MPU_MASK (1 << 0)
1943
1944/* Used by PM_L4PER_MCBSP4_WKDEP */
1945#define OMAP4430_WKUPDEP_MCBSP4_SDMA_SHIFT 3
1946#define OMAP4430_WKUPDEP_MCBSP4_SDMA_MASK (1 << 3)
1947
1948/* Used by PM_L4PER_MCBSP4_WKDEP */
1949#define OMAP4430_WKUPDEP_MCBSP4_TESLA_SHIFT 2
1950#define OMAP4430_WKUPDEP_MCBSP4_TESLA_MASK (1 << 2)
1951
1952/* Used by PM_L4PER_MCSPI1_WKDEP */
1953#define OMAP4430_WKUPDEP_MCSPI1_DUCATI_SHIFT 1
1954#define OMAP4430_WKUPDEP_MCSPI1_DUCATI_MASK (1 << 1)
1955
1956/* Used by PM_L4PER_MCSPI1_WKDEP */
1957#define OMAP4430_WKUPDEP_MCSPI1_MPU_SHIFT 0
1958#define OMAP4430_WKUPDEP_MCSPI1_MPU_MASK (1 << 0)
1959
1960/* Used by PM_L4PER_MCSPI1_WKDEP */
1961#define OMAP4430_WKUPDEP_MCSPI1_SDMA_SHIFT 3
1962#define OMAP4430_WKUPDEP_MCSPI1_SDMA_MASK (1 << 3)
1963
1964/* Used by PM_L4PER_MCSPI1_WKDEP */
1965#define OMAP4430_WKUPDEP_MCSPI1_TESLA_SHIFT 2
1966#define OMAP4430_WKUPDEP_MCSPI1_TESLA_MASK (1 << 2)
1967
1968/* Used by PM_L4PER_MCSPI2_WKDEP */
1969#define OMAP4430_WKUPDEP_MCSPI2_DUCATI_SHIFT 1
1970#define OMAP4430_WKUPDEP_MCSPI2_DUCATI_MASK (1 << 1)
1971
1972/* Used by PM_L4PER_MCSPI2_WKDEP */
1973#define OMAP4430_WKUPDEP_MCSPI2_MPU_SHIFT 0
1974#define OMAP4430_WKUPDEP_MCSPI2_MPU_MASK (1 << 0)
1975
1976/* Used by PM_L4PER_MCSPI2_WKDEP */
1977#define OMAP4430_WKUPDEP_MCSPI2_SDMA_SHIFT 3
1978#define OMAP4430_WKUPDEP_MCSPI2_SDMA_MASK (1 << 3)
1979
1980/* Used by PM_L4PER_MCSPI3_WKDEP */
1981#define OMAP4430_WKUPDEP_MCSPI3_MPU_SHIFT 0
1982#define OMAP4430_WKUPDEP_MCSPI3_MPU_MASK (1 << 0)
1983
1984/* Used by PM_L4PER_MCSPI3_WKDEP */
1985#define OMAP4430_WKUPDEP_MCSPI3_SDMA_SHIFT 3
1986#define OMAP4430_WKUPDEP_MCSPI3_SDMA_MASK (1 << 3)
1987
1988/* Used by PM_L4PER_MCSPI4_WKDEP */
1989#define OMAP4430_WKUPDEP_MCSPI4_MPU_SHIFT 0
1990#define OMAP4430_WKUPDEP_MCSPI4_MPU_MASK (1 << 0)
1991
1992/* Used by PM_L4PER_MCSPI4_WKDEP */
1993#define OMAP4430_WKUPDEP_MCSPI4_SDMA_SHIFT 3
1994#define OMAP4430_WKUPDEP_MCSPI4_SDMA_MASK (1 << 3)
1995
1996/* Used by PM_L3INIT_MMC1_WKDEP */
1997#define OMAP4430_WKUPDEP_MMC1_DUCATI_SHIFT 1
1998#define OMAP4430_WKUPDEP_MMC1_DUCATI_MASK (1 << 1)
1999
2000/* Used by PM_L3INIT_MMC1_WKDEP */
2001#define OMAP4430_WKUPDEP_MMC1_MPU_SHIFT 0
2002#define OMAP4430_WKUPDEP_MMC1_MPU_MASK (1 << 0)
2003
2004/* Used by PM_L3INIT_MMC1_WKDEP */
2005#define OMAP4430_WKUPDEP_MMC1_SDMA_SHIFT 3
2006#define OMAP4430_WKUPDEP_MMC1_SDMA_MASK (1 << 3)
2007
2008/* Used by PM_L3INIT_MMC1_WKDEP */
2009#define OMAP4430_WKUPDEP_MMC1_TESLA_SHIFT 2
2010#define OMAP4430_WKUPDEP_MMC1_TESLA_MASK (1 << 2)
2011
2012/* Used by PM_L3INIT_MMC2_WKDEP */
2013#define OMAP4430_WKUPDEP_MMC2_DUCATI_SHIFT 1
2014#define OMAP4430_WKUPDEP_MMC2_DUCATI_MASK (1 << 1)
2015
2016/* Used by PM_L3INIT_MMC2_WKDEP */
2017#define OMAP4430_WKUPDEP_MMC2_MPU_SHIFT 0
2018#define OMAP4430_WKUPDEP_MMC2_MPU_MASK (1 << 0)
2019
2020/* Used by PM_L3INIT_MMC2_WKDEP */
2021#define OMAP4430_WKUPDEP_MMC2_SDMA_SHIFT 3
2022#define OMAP4430_WKUPDEP_MMC2_SDMA_MASK (1 << 3)
2023
2024/* Used by PM_L3INIT_MMC2_WKDEP */
2025#define OMAP4430_WKUPDEP_MMC2_TESLA_SHIFT 2
2026#define OMAP4430_WKUPDEP_MMC2_TESLA_MASK (1 << 2)
2027
2028/* Used by PM_L3INIT_MMC6_WKDEP */
2029#define OMAP4430_WKUPDEP_MMC6_DUCATI_SHIFT 1
2030#define OMAP4430_WKUPDEP_MMC6_DUCATI_MASK (1 << 1)
2031
2032/* Used by PM_L3INIT_MMC6_WKDEP */
2033#define OMAP4430_WKUPDEP_MMC6_MPU_SHIFT 0
2034#define OMAP4430_WKUPDEP_MMC6_MPU_MASK (1 << 0)
2035
2036/* Used by PM_L3INIT_MMC6_WKDEP */
2037#define OMAP4430_WKUPDEP_MMC6_TESLA_SHIFT 2
2038#define OMAP4430_WKUPDEP_MMC6_TESLA_MASK (1 << 2)
2039
2040/* Used by PM_L4PER_MMCSD3_WKDEP */
2041#define OMAP4430_WKUPDEP_MMCSD3_DUCATI_SHIFT 1
2042#define OMAP4430_WKUPDEP_MMCSD3_DUCATI_MASK (1 << 1)
2043
2044/* Used by PM_L4PER_MMCSD3_WKDEP */
2045#define OMAP4430_WKUPDEP_MMCSD3_MPU_SHIFT 0
2046#define OMAP4430_WKUPDEP_MMCSD3_MPU_MASK (1 << 0)
2047
2048/* Used by PM_L4PER_MMCSD3_WKDEP */
2049#define OMAP4430_WKUPDEP_MMCSD3_SDMA_SHIFT 3
2050#define OMAP4430_WKUPDEP_MMCSD3_SDMA_MASK (1 << 3)
2051
2052/* Used by PM_L4PER_MMCSD4_WKDEP */
2053#define OMAP4430_WKUPDEP_MMCSD4_DUCATI_SHIFT 1
2054#define OMAP4430_WKUPDEP_MMCSD4_DUCATI_MASK (1 << 1)
2055
2056/* Used by PM_L4PER_MMCSD4_WKDEP */
2057#define OMAP4430_WKUPDEP_MMCSD4_MPU_SHIFT 0
2058#define OMAP4430_WKUPDEP_MMCSD4_MPU_MASK (1 << 0)
2059
2060/* Used by PM_L4PER_MMCSD4_WKDEP */
2061#define OMAP4430_WKUPDEP_MMCSD4_SDMA_SHIFT 3
2062#define OMAP4430_WKUPDEP_MMCSD4_SDMA_MASK (1 << 3)
2063
2064/* Used by PM_L4PER_MMCSD5_WKDEP */
2065#define OMAP4430_WKUPDEP_MMCSD5_DUCATI_SHIFT 1
2066#define OMAP4430_WKUPDEP_MMCSD5_DUCATI_MASK (1 << 1)
2067
2068/* Used by PM_L4PER_MMCSD5_WKDEP */
2069#define OMAP4430_WKUPDEP_MMCSD5_MPU_SHIFT 0
2070#define OMAP4430_WKUPDEP_MMCSD5_MPU_MASK (1 << 0)
2071
2072/* Used by PM_L4PER_MMCSD5_WKDEP */
2073#define OMAP4430_WKUPDEP_MMCSD5_SDMA_SHIFT 3
2074#define OMAP4430_WKUPDEP_MMCSD5_SDMA_MASK (1 << 3)
2075
2076/* Used by PM_L3INIT_PCIESS_WKDEP */
2077#define OMAP4430_WKUPDEP_PCIESS_MPU_SHIFT 0
2078#define OMAP4430_WKUPDEP_PCIESS_MPU_MASK (1 << 0)
2079
2080/* Used by PM_L3INIT_PCIESS_WKDEP */
2081#define OMAP4430_WKUPDEP_PCIESS_TESLA_SHIFT 2
2082#define OMAP4430_WKUPDEP_PCIESS_TESLA_MASK (1 << 2)
2083
2084/* Used by PM_ABE_PDM_WKDEP */
2085#define OMAP4430_WKUPDEP_PDM_DMA_SDMA_SHIFT 7
2086#define OMAP4430_WKUPDEP_PDM_DMA_SDMA_MASK (1 << 7)
2087
2088/* Used by PM_ABE_PDM_WKDEP */
2089#define OMAP4430_WKUPDEP_PDM_DMA_TESLA_SHIFT 6
2090#define OMAP4430_WKUPDEP_PDM_DMA_TESLA_MASK (1 << 6)
2091
2092/* Used by PM_ABE_PDM_WKDEP */
2093#define OMAP4430_WKUPDEP_PDM_IRQ_MPU_SHIFT 0
2094#define OMAP4430_WKUPDEP_PDM_IRQ_MPU_MASK (1 << 0)
2095
2096/* Used by PM_ABE_PDM_WKDEP */
2097#define OMAP4430_WKUPDEP_PDM_IRQ_TESLA_SHIFT 2
2098#define OMAP4430_WKUPDEP_PDM_IRQ_TESLA_MASK (1 << 2)
2099
2100/* Used by PM_WKUP_RTC_WKDEP */
2101#define OMAP4430_WKUPDEP_RTC_MPU_SHIFT 0
2102#define OMAP4430_WKUPDEP_RTC_MPU_MASK (1 << 0)
2103
2104/* Used by PM_L3INIT_SATA_WKDEP */
2105#define OMAP4430_WKUPDEP_SATA_MPU_SHIFT 0
2106#define OMAP4430_WKUPDEP_SATA_MPU_MASK (1 << 0)
2107
2108/* Used by PM_L3INIT_SATA_WKDEP */
2109#define OMAP4430_WKUPDEP_SATA_TESLA_SHIFT 2
2110#define OMAP4430_WKUPDEP_SATA_TESLA_MASK (1 << 2)
2111
2112/* Used by PM_ABE_SLIMBUS_WKDEP */
2113#define OMAP4430_WKUPDEP_SLIMBUS1_DMA_SDMA_SHIFT 7
2114#define OMAP4430_WKUPDEP_SLIMBUS1_DMA_SDMA_MASK (1 << 7)
2115
2116/* Used by PM_ABE_SLIMBUS_WKDEP */
2117#define OMAP4430_WKUPDEP_SLIMBUS1_DMA_TESLA_SHIFT 6
2118#define OMAP4430_WKUPDEP_SLIMBUS1_DMA_TESLA_MASK (1 << 6)
2119
2120/* Used by PM_ABE_SLIMBUS_WKDEP */
2121#define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_MPU_SHIFT 0
2122#define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_MPU_MASK (1 << 0)
2123
2124/* Used by PM_ABE_SLIMBUS_WKDEP */
2125#define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_TESLA_SHIFT 2
2126#define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_TESLA_MASK (1 << 2)
2127
2128/* Used by PM_L4PER_SLIMBUS2_WKDEP */
2129#define OMAP4430_WKUPDEP_SLIMBUS2_DMA_SDMA_SHIFT 7
2130#define OMAP4430_WKUPDEP_SLIMBUS2_DMA_SDMA_MASK (1 << 7)
2131
2132/* Used by PM_L4PER_SLIMBUS2_WKDEP */
2133#define OMAP4430_WKUPDEP_SLIMBUS2_DMA_TESLA_SHIFT 6
2134#define OMAP4430_WKUPDEP_SLIMBUS2_DMA_TESLA_MASK (1 << 6)
2135
2136/* Used by PM_L4PER_SLIMBUS2_WKDEP */
2137#define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_MPU_SHIFT 0
2138#define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_MPU_MASK (1 << 0)
2139
2140/* Used by PM_L4PER_SLIMBUS2_WKDEP */
2141#define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_TESLA_SHIFT 2
2142#define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_TESLA_MASK (1 << 2)
2143
2144/* Used by PM_ALWON_SR_CORE_WKDEP */
2145#define OMAP4430_WKUPDEP_SR_CORE_DUCATI_SHIFT 1
2146#define OMAP4430_WKUPDEP_SR_CORE_DUCATI_MASK (1 << 1)
2147
2148/* Used by PM_ALWON_SR_CORE_WKDEP */
2149#define OMAP4430_WKUPDEP_SR_CORE_MPU_SHIFT 0
2150#define OMAP4430_WKUPDEP_SR_CORE_MPU_MASK (1 << 0)
2151
2152/* Used by PM_ALWON_SR_IVA_WKDEP */
2153#define OMAP4430_WKUPDEP_SR_IVA_DUCATI_SHIFT 1
2154#define OMAP4430_WKUPDEP_SR_IVA_DUCATI_MASK (1 << 1)
2155
2156/* Used by PM_ALWON_SR_IVA_WKDEP */
2157#define OMAP4430_WKUPDEP_SR_IVA_MPU_SHIFT 0
2158#define OMAP4430_WKUPDEP_SR_IVA_MPU_MASK (1 << 0)
2159
2160/* Used by PM_ALWON_SR_MPU_WKDEP */
2161#define OMAP4430_WKUPDEP_SR_MPU_MPU_SHIFT 0
2162#define OMAP4430_WKUPDEP_SR_MPU_MPU_MASK (1 << 0)
2163
2164/* Used by PM_WKUP_TIMER12_WKDEP */
2165#define OMAP4430_WKUPDEP_TIMER12_MPU_SHIFT 0
2166#define OMAP4430_WKUPDEP_TIMER12_MPU_MASK (1 << 0)
2167
2168/* Used by PM_WKUP_TIMER1_WKDEP */
2169#define OMAP4430_WKUPDEP_TIMER1_MPU_SHIFT 0
2170#define OMAP4430_WKUPDEP_TIMER1_MPU_MASK (1 << 0)
2171
2172/* Used by PM_ABE_TIMER5_WKDEP */
2173#define OMAP4430_WKUPDEP_TIMER5_MPU_SHIFT 0
2174#define OMAP4430_WKUPDEP_TIMER5_MPU_MASK (1 << 0)
2175
2176/* Used by PM_ABE_TIMER5_WKDEP */
2177#define OMAP4430_WKUPDEP_TIMER5_TESLA_SHIFT 2
2178#define OMAP4430_WKUPDEP_TIMER5_TESLA_MASK (1 << 2)
2179
2180/* Used by PM_ABE_TIMER6_WKDEP */
2181#define OMAP4430_WKUPDEP_TIMER6_MPU_SHIFT 0
2182#define OMAP4430_WKUPDEP_TIMER6_MPU_MASK (1 << 0)
2183
2184/* Used by PM_ABE_TIMER6_WKDEP */
2185#define OMAP4430_WKUPDEP_TIMER6_TESLA_SHIFT 2
2186#define OMAP4430_WKUPDEP_TIMER6_TESLA_MASK (1 << 2)
2187
2188/* Used by PM_ABE_TIMER7_WKDEP */
2189#define OMAP4430_WKUPDEP_TIMER7_MPU_SHIFT 0
2190#define OMAP4430_WKUPDEP_TIMER7_MPU_MASK (1 << 0)
2191
2192/* Used by PM_ABE_TIMER7_WKDEP */
2193#define OMAP4430_WKUPDEP_TIMER7_TESLA_SHIFT 2
2194#define OMAP4430_WKUPDEP_TIMER7_TESLA_MASK (1 << 2)
2195
2196/* Used by PM_ABE_TIMER8_WKDEP */
2197#define OMAP4430_WKUPDEP_TIMER8_MPU_SHIFT 0
2198#define OMAP4430_WKUPDEP_TIMER8_MPU_MASK (1 << 0)
2199
2200/* Used by PM_ABE_TIMER8_WKDEP */
2201#define OMAP4430_WKUPDEP_TIMER8_TESLA_SHIFT 2
2202#define OMAP4430_WKUPDEP_TIMER8_TESLA_MASK (1 << 2)
2203
2204/* Used by PM_L4PER_UART1_WKDEP */
2205#define OMAP4430_WKUPDEP_UART1_MPU_SHIFT 0
2206#define OMAP4430_WKUPDEP_UART1_MPU_MASK (1 << 0)
2207
2208/* Used by PM_L4PER_UART1_WKDEP */
2209#define OMAP4430_WKUPDEP_UART1_SDMA_SHIFT 3
2210#define OMAP4430_WKUPDEP_UART1_SDMA_MASK (1 << 3)
2211
2212/* Used by PM_L4PER_UART2_WKDEP */
2213#define OMAP4430_WKUPDEP_UART2_MPU_SHIFT 0
2214#define OMAP4430_WKUPDEP_UART2_MPU_MASK (1 << 0)
2215
2216/* Used by PM_L4PER_UART2_WKDEP */
2217#define OMAP4430_WKUPDEP_UART2_SDMA_SHIFT 3
2218#define OMAP4430_WKUPDEP_UART2_SDMA_MASK (1 << 3)
2219
2220/* Used by PM_L4PER_UART3_WKDEP */
2221#define OMAP4430_WKUPDEP_UART3_DUCATI_SHIFT 1
2222#define OMAP4430_WKUPDEP_UART3_DUCATI_MASK (1 << 1)
2223
2224/* Used by PM_L4PER_UART3_WKDEP */
2225#define OMAP4430_WKUPDEP_UART3_MPU_SHIFT 0
2226#define OMAP4430_WKUPDEP_UART3_MPU_MASK (1 << 0)
2227
2228/* Used by PM_L4PER_UART3_WKDEP */
2229#define OMAP4430_WKUPDEP_UART3_SDMA_SHIFT 3
2230#define OMAP4430_WKUPDEP_UART3_SDMA_MASK (1 << 3)
2231
2232/* Used by PM_L4PER_UART3_WKDEP */
2233#define OMAP4430_WKUPDEP_UART3_TESLA_SHIFT 2
2234#define OMAP4430_WKUPDEP_UART3_TESLA_MASK (1 << 2)
2235
2236/* Used by PM_L4PER_UART4_WKDEP */
2237#define OMAP4430_WKUPDEP_UART4_MPU_SHIFT 0
2238#define OMAP4430_WKUPDEP_UART4_MPU_MASK (1 << 0)
2239
2240/* Used by PM_L4PER_UART4_WKDEP */
2241#define OMAP4430_WKUPDEP_UART4_SDMA_SHIFT 3
2242#define OMAP4430_WKUPDEP_UART4_SDMA_MASK (1 << 3)
2243
2244/* Used by PM_L3INIT_UNIPRO1_WKDEP */
2245#define OMAP4430_WKUPDEP_UNIPRO1_DUCATI_SHIFT 1
2246#define OMAP4430_WKUPDEP_UNIPRO1_DUCATI_MASK (1 << 1)
2247
2248/* Used by PM_L3INIT_UNIPRO1_WKDEP */
2249#define OMAP4430_WKUPDEP_UNIPRO1_MPU_SHIFT 0
2250#define OMAP4430_WKUPDEP_UNIPRO1_MPU_MASK (1 << 0)
2251
2252/* Used by PM_L3INIT_USB_HOST_WKDEP */
2253#define OMAP4430_WKUPDEP_USB_HOST_DUCATI_SHIFT 1
2254#define OMAP4430_WKUPDEP_USB_HOST_DUCATI_MASK (1 << 1)
2255
2256/* Used by PM_L3INIT_USB_HOST_FS_WKDEP */
2257#define OMAP4430_WKUPDEP_USB_HOST_FS_DUCATI_SHIFT 1
2258#define OMAP4430_WKUPDEP_USB_HOST_FS_DUCATI_MASK (1 << 1)
2259
2260/* Used by PM_L3INIT_USB_HOST_FS_WKDEP */
2261#define OMAP4430_WKUPDEP_USB_HOST_FS_MPU_SHIFT 0
2262#define OMAP4430_WKUPDEP_USB_HOST_FS_MPU_MASK (1 << 0)
2263
2264/* Used by PM_L3INIT_USB_HOST_WKDEP */
2265#define OMAP4430_WKUPDEP_USB_HOST_MPU_SHIFT 0
2266#define OMAP4430_WKUPDEP_USB_HOST_MPU_MASK (1 << 0)
2267
2268/* Used by PM_L3INIT_USB_OTG_WKDEP */
2269#define OMAP4430_WKUPDEP_USB_OTG_DUCATI_SHIFT 1
2270#define OMAP4430_WKUPDEP_USB_OTG_DUCATI_MASK (1 << 1)
2271
2272/* Used by PM_L3INIT_USB_OTG_WKDEP */
2273#define OMAP4430_WKUPDEP_USB_OTG_MPU_SHIFT 0
2274#define OMAP4430_WKUPDEP_USB_OTG_MPU_MASK (1 << 0)
2275
2276/* Used by PM_L3INIT_USB_TLL_WKDEP */
2277#define OMAP4430_WKUPDEP_USB_TLL_DUCATI_SHIFT 1
2278#define OMAP4430_WKUPDEP_USB_TLL_DUCATI_MASK (1 << 1)
2279
2280/* Used by PM_L3INIT_USB_TLL_WKDEP */
2281#define OMAP4430_WKUPDEP_USB_TLL_MPU_SHIFT 0
2282#define OMAP4430_WKUPDEP_USB_TLL_MPU_MASK (1 << 0)
2283
2284/* Used by PM_WKUP_USIM_WKDEP */
2285#define OMAP4430_WKUPDEP_USIM_MPU_SHIFT 0
2286#define OMAP4430_WKUPDEP_USIM_MPU_MASK (1 << 0)
2287
2288/* Used by PM_WKUP_USIM_WKDEP */
2289#define OMAP4430_WKUPDEP_USIM_SDMA_SHIFT 3
2290#define OMAP4430_WKUPDEP_USIM_SDMA_MASK (1 << 3)
2291
2292/* Used by PM_WKUP_WDT2_WKDEP */
2293#define OMAP4430_WKUPDEP_WDT2_DUCATI_SHIFT 1
2294#define OMAP4430_WKUPDEP_WDT2_DUCATI_MASK (1 << 1)
2295
2296/* Used by PM_WKUP_WDT2_WKDEP */
2297#define OMAP4430_WKUPDEP_WDT2_MPU_SHIFT 0
2298#define OMAP4430_WKUPDEP_WDT2_MPU_MASK (1 << 0)
2299
2300/* Used by PM_ABE_WDT3_WKDEP */
2301#define OMAP4430_WKUPDEP_WDT3_MPU_SHIFT 0
2302#define OMAP4430_WKUPDEP_WDT3_MPU_MASK (1 << 0)
2303
2304/* Used by PM_L3INIT_HSI_WKDEP */
2305#define OMAP4430_WKUPDEP_WGM_HSI_WAKE_MPU_SHIFT 8
2306#define OMAP4430_WKUPDEP_WGM_HSI_WAKE_MPU_MASK (1 << 8)
2307
2308/* Used by PM_L3INIT_XHPI_WKDEP */
2309#define OMAP4430_WKUPDEP_XHPI_DUCATI_SHIFT 1
2310#define OMAP4430_WKUPDEP_XHPI_DUCATI_MASK (1 << 1)
2311
2312/* Used by PRM_IO_PMCTRL */
2313#define OMAP4430_WUCLK_CTRL_SHIFT 8
2314#define OMAP4430_WUCLK_CTRL_MASK (1 << 8) 98#define OMAP4430_WUCLK_CTRL_MASK (1 << 8)
2315
2316/* Used by PRM_IO_PMCTRL */
2317#define OMAP4430_WUCLK_STATUS_SHIFT 9 99#define OMAP4430_WUCLK_STATUS_SHIFT 9
2318#define OMAP4430_WUCLK_STATUS_MASK (1 << 9) 100#define OMAP4430_WUCLK_STATUS_MASK (1 << 9)
2319
2320/* Used by REVISION_PRM */
2321#define OMAP4430_X_MAJOR_SHIFT 8
2322#define OMAP4430_X_MAJOR_MASK (0x7 << 8)
2323
2324/* Used by REVISION_PRM */
2325#define OMAP4430_Y_MINOR_SHIFT 0
2326#define OMAP4430_Y_MINOR_MASK (0x3f << 0)
2327#endif 101#endif
diff --git a/arch/arm/mach-omap2/prm-regbits-54xx.h b/arch/arm/mach-omap2/prm-regbits-54xx.h
deleted file mode 100644
index be31b21aa9c6..000000000000
--- a/arch/arm/mach-omap2/prm-regbits-54xx.h
+++ /dev/null
@@ -1,2701 +0,0 @@
1/*
2 * OMAP54xx Power Management register bits
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Paul Walmsley (paul@pwsan.com)
7 * Rajendra Nayak (rnayak@ti.com)
8 * Benoit Cousson (b-cousson@ti.com)
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_54XX_H
22#define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_54XX_H
23
24/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
25#define OMAP54XX_ABBOFF_ACT_SHIFT 1
26#define OMAP54XX_ABBOFF_ACT_WIDTH 0x1
27#define OMAP54XX_ABBOFF_ACT_MASK (1 << 1)
28
29/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
30#define OMAP54XX_ABBOFF_SLEEP_SHIFT 2
31#define OMAP54XX_ABBOFF_SLEEP_WIDTH 0x1
32#define OMAP54XX_ABBOFF_SLEEP_MASK (1 << 2)
33
34/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
35#define OMAP54XX_ABB_MM_DONE_EN_SHIFT 31
36#define OMAP54XX_ABB_MM_DONE_EN_WIDTH 0x1
37#define OMAP54XX_ABB_MM_DONE_EN_MASK (1 << 31)
38
39/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
40#define OMAP54XX_ABB_MM_DONE_ST_SHIFT 31
41#define OMAP54XX_ABB_MM_DONE_ST_WIDTH 0x1
42#define OMAP54XX_ABB_MM_DONE_ST_MASK (1 << 31)
43
44/* Used by PRM_IRQENABLE_MPU_2 */
45#define OMAP54XX_ABB_MPU_DONE_EN_SHIFT 7
46#define OMAP54XX_ABB_MPU_DONE_EN_WIDTH 0x1
47#define OMAP54XX_ABB_MPU_DONE_EN_MASK (1 << 7)
48
49/* Used by PRM_IRQSTATUS_MPU_2 */
50#define OMAP54XX_ABB_MPU_DONE_ST_SHIFT 7
51#define OMAP54XX_ABB_MPU_DONE_ST_WIDTH 0x1
52#define OMAP54XX_ABB_MPU_DONE_ST_MASK (1 << 7)
53
54/* Used by PRM_ABBLDO_MM_SETUP, PRM_ABBLDO_MPU_SETUP */
55#define OMAP54XX_ACTIVE_FBB_SEL_SHIFT 2
56#define OMAP54XX_ACTIVE_FBB_SEL_WIDTH 0x1
57#define OMAP54XX_ACTIVE_FBB_SEL_MASK (1 << 2)
58
59/* Used by PM_ABE_PWRSTCTRL */
60#define OMAP54XX_AESSMEM_ONSTATE_SHIFT 16
61#define OMAP54XX_AESSMEM_ONSTATE_WIDTH 0x2
62#define OMAP54XX_AESSMEM_ONSTATE_MASK (0x3 << 16)
63
64/* Used by PM_ABE_PWRSTCTRL */
65#define OMAP54XX_AESSMEM_RETSTATE_SHIFT 8
66#define OMAP54XX_AESSMEM_RETSTATE_WIDTH 0x1
67#define OMAP54XX_AESSMEM_RETSTATE_MASK (1 << 8)
68
69/* Used by PM_ABE_PWRSTST */
70#define OMAP54XX_AESSMEM_STATEST_SHIFT 4
71#define OMAP54XX_AESSMEM_STATEST_WIDTH 0x2
72#define OMAP54XX_AESSMEM_STATEST_MASK (0x3 << 4)
73
74/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
75#define OMAP54XX_AIPOFF_SHIFT 8
76#define OMAP54XX_AIPOFF_WIDTH 0x1
77#define OMAP54XX_AIPOFF_MASK (1 << 8)
78
79/* Used by PRM_VOLTCTRL */
80#define OMAP54XX_AUTO_CTRL_VDD_CORE_L_SHIFT 0
81#define OMAP54XX_AUTO_CTRL_VDD_CORE_L_WIDTH 0x2
82#define OMAP54XX_AUTO_CTRL_VDD_CORE_L_MASK (0x3 << 0)
83
84/* Used by PRM_VOLTCTRL */
85#define OMAP54XX_AUTO_CTRL_VDD_MM_L_SHIFT 4
86#define OMAP54XX_AUTO_CTRL_VDD_MM_L_WIDTH 0x2
87#define OMAP54XX_AUTO_CTRL_VDD_MM_L_MASK (0x3 << 4)
88
89/* Used by PRM_VOLTCTRL */
90#define OMAP54XX_AUTO_CTRL_VDD_MPU_L_SHIFT 2
91#define OMAP54XX_AUTO_CTRL_VDD_MPU_L_WIDTH 0x2
92#define OMAP54XX_AUTO_CTRL_VDD_MPU_L_MASK (0x3 << 2)
93
94/* Used by PRM_VC_BYPASS_ERRST */
95#define OMAP54XX_BYPS_RA_ERR_SHIFT 1
96#define OMAP54XX_BYPS_RA_ERR_WIDTH 0x1
97#define OMAP54XX_BYPS_RA_ERR_MASK (1 << 1)
98
99/* Used by PRM_VC_BYPASS_ERRST */
100#define OMAP54XX_BYPS_SA_ERR_SHIFT 0
101#define OMAP54XX_BYPS_SA_ERR_WIDTH 0x1
102#define OMAP54XX_BYPS_SA_ERR_MASK (1 << 0)
103
104/* Used by PRM_VC_BYPASS_ERRST */
105#define OMAP54XX_BYPS_TIMEOUT_ERR_SHIFT 2
106#define OMAP54XX_BYPS_TIMEOUT_ERR_WIDTH 0x1
107#define OMAP54XX_BYPS_TIMEOUT_ERR_MASK (1 << 2)
108
109/* Used by PRM_RSTST */
110#define OMAP54XX_C2C_RST_SHIFT 10
111#define OMAP54XX_C2C_RST_WIDTH 0x1
112#define OMAP54XX_C2C_RST_MASK (1 << 10)
113
114/* Used by PM_CAM_PWRSTCTRL */
115#define OMAP54XX_CAM_MEM_ONSTATE_SHIFT 16
116#define OMAP54XX_CAM_MEM_ONSTATE_WIDTH 0x2
117#define OMAP54XX_CAM_MEM_ONSTATE_MASK (0x3 << 16)
118
119/* Used by PM_CAM_PWRSTST */
120#define OMAP54XX_CAM_MEM_STATEST_SHIFT 4
121#define OMAP54XX_CAM_MEM_STATEST_WIDTH 0x2
122#define OMAP54XX_CAM_MEM_STATEST_MASK (0x3 << 4)
123
124/* Used by PRM_CLKREQCTRL */
125#define OMAP54XX_CLKREQ_COND_SHIFT 0
126#define OMAP54XX_CLKREQ_COND_WIDTH 0x3
127#define OMAP54XX_CLKREQ_COND_MASK (0x7 << 0)
128
129/* Used by PRM_VC_SMPS_CORE_CONFIG */
130#define OMAP54XX_CMDRA_VDD_CORE_L_SHIFT 16
131#define OMAP54XX_CMDRA_VDD_CORE_L_WIDTH 0x8
132#define OMAP54XX_CMDRA_VDD_CORE_L_MASK (0xff << 16)
133
134/* Used by PRM_VC_SMPS_MM_CONFIG */
135#define OMAP54XX_CMDRA_VDD_MM_L_SHIFT 16
136#define OMAP54XX_CMDRA_VDD_MM_L_WIDTH 0x8
137#define OMAP54XX_CMDRA_VDD_MM_L_MASK (0xff << 16)
138
139/* Used by PRM_VC_SMPS_MPU_CONFIG */
140#define OMAP54XX_CMDRA_VDD_MPU_L_SHIFT 16
141#define OMAP54XX_CMDRA_VDD_MPU_L_WIDTH 0x8
142#define OMAP54XX_CMDRA_VDD_MPU_L_MASK (0xff << 16)
143
144/* Used by PRM_VC_SMPS_CORE_CONFIG */
145#define OMAP54XX_CMD_VDD_CORE_L_SHIFT 28
146#define OMAP54XX_CMD_VDD_CORE_L_WIDTH 0x1
147#define OMAP54XX_CMD_VDD_CORE_L_MASK (1 << 28)
148
149/* Used by PRM_VC_SMPS_MM_CONFIG */
150#define OMAP54XX_CMD_VDD_MM_L_SHIFT 28
151#define OMAP54XX_CMD_VDD_MM_L_WIDTH 0x1
152#define OMAP54XX_CMD_VDD_MM_L_MASK (1 << 28)
153
154/* Used by PRM_VC_SMPS_MPU_CONFIG */
155#define OMAP54XX_CMD_VDD_MPU_L_SHIFT 28
156#define OMAP54XX_CMD_VDD_MPU_L_WIDTH 0x1
157#define OMAP54XX_CMD_VDD_MPU_L_MASK (1 << 28)
158
159/* Used by PM_CORE_PWRSTCTRL */
160#define OMAP54XX_CORE_OCMRAM_ONSTATE_SHIFT 18
161#define OMAP54XX_CORE_OCMRAM_ONSTATE_WIDTH 0x2
162#define OMAP54XX_CORE_OCMRAM_ONSTATE_MASK (0x3 << 18)
163
164/* Used by PM_CORE_PWRSTCTRL */
165#define OMAP54XX_CORE_OCMRAM_RETSTATE_SHIFT 9
166#define OMAP54XX_CORE_OCMRAM_RETSTATE_WIDTH 0x1
167#define OMAP54XX_CORE_OCMRAM_RETSTATE_MASK (1 << 9)
168
169/* Used by PM_CORE_PWRSTST */
170#define OMAP54XX_CORE_OCMRAM_STATEST_SHIFT 6
171#define OMAP54XX_CORE_OCMRAM_STATEST_WIDTH 0x2
172#define OMAP54XX_CORE_OCMRAM_STATEST_MASK (0x3 << 6)
173
174/* Used by PM_CORE_PWRSTCTRL */
175#define OMAP54XX_CORE_OTHER_BANK_ONSTATE_SHIFT 16
176#define OMAP54XX_CORE_OTHER_BANK_ONSTATE_WIDTH 0x2
177#define OMAP54XX_CORE_OTHER_BANK_ONSTATE_MASK (0x3 << 16)
178
179/* Used by PM_CORE_PWRSTCTRL */
180#define OMAP54XX_CORE_OTHER_BANK_RETSTATE_SHIFT 8
181#define OMAP54XX_CORE_OTHER_BANK_RETSTATE_WIDTH 0x1
182#define OMAP54XX_CORE_OTHER_BANK_RETSTATE_MASK (1 << 8)
183
184/* Used by PM_CORE_PWRSTST */
185#define OMAP54XX_CORE_OTHER_BANK_STATEST_SHIFT 4
186#define OMAP54XX_CORE_OTHER_BANK_STATEST_WIDTH 0x2
187#define OMAP54XX_CORE_OTHER_BANK_STATEST_MASK (0x3 << 4)
188
189/* Used by REVISION_PRM */
190#define OMAP54XX_CUSTOM_SHIFT 6
191#define OMAP54XX_CUSTOM_WIDTH 0x2
192#define OMAP54XX_CUSTOM_MASK (0x3 << 6)
193
194/* Used by PRM_VC_VAL_BYPASS */
195#define OMAP54XX_DATA_SHIFT 16
196#define OMAP54XX_DATA_WIDTH 0x8
197#define OMAP54XX_DATA_MASK (0xff << 16)
198
199/* Used by PRM_DEBUG_CORE_RET_TRANS */
200#define OMAP54XX_PRM_DEBUG_OUT_SHIFT 0
201#define OMAP54XX_PRM_DEBUG_OUT_WIDTH 0x1c
202#define OMAP54XX_PRM_DEBUG_OUT_MASK (0xfffffff << 0)
203
204/* Renamed from DEBUG_OUT Used by PRM_DEBUG_MM_RET_TRANS */
205#define OMAP54XX_DEBUG_OUT_0_9_SHIFT 0
206#define OMAP54XX_DEBUG_OUT_0_9_WIDTH 0xa
207#define OMAP54XX_DEBUG_OUT_0_9_MASK (0x3ff << 0)
208
209/* Renamed from DEBUG_OUT Used by PRM_DEBUG_MPU_RET_TRANS */
210#define OMAP54XX_DEBUG_OUT_0_6_SHIFT 0
211#define OMAP54XX_DEBUG_OUT_0_6_WIDTH 0x7
212#define OMAP54XX_DEBUG_OUT_0_6_MASK (0x7f << 0)
213
214/* Renamed from DEBUG_OUT Used by PRM_DEBUG_OFF_TRANS */
215#define OMAP54XX_DEBUG_OUT_0_31_SHIFT 0
216#define OMAP54XX_DEBUG_OUT_0_31_WIDTH 0x20
217#define OMAP54XX_DEBUG_OUT_0_31_MASK (0xffffffff << 0)
218
219/* Renamed from DEBUG_OUT Used by PRM_DEBUG_WKUPAON_FD_TRANS */
220#define OMAP54XX_DEBUG_OUT_0_11_SHIFT 0
221#define OMAP54XX_DEBUG_OUT_0_11_WIDTH 0xc
222#define OMAP54XX_DEBUG_OUT_0_11_MASK (0xfff << 0)
223
224/* Used by PRM_DEVICE_OFF_CTRL */
225#define OMAP54XX_DEVICE_OFF_ENABLE_SHIFT 0
226#define OMAP54XX_DEVICE_OFF_ENABLE_WIDTH 0x1
227#define OMAP54XX_DEVICE_OFF_ENABLE_MASK (1 << 0)
228
229/* Used by PRM_VC_CFG_I2C_MODE */
230#define OMAP54XX_DFILTEREN_SHIFT 6
231#define OMAP54XX_DFILTEREN_WIDTH 0x1
232#define OMAP54XX_DFILTEREN_MASK (1 << 6)
233
234/* Used by PRM_IRQENABLE_DSP, PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
235#define OMAP54XX_DPLL_ABE_RECAL_EN_SHIFT 4
236#define OMAP54XX_DPLL_ABE_RECAL_EN_WIDTH 0x1
237#define OMAP54XX_DPLL_ABE_RECAL_EN_MASK (1 << 4)
238
239/* Used by PRM_IRQSTATUS_DSP, PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
240#define OMAP54XX_DPLL_ABE_RECAL_ST_SHIFT 4
241#define OMAP54XX_DPLL_ABE_RECAL_ST_WIDTH 0x1
242#define OMAP54XX_DPLL_ABE_RECAL_ST_MASK (1 << 4)
243
244/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
245#define OMAP54XX_DPLL_CORE_RECAL_EN_SHIFT 0
246#define OMAP54XX_DPLL_CORE_RECAL_EN_WIDTH 0x1
247#define OMAP54XX_DPLL_CORE_RECAL_EN_MASK (1 << 0)
248
249/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
250#define OMAP54XX_DPLL_CORE_RECAL_ST_SHIFT 0
251#define OMAP54XX_DPLL_CORE_RECAL_ST_WIDTH 0x1
252#define OMAP54XX_DPLL_CORE_RECAL_ST_MASK (1 << 0)
253
254/* Used by PRM_IRQENABLE_DSP, PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
255#define OMAP54XX_DPLL_IVA_RECAL_EN_SHIFT 2
256#define OMAP54XX_DPLL_IVA_RECAL_EN_WIDTH 0x1
257#define OMAP54XX_DPLL_IVA_RECAL_EN_MASK (1 << 2)
258
259/* Used by PRM_IRQSTATUS_DSP, PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
260#define OMAP54XX_DPLL_IVA_RECAL_ST_SHIFT 2
261#define OMAP54XX_DPLL_IVA_RECAL_ST_WIDTH 0x1
262#define OMAP54XX_DPLL_IVA_RECAL_ST_MASK (1 << 2)
263
264/* Used by PRM_IRQENABLE_MPU */
265#define OMAP54XX_DPLL_MPU_RECAL_EN_SHIFT 1
266#define OMAP54XX_DPLL_MPU_RECAL_EN_WIDTH 0x1
267#define OMAP54XX_DPLL_MPU_RECAL_EN_MASK (1 << 1)
268
269/* Used by PRM_IRQSTATUS_MPU */
270#define OMAP54XX_DPLL_MPU_RECAL_ST_SHIFT 1
271#define OMAP54XX_DPLL_MPU_RECAL_ST_WIDTH 0x1
272#define OMAP54XX_DPLL_MPU_RECAL_ST_MASK (1 << 1)
273
274/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
275#define OMAP54XX_DPLL_PER_RECAL_EN_SHIFT 3
276#define OMAP54XX_DPLL_PER_RECAL_EN_WIDTH 0x1
277#define OMAP54XX_DPLL_PER_RECAL_EN_MASK (1 << 3)
278
279/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
280#define OMAP54XX_DPLL_PER_RECAL_ST_SHIFT 3
281#define OMAP54XX_DPLL_PER_RECAL_ST_WIDTH 0x1
282#define OMAP54XX_DPLL_PER_RECAL_ST_MASK (1 << 3)
283
284/* Used by PM_DSP_PWRSTCTRL */
285#define OMAP54XX_DSP_EDMA_ONSTATE_SHIFT 20
286#define OMAP54XX_DSP_EDMA_ONSTATE_WIDTH 0x2
287#define OMAP54XX_DSP_EDMA_ONSTATE_MASK (0x3 << 20)
288
289/* Used by PM_DSP_PWRSTCTRL */
290#define OMAP54XX_DSP_EDMA_RETSTATE_SHIFT 10
291#define OMAP54XX_DSP_EDMA_RETSTATE_WIDTH 0x1
292#define OMAP54XX_DSP_EDMA_RETSTATE_MASK (1 << 10)
293
294/* Used by PM_DSP_PWRSTST */
295#define OMAP54XX_DSP_EDMA_STATEST_SHIFT 8
296#define OMAP54XX_DSP_EDMA_STATEST_WIDTH 0x2
297#define OMAP54XX_DSP_EDMA_STATEST_MASK (0x3 << 8)
298
299/* Used by PM_DSP_PWRSTCTRL */
300#define OMAP54XX_DSP_L1_ONSTATE_SHIFT 16
301#define OMAP54XX_DSP_L1_ONSTATE_WIDTH 0x2
302#define OMAP54XX_DSP_L1_ONSTATE_MASK (0x3 << 16)
303
304/* Used by PM_DSP_PWRSTCTRL */
305#define OMAP54XX_DSP_L1_RETSTATE_SHIFT 8
306#define OMAP54XX_DSP_L1_RETSTATE_WIDTH 0x1
307#define OMAP54XX_DSP_L1_RETSTATE_MASK (1 << 8)
308
309/* Used by PM_DSP_PWRSTST */
310#define OMAP54XX_DSP_L1_STATEST_SHIFT 4
311#define OMAP54XX_DSP_L1_STATEST_WIDTH 0x2
312#define OMAP54XX_DSP_L1_STATEST_MASK (0x3 << 4)
313
314/* Used by PM_DSP_PWRSTCTRL */
315#define OMAP54XX_DSP_L2_ONSTATE_SHIFT 18
316#define OMAP54XX_DSP_L2_ONSTATE_WIDTH 0x2
317#define OMAP54XX_DSP_L2_ONSTATE_MASK (0x3 << 18)
318
319/* Used by PM_DSP_PWRSTCTRL */
320#define OMAP54XX_DSP_L2_RETSTATE_SHIFT 9
321#define OMAP54XX_DSP_L2_RETSTATE_WIDTH 0x1
322#define OMAP54XX_DSP_L2_RETSTATE_MASK (1 << 9)
323
324/* Used by PM_DSP_PWRSTST */
325#define OMAP54XX_DSP_L2_STATEST_SHIFT 6
326#define OMAP54XX_DSP_L2_STATEST_WIDTH 0x2
327#define OMAP54XX_DSP_L2_STATEST_MASK (0x3 << 6)
328
329/* Used by PM_DSS_PWRSTCTRL */
330#define OMAP54XX_DSS_MEM_ONSTATE_SHIFT 16
331#define OMAP54XX_DSS_MEM_ONSTATE_WIDTH 0x2
332#define OMAP54XX_DSS_MEM_ONSTATE_MASK (0x3 << 16)
333
334/* Used by PM_DSS_PWRSTCTRL */
335#define OMAP54XX_DSS_MEM_RETSTATE_SHIFT 8
336#define OMAP54XX_DSS_MEM_RETSTATE_WIDTH 0x1
337#define OMAP54XX_DSS_MEM_RETSTATE_MASK (1 << 8)
338
339/* Used by PM_DSS_PWRSTST */
340#define OMAP54XX_DSS_MEM_STATEST_SHIFT 4
341#define OMAP54XX_DSS_MEM_STATEST_WIDTH 0x2
342#define OMAP54XX_DSS_MEM_STATEST_MASK (0x3 << 4)
343
344/* Used by PRM_DEVICE_OFF_CTRL */
345#define OMAP54XX_EMIF1_OFFWKUP_DISABLE_SHIFT 8
346#define OMAP54XX_EMIF1_OFFWKUP_DISABLE_WIDTH 0x1
347#define OMAP54XX_EMIF1_OFFWKUP_DISABLE_MASK (1 << 8)
348
349/* Used by PRM_DEVICE_OFF_CTRL */
350#define OMAP54XX_EMIF2_OFFWKUP_DISABLE_SHIFT 9
351#define OMAP54XX_EMIF2_OFFWKUP_DISABLE_WIDTH 0x1
352#define OMAP54XX_EMIF2_OFFWKUP_DISABLE_MASK (1 << 9)
353
354/* Used by PM_EMU_PWRSTCTRL */
355#define OMAP54XX_EMU_BANK_ONSTATE_SHIFT 16
356#define OMAP54XX_EMU_BANK_ONSTATE_WIDTH 0x2
357#define OMAP54XX_EMU_BANK_ONSTATE_MASK (0x3 << 16)
358
359/* Used by PM_EMU_PWRSTST */
360#define OMAP54XX_EMU_BANK_STATEST_SHIFT 4
361#define OMAP54XX_EMU_BANK_STATEST_WIDTH 0x2
362#define OMAP54XX_EMU_BANK_STATEST_MASK (0x3 << 4)
363
364/*
365 * Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP,
366 * PRM_SRAM_WKUP_SETUP
367 */
368#define OMAP54XX_ENABLE_RTA_SHIFT 0
369#define OMAP54XX_ENABLE_RTA_WIDTH 0x1
370#define OMAP54XX_ENABLE_RTA_MASK (1 << 0)
371
372/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
373#define OMAP54XX_ENFUNC1_SHIFT 3
374#define OMAP54XX_ENFUNC1_WIDTH 0x1
375#define OMAP54XX_ENFUNC1_MASK (1 << 3)
376
377/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
378#define OMAP54XX_ENFUNC2_SHIFT 4
379#define OMAP54XX_ENFUNC2_WIDTH 0x1
380#define OMAP54XX_ENFUNC2_MASK (1 << 4)
381
382/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
383#define OMAP54XX_ENFUNC3_SHIFT 5
384#define OMAP54XX_ENFUNC3_WIDTH 0x1
385#define OMAP54XX_ENFUNC3_MASK (1 << 5)
386
387/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
388#define OMAP54XX_ENFUNC4_SHIFT 6
389#define OMAP54XX_ENFUNC4_WIDTH 0x1
390#define OMAP54XX_ENFUNC4_MASK (1 << 6)
391
392/* Used by PRM_SLDO_CORE_SETUP, PRM_SLDO_MM_SETUP, PRM_SLDO_MPU_SETUP */
393#define OMAP54XX_ENFUNC5_SHIFT 7
394#define OMAP54XX_ENFUNC5_WIDTH 0x1
395#define OMAP54XX_ENFUNC5_MASK (1 << 7)
396
397/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
398#define OMAP54XX_ERRORGAIN_SHIFT 16
399#define OMAP54XX_ERRORGAIN_WIDTH 0x8
400#define OMAP54XX_ERRORGAIN_MASK (0xff << 16)
401
402/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
403#define OMAP54XX_ERROROFFSET_SHIFT 24
404#define OMAP54XX_ERROROFFSET_WIDTH 0x8
405#define OMAP54XX_ERROROFFSET_MASK (0xff << 24)
406
407/* Used by PRM_RSTST */
408#define OMAP54XX_EXTERNAL_WARM_RST_SHIFT 5
409#define OMAP54XX_EXTERNAL_WARM_RST_WIDTH 0x1
410#define OMAP54XX_EXTERNAL_WARM_RST_MASK (1 << 5)
411
412/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
413#define OMAP54XX_FORCEUPDATE_SHIFT 1
414#define OMAP54XX_FORCEUPDATE_WIDTH 0x1
415#define OMAP54XX_FORCEUPDATE_MASK (1 << 1)
416
417/* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_MM_VOLTAGE, PRM_VP_MPU_VOLTAGE */
418#define OMAP54XX_FORCEUPDATEWAIT_SHIFT 8
419#define OMAP54XX_FORCEUPDATEWAIT_WIDTH 0x18
420#define OMAP54XX_FORCEUPDATEWAIT_MASK (0xffffff << 8)
421
422/* Used by PRM_IRQENABLE_DSP, PRM_IRQENABLE_IPU */
423#define OMAP54XX_FORCEWKUP_EN_SHIFT 10
424#define OMAP54XX_FORCEWKUP_EN_WIDTH 0x1
425#define OMAP54XX_FORCEWKUP_EN_MASK (1 << 10)
426
427/* Used by PRM_IRQSTATUS_DSP, PRM_IRQSTATUS_IPU */
428#define OMAP54XX_FORCEWKUP_ST_SHIFT 10
429#define OMAP54XX_FORCEWKUP_ST_WIDTH 0x1
430#define OMAP54XX_FORCEWKUP_ST_MASK (1 << 10)
431
432/* Used by REVISION_PRM */
433#define OMAP54XX_FUNC_SHIFT 16
434#define OMAP54XX_FUNC_WIDTH 0xc
435#define OMAP54XX_FUNC_MASK (0xfff << 16)
436
437/* Used by PRM_RSTST */
438#define OMAP54XX_GLOBAL_COLD_RST_SHIFT 0
439#define OMAP54XX_GLOBAL_COLD_RST_WIDTH 0x1
440#define OMAP54XX_GLOBAL_COLD_RST_MASK (1 << 0)
441
442/* Used by PRM_RSTST */
443#define OMAP54XX_GLOBAL_WARM_SW_RST_SHIFT 1
444#define OMAP54XX_GLOBAL_WARM_SW_RST_WIDTH 0x1
445#define OMAP54XX_GLOBAL_WARM_SW_RST_MASK (1 << 1)
446
447/* Used by PRM_IO_PMCTRL */
448#define OMAP54XX_GLOBAL_WUEN_SHIFT 16
449#define OMAP54XX_GLOBAL_WUEN_WIDTH 0x1
450#define OMAP54XX_GLOBAL_WUEN_MASK (1 << 16)
451
452/* Used by PM_GPU_PWRSTCTRL */
453#define OMAP54XX_GPU_MEM_ONSTATE_SHIFT 16
454#define OMAP54XX_GPU_MEM_ONSTATE_WIDTH 0x2
455#define OMAP54XX_GPU_MEM_ONSTATE_MASK (0x3 << 16)
456
457/* Used by PM_GPU_PWRSTST */
458#define OMAP54XX_GPU_MEM_STATEST_SHIFT 4
459#define OMAP54XX_GPU_MEM_STATEST_WIDTH 0x2
460#define OMAP54XX_GPU_MEM_STATEST_MASK (0x3 << 4)
461
462/* Used by PRM_VC_CFG_I2C_MODE */
463#define OMAP54XX_HSMCODE_SHIFT 0
464#define OMAP54XX_HSMCODE_WIDTH 0x3
465#define OMAP54XX_HSMCODE_MASK (0x7 << 0)
466
467/* Used by PRM_VC_CFG_I2C_MODE */
468#define OMAP54XX_HSMODEEN_SHIFT 3
469#define OMAP54XX_HSMODEEN_WIDTH 0x1
470#define OMAP54XX_HSMODEEN_MASK (1 << 3)
471
472/* Used by PRM_VC_CFG_I2C_CLK */
473#define OMAP54XX_HSSCLH_SHIFT 16
474#define OMAP54XX_HSSCLH_WIDTH 0x8
475#define OMAP54XX_HSSCLH_MASK (0xff << 16)
476
477/* Used by PRM_VC_CFG_I2C_CLK */
478#define OMAP54XX_HSSCLL_SHIFT 24
479#define OMAP54XX_HSSCLL_WIDTH 0x8
480#define OMAP54XX_HSSCLL_MASK (0xff << 24)
481
482/* Used by PM_IVA_PWRSTCTRL */
483#define OMAP54XX_HWA_MEM_ONSTATE_SHIFT 16
484#define OMAP54XX_HWA_MEM_ONSTATE_WIDTH 0x2
485#define OMAP54XX_HWA_MEM_ONSTATE_MASK (0x3 << 16)
486
487/* Used by PM_IVA_PWRSTCTRL */
488#define OMAP54XX_HWA_MEM_RETSTATE_SHIFT 8
489#define OMAP54XX_HWA_MEM_RETSTATE_WIDTH 0x1
490#define OMAP54XX_HWA_MEM_RETSTATE_MASK (1 << 8)
491
492/* Used by PM_IVA_PWRSTST */
493#define OMAP54XX_HWA_MEM_STATEST_SHIFT 4
494#define OMAP54XX_HWA_MEM_STATEST_WIDTH 0x2
495#define OMAP54XX_HWA_MEM_STATEST_MASK (0x3 << 4)
496
497/* Used by PRM_RSTST */
498#define OMAP54XX_ICEPICK_RST_SHIFT 9
499#define OMAP54XX_ICEPICK_RST_WIDTH 0x1
500#define OMAP54XX_ICEPICK_RST_MASK (1 << 9)
501
502/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
503#define OMAP54XX_INITVDD_SHIFT 2
504#define OMAP54XX_INITVDD_WIDTH 0x1
505#define OMAP54XX_INITVDD_MASK (1 << 2)
506
507/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
508#define OMAP54XX_INITVOLTAGE_SHIFT 8
509#define OMAP54XX_INITVOLTAGE_WIDTH 0x8
510#define OMAP54XX_INITVOLTAGE_MASK (0xff << 8)
511
512/*
513 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CORE_PWRSTST,
514 * PM_CUSTEFUSE_PWRSTST, PM_DSP_PWRSTST, PM_DSS_PWRSTST, PM_EMU_PWRSTST,
515 * PM_GPU_PWRSTST, PM_IVA_PWRSTST, PM_L3INIT_PWRSTST, PM_MPU_PWRSTST,
516 * PRM_VOLTST_MM, PRM_VOLTST_MPU
517 */
518#define OMAP54XX_INTRANSITION_SHIFT 20
519#define OMAP54XX_INTRANSITION_WIDTH 0x1
520#define OMAP54XX_INTRANSITION_MASK (1 << 20)
521
522/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
523#define OMAP54XX_IO_EN_SHIFT 9
524#define OMAP54XX_IO_EN_WIDTH 0x1
525#define OMAP54XX_IO_EN_MASK (1 << 9)
526
527/* Used by PRM_IO_PMCTRL */
528#define OMAP54XX_IO_ON_STATUS_SHIFT 5
529#define OMAP54XX_IO_ON_STATUS_WIDTH 0x1
530#define OMAP54XX_IO_ON_STATUS_MASK (1 << 5)
531
532/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
533#define OMAP54XX_IO_ST_SHIFT 9
534#define OMAP54XX_IO_ST_WIDTH 0x1
535#define OMAP54XX_IO_ST_MASK (1 << 9)
536
537/* Used by PM_CORE_PWRSTCTRL */
538#define OMAP54XX_IPU_L2RAM_ONSTATE_SHIFT 20
539#define OMAP54XX_IPU_L2RAM_ONSTATE_WIDTH 0x2
540#define OMAP54XX_IPU_L2RAM_ONSTATE_MASK (0x3 << 20)
541
542/* Used by PM_CORE_PWRSTCTRL */
543#define OMAP54XX_IPU_L2RAM_RETSTATE_SHIFT 10
544#define OMAP54XX_IPU_L2RAM_RETSTATE_WIDTH 0x1
545#define OMAP54XX_IPU_L2RAM_RETSTATE_MASK (1 << 10)
546
547/* Used by PM_CORE_PWRSTST */
548#define OMAP54XX_IPU_L2RAM_STATEST_SHIFT 8
549#define OMAP54XX_IPU_L2RAM_STATEST_WIDTH 0x2
550#define OMAP54XX_IPU_L2RAM_STATEST_MASK (0x3 << 8)
551
552/* Used by PM_CORE_PWRSTCTRL */
553#define OMAP54XX_IPU_UNICACHE_ONSTATE_SHIFT 22
554#define OMAP54XX_IPU_UNICACHE_ONSTATE_WIDTH 0x2
555#define OMAP54XX_IPU_UNICACHE_ONSTATE_MASK (0x3 << 22)
556
557/* Used by PM_CORE_PWRSTCTRL */
558#define OMAP54XX_IPU_UNICACHE_RETSTATE_SHIFT 11
559#define OMAP54XX_IPU_UNICACHE_RETSTATE_WIDTH 0x1
560#define OMAP54XX_IPU_UNICACHE_RETSTATE_MASK (1 << 11)
561
562/* Used by PM_CORE_PWRSTST */
563#define OMAP54XX_IPU_UNICACHE_STATEST_SHIFT 10
564#define OMAP54XX_IPU_UNICACHE_STATEST_WIDTH 0x2
565#define OMAP54XX_IPU_UNICACHE_STATEST_MASK (0x3 << 10)
566
567/* Used by PRM_IO_PMCTRL */
568#define OMAP54XX_ISOCLK_OVERRIDE_SHIFT 0
569#define OMAP54XX_ISOCLK_OVERRIDE_WIDTH 0x1
570#define OMAP54XX_ISOCLK_OVERRIDE_MASK (1 << 0)
571
572/* Used by PRM_IO_PMCTRL */
573#define OMAP54XX_ISOCLK_STATUS_SHIFT 1
574#define OMAP54XX_ISOCLK_STATUS_WIDTH 0x1
575#define OMAP54XX_ISOCLK_STATUS_MASK (1 << 1)
576
577/* Used by PRM_IO_PMCTRL */
578#define OMAP54XX_ISOOVR_EXTEND_SHIFT 4
579#define OMAP54XX_ISOOVR_EXTEND_WIDTH 0x1
580#define OMAP54XX_ISOOVR_EXTEND_MASK (1 << 4)
581
582/* Used by PRM_IO_COUNT */
583#define OMAP54XX_ISO_2_ON_TIME_SHIFT 0
584#define OMAP54XX_ISO_2_ON_TIME_WIDTH 0x8
585#define OMAP54XX_ISO_2_ON_TIME_MASK (0xff << 0)
586
587/* Used by PM_L3INIT_PWRSTCTRL */
588#define OMAP54XX_L3INIT_BANK1_ONSTATE_SHIFT 16
589#define OMAP54XX_L3INIT_BANK1_ONSTATE_WIDTH 0x2
590#define OMAP54XX_L3INIT_BANK1_ONSTATE_MASK (0x3 << 16)
591
592/* Used by PM_L3INIT_PWRSTCTRL */
593#define OMAP54XX_L3INIT_BANK1_RETSTATE_SHIFT 8
594#define OMAP54XX_L3INIT_BANK1_RETSTATE_WIDTH 0x1
595#define OMAP54XX_L3INIT_BANK1_RETSTATE_MASK (1 << 8)
596
597/* Used by PM_L3INIT_PWRSTST */
598#define OMAP54XX_L3INIT_BANK1_STATEST_SHIFT 4
599#define OMAP54XX_L3INIT_BANK1_STATEST_WIDTH 0x2
600#define OMAP54XX_L3INIT_BANK1_STATEST_MASK (0x3 << 4)
601
602/* Used by PM_L3INIT_PWRSTCTRL */
603#define OMAP54XX_L3INIT_BANK2_ONSTATE_SHIFT 18
604#define OMAP54XX_L3INIT_BANK2_ONSTATE_WIDTH 0x2
605#define OMAP54XX_L3INIT_BANK2_ONSTATE_MASK (0x3 << 18)
606
607/* Used by PM_L3INIT_PWRSTCTRL */
608#define OMAP54XX_L3INIT_BANK2_RETSTATE_SHIFT 9
609#define OMAP54XX_L3INIT_BANK2_RETSTATE_WIDTH 0x1
610#define OMAP54XX_L3INIT_BANK2_RETSTATE_MASK (1 << 9)
611
612/* Used by PM_L3INIT_PWRSTST */
613#define OMAP54XX_L3INIT_BANK2_STATEST_SHIFT 6
614#define OMAP54XX_L3INIT_BANK2_STATEST_WIDTH 0x2
615#define OMAP54XX_L3INIT_BANK2_STATEST_MASK (0x3 << 6)
616
617/*
618 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CORE_PWRSTST,
619 * PM_CUSTEFUSE_PWRSTST, PM_DSP_PWRSTST, PM_DSS_PWRSTST, PM_EMU_PWRSTST,
620 * PM_GPU_PWRSTST, PM_IVA_PWRSTST, PM_L3INIT_PWRSTST, PM_MPU_PWRSTST
621 */
622#define OMAP54XX_LASTPOWERSTATEENTERED_SHIFT 24
623#define OMAP54XX_LASTPOWERSTATEENTERED_WIDTH 0x2
624#define OMAP54XX_LASTPOWERSTATEENTERED_MASK (0x3 << 24)
625
626/* Used by PRM_RSTST */
627#define OMAP54XX_LLI_RST_SHIFT 14
628#define OMAP54XX_LLI_RST_WIDTH 0x1
629#define OMAP54XX_LLI_RST_MASK (1 << 14)
630
631/*
632 * Used by PM_ABE_PWRSTCTRL, PM_CORE_PWRSTCTRL, PM_DSP_PWRSTCTRL,
633 * PM_DSS_PWRSTCTRL, PM_IVA_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, PM_MPU_PWRSTCTRL
634 */
635#define OMAP54XX_LOGICRETSTATE_SHIFT 2
636#define OMAP54XX_LOGICRETSTATE_WIDTH 0x1
637#define OMAP54XX_LOGICRETSTATE_MASK (1 << 2)
638
639/*
640 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CORE_PWRSTST,
641 * PM_CUSTEFUSE_PWRSTST, PM_DSP_PWRSTST, PM_DSS_PWRSTST, PM_EMU_PWRSTST,
642 * PM_GPU_PWRSTST, PM_IVA_PWRSTST, PM_L3INIT_PWRSTST, PM_MPU_PWRSTST
643 */
644#define OMAP54XX_LOGICSTATEST_SHIFT 2
645#define OMAP54XX_LOGICSTATEST_WIDTH 0x1
646#define OMAP54XX_LOGICSTATEST_MASK (1 << 2)
647
648/*
649 * Used by RM_ABE_AESS_CONTEXT, RM_ABE_DMIC_CONTEXT, RM_ABE_MCASP_CONTEXT,
650 * RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT, RM_ABE_MCBSP3_CONTEXT,
651 * RM_ABE_MCPDM_CONTEXT, RM_ABE_SLIMBUS1_CONTEXT, RM_ABE_TIMER5_CONTEXT,
652 * RM_ABE_TIMER6_CONTEXT, RM_ABE_TIMER7_CONTEXT, RM_ABE_TIMER8_CONTEXT,
653 * RM_ABE_WD_TIMER3_CONTEXT, RM_C2C_C2C_CONTEXT, RM_C2C_C2C_OCP_FW_CONTEXT,
654 * RM_CAM_CAL_CONTEXT, RM_CAM_FDIF_CONTEXT, RM_CAM_ISS_CONTEXT,
655 * RM_COREAON_SMARTREFLEX_CORE_CONTEXT, RM_COREAON_SMARTREFLEX_MM_CONTEXT,
656 * RM_COREAON_SMARTREFLEX_MPU_CONTEXT, RM_CUSTEFUSE_EFUSE_CTRL_CUST_CONTEXT,
657 * RM_DSP_DSP_CONTEXT, RM_DSS_BB2D_CONTEXT, RM_DSS_DSS_CONTEXT,
658 * RM_EMIF_DMM_CONTEXT, RM_EMIF_EMIF1_CONTEXT, RM_EMIF_EMIF2_CONTEXT,
659 * RM_EMIF_EMIF_DLL_CONTEXT, RM_EMIF_EMIF_OCP_FW_CONTEXT,
660 * RM_EMU_DEBUGSS_CONTEXT, RM_GPU_GPU_CONTEXT, RM_IPU_IPU_CONTEXT,
661 * RM_IVA_IVA_CONTEXT, RM_IVA_SL2_CONTEXT, RM_L3INIT_IEEE1500_2_OCP_CONTEXT,
662 * RM_L3INIT_OCP2SCP1_CONTEXT, RM_L3INIT_OCP2SCP3_CONTEXT,
663 * RM_L3INIT_SATA_CONTEXT, RM_L3INIT_UNIPRO2_CONTEXT,
664 * RM_L3INSTR_L3_INSTR_CONTEXT, RM_L3INSTR_L3_MAIN_3_CONTEXT,
665 * RM_L3INSTR_OCP_WP_NOC_CONTEXT, RM_L3MAIN1_L3_MAIN_1_CONTEXT,
666 * RM_L3MAIN2_L3_MAIN_2_CONTEXT, RM_L3MAIN2_OCMC_RAM_CONTEXT,
667 * RM_L4CFG_L4_CFG_CONTEXT, RM_L4CFG_OCP2SCP2_CONTEXT,
668 * RM_L4CFG_SAR_ROM_CONTEXT, RM_L4PER_ELM_CONTEXT, RM_L4PER_HDQ1W_CONTEXT,
669 * RM_L4PER_I2C2_CONTEXT, RM_L4PER_I2C3_CONTEXT, RM_L4PER_I2C4_CONTEXT,
670 * RM_L4PER_I2C5_CONTEXT, RM_L4PER_L4_PER_CONTEXT, RM_L4PER_MCSPI1_CONTEXT,
671 * RM_L4PER_MCSPI2_CONTEXT, RM_L4PER_MCSPI3_CONTEXT, RM_L4PER_MCSPI4_CONTEXT,
672 * RM_L4PER_MMC3_CONTEXT, RM_L4PER_MMC4_CONTEXT, RM_L4PER_MMC5_CONTEXT,
673 * RM_L4PER_TIMER10_CONTEXT, RM_L4PER_TIMER11_CONTEXT, RM_L4PER_TIMER2_CONTEXT,
674 * RM_L4PER_TIMER3_CONTEXT, RM_L4PER_TIMER4_CONTEXT, RM_L4PER_TIMER9_CONTEXT,
675 * RM_L4SEC_FPKA_CONTEXT, RM_MIPIEXT_LLI_CONTEXT,
676 * RM_MIPIEXT_LLI_OCP_FW_CONTEXT, RM_MIPIEXT_MPHY_CONTEXT, RM_MPU_MPU_CONTEXT,
677 * RM_WKUPAON_COUNTER_32K_CONTEXT, RM_WKUPAON_GPIO1_CONTEXT,
678 * RM_WKUPAON_KBD_CONTEXT, RM_WKUPAON_L4_WKUP_CONTEXT,
679 * RM_WKUPAON_SAR_RAM_CONTEXT, RM_WKUPAON_TIMER12_CONTEXT,
680 * RM_WKUPAON_TIMER1_CONTEXT, RM_WKUPAON_WD_TIMER1_CONTEXT,
681 * RM_WKUPAON_WD_TIMER2_CONTEXT
682 */
683#define OMAP54XX_LOSTCONTEXT_DFF_SHIFT 0
684#define OMAP54XX_LOSTCONTEXT_DFF_WIDTH 0x1
685#define OMAP54XX_LOSTCONTEXT_DFF_MASK (1 << 0)
686
687/*
688 * Used by RM_C2C_C2C_CONTEXT, RM_C2C_C2C_OCP_FW_CONTEXT,
689 * RM_C2C_MODEM_ICR_CONTEXT, RM_DMA_DMA_SYSTEM_CONTEXT, RM_DSP_DSP_CONTEXT,
690 * RM_DSS_DSS_CONTEXT, RM_EMIF_DMM_CONTEXT, RM_EMIF_EMIF1_CONTEXT,
691 * RM_EMIF_EMIF2_CONTEXT, RM_EMIF_EMIF_OCP_FW_CONTEXT, RM_IPU_IPU_CONTEXT,
692 * RM_L3INIT_HSI_CONTEXT, RM_L3INIT_MMC1_CONTEXT, RM_L3INIT_MMC2_CONTEXT,
693 * RM_L3INIT_USB_HOST_HS_CONTEXT, RM_L3INIT_USB_OTG_SS_CONTEXT,
694 * RM_L3INIT_USB_TLL_HS_CONTEXT, RM_L3INSTR_L3_MAIN_3_CONTEXT,
695 * RM_L3INSTR_OCP_WP_NOC_CONTEXT, RM_L3MAIN1_L3_MAIN_1_CONTEXT,
696 * RM_L3MAIN2_GPMC_CONTEXT, RM_L3MAIN2_L3_MAIN_2_CONTEXT,
697 * RM_L4CFG_L4_CFG_CONTEXT, RM_L4CFG_MAILBOX_CONTEXT,
698 * RM_L4CFG_SPINLOCK_CONTEXT, RM_L4PER_GPIO2_CONTEXT, RM_L4PER_GPIO3_CONTEXT,
699 * RM_L4PER_GPIO4_CONTEXT, RM_L4PER_GPIO5_CONTEXT, RM_L4PER_GPIO6_CONTEXT,
700 * RM_L4PER_GPIO7_CONTEXT, RM_L4PER_GPIO8_CONTEXT, RM_L4PER_I2C1_CONTEXT,
701 * RM_L4PER_L4_PER_CONTEXT, RM_L4PER_UART1_CONTEXT, RM_L4PER_UART2_CONTEXT,
702 * RM_L4PER_UART3_CONTEXT, RM_L4PER_UART4_CONTEXT, RM_L4PER_UART5_CONTEXT,
703 * RM_L4PER_UART6_CONTEXT, RM_L4SEC_AES1_CONTEXT, RM_L4SEC_AES2_CONTEXT,
704 * RM_L4SEC_DES3DES_CONTEXT, RM_L4SEC_DMA_CRYPTO_CONTEXT, RM_L4SEC_RNG_CONTEXT,
705 * RM_L4SEC_SHA2MD5_CONTEXT, RM_MIPIEXT_LLI_CONTEXT,
706 * RM_MIPIEXT_LLI_OCP_FW_CONTEXT, RM_MIPIEXT_MPHY_CONTEXT, RM_MPU_MPU_CONTEXT
707 */
708#define OMAP54XX_LOSTCONTEXT_RFF_SHIFT 1
709#define OMAP54XX_LOSTCONTEXT_RFF_WIDTH 0x1
710#define OMAP54XX_LOSTCONTEXT_RFF_MASK (1 << 1)
711
712/* Used by RM_ABE_AESS_CONTEXT */
713#define OMAP54XX_LOSTMEM_AESSMEM_SHIFT 8
714#define OMAP54XX_LOSTMEM_AESSMEM_WIDTH 0x1
715#define OMAP54XX_LOSTMEM_AESSMEM_MASK (1 << 8)
716
717/* Used by RM_CAM_CAL_CONTEXT */
718#define OMAP54XX_LOSTMEM_CAL_MEM_SHIFT 8
719#define OMAP54XX_LOSTMEM_CAL_MEM_WIDTH 0x1
720#define OMAP54XX_LOSTMEM_CAL_MEM_MASK (1 << 8)
721
722/* Used by RM_CAM_FDIF_CONTEXT, RM_CAM_ISS_CONTEXT */
723#define OMAP54XX_LOSTMEM_CAM_MEM_SHIFT 8
724#define OMAP54XX_LOSTMEM_CAM_MEM_WIDTH 0x1
725#define OMAP54XX_LOSTMEM_CAM_MEM_MASK (1 << 8)
726
727/* Used by RM_EMIF_DMM_CONTEXT */
728#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_SHIFT 9
729#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_WIDTH 0x1
730#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_MASK (1 << 9)
731
732/* Renamed from LOSTMEM_CORE_NRET_BANK Used by RM_L3INSTR_OCP_WP_NOC_CONTEXT */
733#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_8_8_SHIFT 8
734#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_8_8_WIDTH 0x1
735#define OMAP54XX_LOSTMEM_CORE_NRET_BANK_8_8_MASK (1 << 8)
736
737/* Used by RM_L3MAIN2_OCMC_RAM_CONTEXT */
738#define OMAP54XX_LOSTMEM_CORE_OCMRAM_SHIFT 8
739#define OMAP54XX_LOSTMEM_CORE_OCMRAM_WIDTH 0x1
740#define OMAP54XX_LOSTMEM_CORE_OCMRAM_MASK (1 << 8)
741
742/* Used by RM_DMA_DMA_SYSTEM_CONTEXT, RM_EMIF_DMM_CONTEXT */
743#define OMAP54XX_LOSTMEM_CORE_OTHER_BANK_SHIFT 8
744#define OMAP54XX_LOSTMEM_CORE_OTHER_BANK_WIDTH 0x1
745#define OMAP54XX_LOSTMEM_CORE_OTHER_BANK_MASK (1 << 8)
746
747/* Used by RM_DSP_DSP_CONTEXT */
748#define OMAP54XX_LOSTMEM_DSP_EDMA_SHIFT 10
749#define OMAP54XX_LOSTMEM_DSP_EDMA_WIDTH 0x1
750#define OMAP54XX_LOSTMEM_DSP_EDMA_MASK (1 << 10)
751
752/* Used by RM_DSP_DSP_CONTEXT */
753#define OMAP54XX_LOSTMEM_DSP_L1_SHIFT 8
754#define OMAP54XX_LOSTMEM_DSP_L1_WIDTH 0x1
755#define OMAP54XX_LOSTMEM_DSP_L1_MASK (1 << 8)
756
757/* Used by RM_DSP_DSP_CONTEXT */
758#define OMAP54XX_LOSTMEM_DSP_L2_SHIFT 9
759#define OMAP54XX_LOSTMEM_DSP_L2_WIDTH 0x1
760#define OMAP54XX_LOSTMEM_DSP_L2_MASK (1 << 9)
761
762/* Used by RM_DSS_BB2D_CONTEXT, RM_DSS_DSS_CONTEXT */
763#define OMAP54XX_LOSTMEM_DSS_MEM_SHIFT 8
764#define OMAP54XX_LOSTMEM_DSS_MEM_WIDTH 0x1
765#define OMAP54XX_LOSTMEM_DSS_MEM_MASK (1 << 8)
766
767/* Used by RM_EMU_DEBUGSS_CONTEXT */
768#define OMAP54XX_LOSTMEM_EMU_BANK_SHIFT 8
769#define OMAP54XX_LOSTMEM_EMU_BANK_WIDTH 0x1
770#define OMAP54XX_LOSTMEM_EMU_BANK_MASK (1 << 8)
771
772/* Used by RM_GPU_GPU_CONTEXT */
773#define OMAP54XX_LOSTMEM_GPU_MEM_SHIFT 8
774#define OMAP54XX_LOSTMEM_GPU_MEM_WIDTH 0x1
775#define OMAP54XX_LOSTMEM_GPU_MEM_MASK (1 << 8)
776
777/* Used by RM_IVA_IVA_CONTEXT */
778#define OMAP54XX_LOSTMEM_HWA_MEM_SHIFT 10
779#define OMAP54XX_LOSTMEM_HWA_MEM_WIDTH 0x1
780#define OMAP54XX_LOSTMEM_HWA_MEM_MASK (1 << 10)
781
782/* Used by RM_IPU_IPU_CONTEXT */
783#define OMAP54XX_LOSTMEM_IPU_L2RAM_SHIFT 9
784#define OMAP54XX_LOSTMEM_IPU_L2RAM_WIDTH 0x1
785#define OMAP54XX_LOSTMEM_IPU_L2RAM_MASK (1 << 9)
786
787/* Used by RM_IPU_IPU_CONTEXT */
788#define OMAP54XX_LOSTMEM_IPU_UNICACHE_SHIFT 8
789#define OMAP54XX_LOSTMEM_IPU_UNICACHE_WIDTH 0x1
790#define OMAP54XX_LOSTMEM_IPU_UNICACHE_MASK (1 << 8)
791
792/*
793 * Used by RM_L3INIT_HSI_CONTEXT, RM_L3INIT_MMC1_CONTEXT,
794 * RM_L3INIT_MMC2_CONTEXT, RM_L3INIT_SATA_CONTEXT, RM_L3INIT_UNIPRO2_CONTEXT,
795 * RM_L3INIT_USB_OTG_SS_CONTEXT
796 */
797#define OMAP54XX_LOSTMEM_L3INIT_BANK1_SHIFT 8
798#define OMAP54XX_LOSTMEM_L3INIT_BANK1_WIDTH 0x1
799#define OMAP54XX_LOSTMEM_L3INIT_BANK1_MASK (1 << 8)
800
801/* Used by RM_MPU_MPU_CONTEXT */
802#define OMAP54XX_LOSTMEM_MPU_L2_SHIFT 9
803#define OMAP54XX_LOSTMEM_MPU_L2_WIDTH 0x1
804#define OMAP54XX_LOSTMEM_MPU_L2_MASK (1 << 9)
805
806/* Used by RM_MPU_MPU_CONTEXT */
807#define OMAP54XX_LOSTMEM_MPU_RAM_SHIFT 10
808#define OMAP54XX_LOSTMEM_MPU_RAM_WIDTH 0x1
809#define OMAP54XX_LOSTMEM_MPU_RAM_MASK (1 << 10)
810
811/*
812 * Used by RM_L4PER_MMC3_CONTEXT, RM_L4PER_MMC4_CONTEXT, RM_L4PER_MMC5_CONTEXT,
813 * RM_L4SEC_FPKA_CONTEXT
814 */
815#define OMAP54XX_LOSTMEM_NONRETAINED_BANK_SHIFT 8
816#define OMAP54XX_LOSTMEM_NONRETAINED_BANK_WIDTH 0x1
817#define OMAP54XX_LOSTMEM_NONRETAINED_BANK_MASK (1 << 8)
818
819/*
820 * Used by RM_ABE_DMIC_CONTEXT, RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT,
821 * RM_ABE_MCBSP3_CONTEXT, RM_ABE_MCPDM_CONTEXT, RM_ABE_SLIMBUS1_CONTEXT
822 */
823#define OMAP54XX_LOSTMEM_PERIHPMEM_SHIFT 8
824#define OMAP54XX_LOSTMEM_PERIHPMEM_WIDTH 0x1
825#define OMAP54XX_LOSTMEM_PERIHPMEM_MASK (1 << 8)
826
827/*
828 * Used by RM_L4PER_UART1_CONTEXT, RM_L4PER_UART2_CONTEXT,
829 * RM_L4PER_UART3_CONTEXT, RM_L4PER_UART4_CONTEXT, RM_L4PER_UART5_CONTEXT,
830 * RM_L4PER_UART6_CONTEXT, RM_L4SEC_DMA_CRYPTO_CONTEXT
831 */
832#define OMAP54XX_LOSTMEM_RETAINED_BANK_SHIFT 8
833#define OMAP54XX_LOSTMEM_RETAINED_BANK_WIDTH 0x1
834#define OMAP54XX_LOSTMEM_RETAINED_BANK_MASK (1 << 8)
835
836/* Used by RM_IVA_SL2_CONTEXT */
837#define OMAP54XX_LOSTMEM_SL2_MEM_SHIFT 8
838#define OMAP54XX_LOSTMEM_SL2_MEM_WIDTH 0x1
839#define OMAP54XX_LOSTMEM_SL2_MEM_MASK (1 << 8)
840
841/* Used by RM_IVA_IVA_CONTEXT */
842#define OMAP54XX_LOSTMEM_TCM1_MEM_SHIFT 8
843#define OMAP54XX_LOSTMEM_TCM1_MEM_WIDTH 0x1
844#define OMAP54XX_LOSTMEM_TCM1_MEM_MASK (1 << 8)
845
846/* Used by RM_IVA_IVA_CONTEXT */
847#define OMAP54XX_LOSTMEM_TCM2_MEM_SHIFT 9
848#define OMAP54XX_LOSTMEM_TCM2_MEM_WIDTH 0x1
849#define OMAP54XX_LOSTMEM_TCM2_MEM_MASK (1 << 9)
850
851/* Used by RM_WKUPAON_SAR_RAM_CONTEXT */
852#define OMAP54XX_LOSTMEM_WKUP_BANK_SHIFT 8
853#define OMAP54XX_LOSTMEM_WKUP_BANK_WIDTH 0x1
854#define OMAP54XX_LOSTMEM_WKUP_BANK_MASK (1 << 8)
855
856/*
857 * Used by PM_ABE_PWRSTCTRL, PM_CAM_PWRSTCTRL, PM_CORE_PWRSTCTRL,
858 * PM_CUSTEFUSE_PWRSTCTRL, PM_DSP_PWRSTCTRL, PM_DSS_PWRSTCTRL,
859 * PM_GPU_PWRSTCTRL, PM_IVA_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, PM_MPU_PWRSTCTRL
860 */
861#define OMAP54XX_LOWPOWERSTATECHANGE_SHIFT 4
862#define OMAP54XX_LOWPOWERSTATECHANGE_WIDTH 0x1
863#define OMAP54XX_LOWPOWERSTATECHANGE_MASK (1 << 4)
864
865/* Used by PRM_DEBUG_TRANS_CFG */
866#define OMAP54XX_MODE_SHIFT 0
867#define OMAP54XX_MODE_WIDTH 0x2
868#define OMAP54XX_MODE_MASK (0x3 << 0)
869
870/* Used by PRM_MODEM_IF_CTRL */
871#define OMAP54XX_MODEM_SHUTDOWN_IRQ_SHIFT 9
872#define OMAP54XX_MODEM_SHUTDOWN_IRQ_WIDTH 0x1
873#define OMAP54XX_MODEM_SHUTDOWN_IRQ_MASK (1 << 9)
874
875/* Used by PRM_MODEM_IF_CTRL */
876#define OMAP54XX_MODEM_WAKE_IRQ_SHIFT 8
877#define OMAP54XX_MODEM_WAKE_IRQ_WIDTH 0x1
878#define OMAP54XX_MODEM_WAKE_IRQ_MASK (1 << 8)
879
880/* Used by PM_MPU_PWRSTCTRL */
881#define OMAP54XX_MPU_L2_ONSTATE_SHIFT 18
882#define OMAP54XX_MPU_L2_ONSTATE_WIDTH 0x2
883#define OMAP54XX_MPU_L2_ONSTATE_MASK (0x3 << 18)
884
885/* Used by PM_MPU_PWRSTCTRL */
886#define OMAP54XX_MPU_L2_RETSTATE_SHIFT 9
887#define OMAP54XX_MPU_L2_RETSTATE_WIDTH 0x1
888#define OMAP54XX_MPU_L2_RETSTATE_MASK (1 << 9)
889
890/* Used by PM_MPU_PWRSTST */
891#define OMAP54XX_MPU_L2_STATEST_SHIFT 6
892#define OMAP54XX_MPU_L2_STATEST_WIDTH 0x2
893#define OMAP54XX_MPU_L2_STATEST_MASK (0x3 << 6)
894
895/* Used by PM_MPU_PWRSTCTRL */
896#define OMAP54XX_MPU_RAM_ONSTATE_SHIFT 20
897#define OMAP54XX_MPU_RAM_ONSTATE_WIDTH 0x2
898#define OMAP54XX_MPU_RAM_ONSTATE_MASK (0x3 << 20)
899
900/* Used by PM_MPU_PWRSTCTRL */
901#define OMAP54XX_MPU_RAM_RETSTATE_SHIFT 10
902#define OMAP54XX_MPU_RAM_RETSTATE_WIDTH 0x1
903#define OMAP54XX_MPU_RAM_RETSTATE_MASK (1 << 10)
904
905/* Used by PM_MPU_PWRSTST */
906#define OMAP54XX_MPU_RAM_STATEST_SHIFT 8
907#define OMAP54XX_MPU_RAM_STATEST_WIDTH 0x2
908#define OMAP54XX_MPU_RAM_STATEST_MASK (0x3 << 8)
909
910/* Used by PRM_RSTST */
911#define OMAP54XX_MPU_SECURITY_VIOL_RST_SHIFT 2
912#define OMAP54XX_MPU_SECURITY_VIOL_RST_WIDTH 0x1
913#define OMAP54XX_MPU_SECURITY_VIOL_RST_MASK (1 << 2)
914
915/* Used by PRM_RSTST */
916#define OMAP54XX_MPU_WDT_RST_SHIFT 3
917#define OMAP54XX_MPU_WDT_RST_WIDTH 0x1
918#define OMAP54XX_MPU_WDT_RST_MASK (1 << 3)
919
920/* Used by PRM_ABBLDO_MM_SETUP, PRM_ABBLDO_MPU_SETUP */
921#define OMAP54XX_NOCAP_SHIFT 4
922#define OMAP54XX_NOCAP_WIDTH 0x1
923#define OMAP54XX_NOCAP_MASK (1 << 4)
924
925/* Used by PM_CORE_PWRSTCTRL */
926#define OMAP54XX_OCP_NRET_BANK_ONSTATE_SHIFT 24
927#define OMAP54XX_OCP_NRET_BANK_ONSTATE_WIDTH 0x2
928#define OMAP54XX_OCP_NRET_BANK_ONSTATE_MASK (0x3 << 24)
929
930/* Used by PM_CORE_PWRSTCTRL */
931#define OMAP54XX_OCP_NRET_BANK_RETSTATE_SHIFT 12
932#define OMAP54XX_OCP_NRET_BANK_RETSTATE_WIDTH 0x1
933#define OMAP54XX_OCP_NRET_BANK_RETSTATE_MASK (1 << 12)
934
935/* Used by PM_CORE_PWRSTST */
936#define OMAP54XX_OCP_NRET_BANK_STATEST_SHIFT 12
937#define OMAP54XX_OCP_NRET_BANK_STATEST_WIDTH 0x2
938#define OMAP54XX_OCP_NRET_BANK_STATEST_MASK (0x3 << 12)
939
940/*
941 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_MM_L,
942 * PRM_VC_VAL_CMD_VDD_MPU_L
943 */
944#define OMAP54XX_OFF_SHIFT 0
945#define OMAP54XX_OFF_WIDTH 0x8
946#define OMAP54XX_OFF_MASK (0xff << 0)
947
948/*
949 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_MM_L,
950 * PRM_VC_VAL_CMD_VDD_MPU_L
951 */
952#define OMAP54XX_ON_SHIFT 24
953#define OMAP54XX_ON_WIDTH 0x8
954#define OMAP54XX_ON_MASK (0xff << 24)
955
956/*
957 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_MM_L,
958 * PRM_VC_VAL_CMD_VDD_MPU_L
959 */
960#define OMAP54XX_ONLP_SHIFT 16
961#define OMAP54XX_ONLP_WIDTH 0x8
962#define OMAP54XX_ONLP_MASK (0xff << 16)
963
964/* Used by PRM_ABBLDO_MM_CTRL, PRM_ABBLDO_MPU_CTRL */
965#define OMAP54XX_OPP_CHANGE_SHIFT 2
966#define OMAP54XX_OPP_CHANGE_WIDTH 0x1
967#define OMAP54XX_OPP_CHANGE_MASK (1 << 2)
968
969/* Used by PRM_VC_VAL_BYPASS */
970#define OMAP54XX_OPP_CHANGE_EMIF_LVL_SHIFT 25
971#define OMAP54XX_OPP_CHANGE_EMIF_LVL_WIDTH 0x1
972#define OMAP54XX_OPP_CHANGE_EMIF_LVL_MASK (1 << 25)
973
974/* Used by PRM_ABBLDO_MM_CTRL, PRM_ABBLDO_MPU_CTRL */
975#define OMAP54XX_OPP_SEL_SHIFT 0
976#define OMAP54XX_OPP_SEL_WIDTH 0x2
977#define OMAP54XX_OPP_SEL_MASK (0x3 << 0)
978
979/* Used by PRM_DEBUG_OUT */
980#define OMAP54XX_OUTPUT_SHIFT 0
981#define OMAP54XX_OUTPUT_WIDTH 0x20
982#define OMAP54XX_OUTPUT_MASK (0xffffffff << 0)
983
984/* Used by PRM_SRAM_COUNT */
985#define OMAP54XX_PCHARGECNT_VALUE_SHIFT 0
986#define OMAP54XX_PCHARGECNT_VALUE_WIDTH 0x6
987#define OMAP54XX_PCHARGECNT_VALUE_MASK (0x3f << 0)
988
989/* Used by PRM_PSCON_COUNT */
990#define OMAP54XX_PCHARGE_TIME_SHIFT 0
991#define OMAP54XX_PCHARGE_TIME_WIDTH 0x8
992#define OMAP54XX_PCHARGE_TIME_MASK (0xff << 0)
993
994/* Used by PM_ABE_PWRSTCTRL */
995#define OMAP54XX_PERIPHMEM_ONSTATE_SHIFT 20
996#define OMAP54XX_PERIPHMEM_ONSTATE_WIDTH 0x2
997#define OMAP54XX_PERIPHMEM_ONSTATE_MASK (0x3 << 20)
998
999/* Used by PM_ABE_PWRSTCTRL */
1000#define OMAP54XX_PERIPHMEM_RETSTATE_SHIFT 10
1001#define OMAP54XX_PERIPHMEM_RETSTATE_WIDTH 0x1
1002#define OMAP54XX_PERIPHMEM_RETSTATE_MASK (1 << 10)
1003
1004/* Used by PM_ABE_PWRSTST */
1005#define OMAP54XX_PERIPHMEM_STATEST_SHIFT 8
1006#define OMAP54XX_PERIPHMEM_STATEST_WIDTH 0x2
1007#define OMAP54XX_PERIPHMEM_STATEST_MASK (0x3 << 8)
1008
1009/* Used by PRM_PHASE1_CNDP */
1010#define OMAP54XX_PHASE1_CNDP_SHIFT 0
1011#define OMAP54XX_PHASE1_CNDP_WIDTH 0x20
1012#define OMAP54XX_PHASE1_CNDP_MASK (0xffffffff << 0)
1013
1014/* Used by PRM_PHASE2A_CNDP */
1015#define OMAP54XX_PHASE2A_CNDP_SHIFT 0
1016#define OMAP54XX_PHASE2A_CNDP_WIDTH 0x20
1017#define OMAP54XX_PHASE2A_CNDP_MASK (0xffffffff << 0)
1018
1019/* Used by PRM_PHASE2B_CNDP */
1020#define OMAP54XX_PHASE2B_CNDP_SHIFT 0
1021#define OMAP54XX_PHASE2B_CNDP_WIDTH 0x20
1022#define OMAP54XX_PHASE2B_CNDP_MASK (0xffffffff << 0)
1023
1024/* Used by PRM_PSCON_COUNT */
1025#define OMAP54XX_PONOUT_2_PGOODIN_TIME_SHIFT 8
1026#define OMAP54XX_PONOUT_2_PGOODIN_TIME_WIDTH 0x8
1027#define OMAP54XX_PONOUT_2_PGOODIN_TIME_MASK (0xff << 8)
1028
1029/*
1030 * Used by PM_ABE_PWRSTCTRL, PM_CAM_PWRSTCTRL, PM_CORE_PWRSTCTRL,
1031 * PM_CUSTEFUSE_PWRSTCTRL, PM_DSP_PWRSTCTRL, PM_DSS_PWRSTCTRL,
1032 * PM_EMU_PWRSTCTRL, PM_GPU_PWRSTCTRL, PM_IVA_PWRSTCTRL, PM_L3INIT_PWRSTCTRL,
1033 * PM_MPU_PWRSTCTRL
1034 */
1035#define OMAP54XX_POWERSTATE_SHIFT 0
1036#define OMAP54XX_POWERSTATE_WIDTH 0x2
1037#define OMAP54XX_POWERSTATE_MASK (0x3 << 0)
1038
1039/*
1040 * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CORE_PWRSTST,
1041 * PM_CUSTEFUSE_PWRSTST, PM_DSP_PWRSTST, PM_DSS_PWRSTST, PM_EMU_PWRSTST,
1042 * PM_GPU_PWRSTST, PM_IVA_PWRSTST, PM_L3INIT_PWRSTST, PM_MPU_PWRSTST
1043 */
1044#define OMAP54XX_POWERSTATEST_SHIFT 0
1045#define OMAP54XX_POWERSTATEST_WIDTH 0x2
1046#define OMAP54XX_POWERSTATEST_MASK (0x3 << 0)
1047
1048/* Used by PRM_PWRREQCTRL */
1049#define OMAP54XX_PWRREQ_COND_SHIFT 0
1050#define OMAP54XX_PWRREQ_COND_WIDTH 0x2
1051#define OMAP54XX_PWRREQ_COND_MASK (0x3 << 0)
1052
1053/* Used by PRM_VC_SMPS_CORE_CONFIG */
1054#define OMAP54XX_RACEN_VDD_CORE_L_SHIFT 27
1055#define OMAP54XX_RACEN_VDD_CORE_L_WIDTH 0x1
1056#define OMAP54XX_RACEN_VDD_CORE_L_MASK (1 << 27)
1057
1058/* Used by PRM_VC_SMPS_MM_CONFIG */
1059#define OMAP54XX_RACEN_VDD_MM_L_SHIFT 27
1060#define OMAP54XX_RACEN_VDD_MM_L_WIDTH 0x1
1061#define OMAP54XX_RACEN_VDD_MM_L_MASK (1 << 27)
1062
1063/* Used by PRM_VC_SMPS_MPU_CONFIG */
1064#define OMAP54XX_RACEN_VDD_MPU_L_SHIFT 27
1065#define OMAP54XX_RACEN_VDD_MPU_L_WIDTH 0x1
1066#define OMAP54XX_RACEN_VDD_MPU_L_MASK (1 << 27)
1067
1068/* Used by PRM_VC_SMPS_CORE_CONFIG */
1069#define OMAP54XX_RAC_VDD_CORE_L_SHIFT 26
1070#define OMAP54XX_RAC_VDD_CORE_L_WIDTH 0x1
1071#define OMAP54XX_RAC_VDD_CORE_L_MASK (1 << 26)
1072
1073/* Used by PRM_VC_SMPS_MM_CONFIG */
1074#define OMAP54XX_RAC_VDD_MM_L_SHIFT 26
1075#define OMAP54XX_RAC_VDD_MM_L_WIDTH 0x1
1076#define OMAP54XX_RAC_VDD_MM_L_MASK (1 << 26)
1077
1078/* Used by PRM_VC_SMPS_MPU_CONFIG */
1079#define OMAP54XX_RAC_VDD_MPU_L_SHIFT 26
1080#define OMAP54XX_RAC_VDD_MPU_L_WIDTH 0x1
1081#define OMAP54XX_RAC_VDD_MPU_L_MASK (1 << 26)
1082
1083/*
1084 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
1085 * PRM_VOLTSETUP_MM_OFF, PRM_VOLTSETUP_MM_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
1086 * PRM_VOLTSETUP_MPU_RET_SLEEP
1087 */
1088#define OMAP54XX_RAMP_DOWN_COUNT_SHIFT 16
1089#define OMAP54XX_RAMP_DOWN_COUNT_WIDTH 0x6
1090#define OMAP54XX_RAMP_DOWN_COUNT_MASK (0x3f << 16)
1091
1092/*
1093 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
1094 * PRM_VOLTSETUP_MM_OFF, PRM_VOLTSETUP_MM_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
1095 * PRM_VOLTSETUP_MPU_RET_SLEEP
1096 */
1097#define OMAP54XX_RAMP_DOWN_PRESCAL_SHIFT 24
1098#define OMAP54XX_RAMP_DOWN_PRESCAL_WIDTH 0x2
1099#define OMAP54XX_RAMP_DOWN_PRESCAL_MASK (0x3 << 24)
1100
1101/*
1102 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
1103 * PRM_VOLTSETUP_MM_OFF, PRM_VOLTSETUP_MM_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
1104 * PRM_VOLTSETUP_MPU_RET_SLEEP
1105 */
1106#define OMAP54XX_RAMP_UP_COUNT_SHIFT 0
1107#define OMAP54XX_RAMP_UP_COUNT_WIDTH 0x6
1108#define OMAP54XX_RAMP_UP_COUNT_MASK (0x3f << 0)
1109
1110/*
1111 * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP,
1112 * PRM_VOLTSETUP_MM_OFF, PRM_VOLTSETUP_MM_RET_SLEEP, PRM_VOLTSETUP_MPU_OFF,
1113 * PRM_VOLTSETUP_MPU_RET_SLEEP
1114 */
1115#define OMAP54XX_RAMP_UP_PRESCAL_SHIFT 8
1116#define OMAP54XX_RAMP_UP_PRESCAL_WIDTH 0x2
1117#define OMAP54XX_RAMP_UP_PRESCAL_MASK (0x3 << 8)
1118
1119/* Used by PRM_VC_SMPS_CORE_CONFIG */
1120#define OMAP54XX_RAV_VDD_CORE_L_SHIFT 25
1121#define OMAP54XX_RAV_VDD_CORE_L_WIDTH 0x1
1122#define OMAP54XX_RAV_VDD_CORE_L_MASK (1 << 25)
1123
1124/* Used by PRM_VC_SMPS_MM_CONFIG */
1125#define OMAP54XX_RAV_VDD_MM_L_SHIFT 25
1126#define OMAP54XX_RAV_VDD_MM_L_WIDTH 0x1
1127#define OMAP54XX_RAV_VDD_MM_L_MASK (1 << 25)
1128
1129/* Used by PRM_VC_SMPS_MPU_CONFIG */
1130#define OMAP54XX_RAV_VDD_MPU_L_SHIFT 25
1131#define OMAP54XX_RAV_VDD_MPU_L_WIDTH 0x1
1132#define OMAP54XX_RAV_VDD_MPU_L_MASK (1 << 25)
1133
1134/* Used by PRM_VC_VAL_BYPASS */
1135#define OMAP54XX_REGADDR_SHIFT 8
1136#define OMAP54XX_REGADDR_WIDTH 0x8
1137#define OMAP54XX_REGADDR_MASK (0xff << 8)
1138
1139/*
1140 * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_MM_L,
1141 * PRM_VC_VAL_CMD_VDD_MPU_L
1142 */
1143#define OMAP54XX_RET_SHIFT 8
1144#define OMAP54XX_RET_WIDTH 0x8
1145#define OMAP54XX_RET_MASK (0xff << 8)
1146
1147/* Used by PRM_SLDO_CORE_CTRL, PRM_SLDO_MM_CTRL, PRM_SLDO_MPU_CTRL */
1148#define OMAP54XX_RETMODE_ENABLE_SHIFT 0
1149#define OMAP54XX_RETMODE_ENABLE_WIDTH 0x1
1150#define OMAP54XX_RETMODE_ENABLE_MASK (1 << 0)
1151
1152/* Used by PRM_RSTTIME */
1153#define OMAP54XX_RSTTIME1_SHIFT 0
1154#define OMAP54XX_RSTTIME1_WIDTH 0xa
1155#define OMAP54XX_RSTTIME1_MASK (0x3ff << 0)
1156
1157/* Used by PRM_RSTTIME */
1158#define OMAP54XX_RSTTIME2_SHIFT 10
1159#define OMAP54XX_RSTTIME2_WIDTH 0x5
1160#define OMAP54XX_RSTTIME2_MASK (0x1f << 10)
1161
1162/* Used by RM_IPU_RSTCTRL, RM_IPU_RSTST */
1163#define OMAP54XX_RST_CPU0_SHIFT 0
1164#define OMAP54XX_RST_CPU0_WIDTH 0x1
1165#define OMAP54XX_RST_CPU0_MASK (1 << 0)
1166
1167/* Used by RM_IPU_RSTCTRL, RM_IPU_RSTST */
1168#define OMAP54XX_RST_CPU1_SHIFT 1
1169#define OMAP54XX_RST_CPU1_WIDTH 0x1
1170#define OMAP54XX_RST_CPU1_MASK (1 << 1)
1171
1172/* Used by RM_DSP_RSTCTRL, RM_DSP_RSTST */
1173#define OMAP54XX_RST_DSP_SHIFT 0
1174#define OMAP54XX_RST_DSP_WIDTH 0x1
1175#define OMAP54XX_RST_DSP_MASK (1 << 0)
1176
1177/* Used by RM_DSP_RSTST */
1178#define OMAP54XX_RST_DSP_EMU_SHIFT 2
1179#define OMAP54XX_RST_DSP_EMU_WIDTH 0x1
1180#define OMAP54XX_RST_DSP_EMU_MASK (1 << 2)
1181
1182/* Used by RM_DSP_RSTST */
1183#define OMAP54XX_RST_DSP_EMU_REQ_SHIFT 3
1184#define OMAP54XX_RST_DSP_EMU_REQ_WIDTH 0x1
1185#define OMAP54XX_RST_DSP_EMU_REQ_MASK (1 << 3)
1186
1187/* Used by RM_DSP_RSTCTRL, RM_DSP_RSTST */
1188#define OMAP54XX_RST_DSP_MMU_CACHE_SHIFT 1
1189#define OMAP54XX_RST_DSP_MMU_CACHE_WIDTH 0x1
1190#define OMAP54XX_RST_DSP_MMU_CACHE_MASK (1 << 1)
1191
1192/* Used by RM_IPU_RSTST */
1193#define OMAP54XX_RST_EMULATION_CPU0_SHIFT 3
1194#define OMAP54XX_RST_EMULATION_CPU0_WIDTH 0x1
1195#define OMAP54XX_RST_EMULATION_CPU0_MASK (1 << 3)
1196
1197/* Used by RM_IPU_RSTST */
1198#define OMAP54XX_RST_EMULATION_CPU1_SHIFT 4
1199#define OMAP54XX_RST_EMULATION_CPU1_WIDTH 0x1
1200#define OMAP54XX_RST_EMULATION_CPU1_MASK (1 << 4)
1201
1202/* Used by RM_IVA_RSTST */
1203#define OMAP54XX_RST_EMULATION_SEQ1_SHIFT 3
1204#define OMAP54XX_RST_EMULATION_SEQ1_WIDTH 0x1
1205#define OMAP54XX_RST_EMULATION_SEQ1_MASK (1 << 3)
1206
1207/* Used by RM_IVA_RSTST */
1208#define OMAP54XX_RST_EMULATION_SEQ2_SHIFT 4
1209#define OMAP54XX_RST_EMULATION_SEQ2_WIDTH 0x1
1210#define OMAP54XX_RST_EMULATION_SEQ2_MASK (1 << 4)
1211
1212/* Used by PRM_RSTCTRL */
1213#define OMAP54XX_RST_GLOBAL_COLD_SW_SHIFT 1
1214#define OMAP54XX_RST_GLOBAL_COLD_SW_WIDTH 0x1
1215#define OMAP54XX_RST_GLOBAL_COLD_SW_MASK (1 << 1)
1216
1217/* Used by PRM_RSTCTRL */
1218#define OMAP54XX_RST_GLOBAL_WARM_SW_SHIFT 0
1219#define OMAP54XX_RST_GLOBAL_WARM_SW_WIDTH 0x1
1220#define OMAP54XX_RST_GLOBAL_WARM_SW_MASK (1 << 0)
1221
1222/* Used by RM_IPU_RSTST */
1223#define OMAP54XX_RST_ICECRUSHER_CPU0_SHIFT 5
1224#define OMAP54XX_RST_ICECRUSHER_CPU0_WIDTH 0x1
1225#define OMAP54XX_RST_ICECRUSHER_CPU0_MASK (1 << 5)
1226
1227/* Used by RM_IPU_RSTST */
1228#define OMAP54XX_RST_ICECRUSHER_CPU1_SHIFT 6
1229#define OMAP54XX_RST_ICECRUSHER_CPU1_WIDTH 0x1
1230#define OMAP54XX_RST_ICECRUSHER_CPU1_MASK (1 << 6)
1231
1232/* Used by RM_IVA_RSTST */
1233#define OMAP54XX_RST_ICECRUSHER_SEQ1_SHIFT 5
1234#define OMAP54XX_RST_ICECRUSHER_SEQ1_WIDTH 0x1
1235#define OMAP54XX_RST_ICECRUSHER_SEQ1_MASK (1 << 5)
1236
1237/* Used by RM_IVA_RSTST */
1238#define OMAP54XX_RST_ICECRUSHER_SEQ2_SHIFT 6
1239#define OMAP54XX_RST_ICECRUSHER_SEQ2_WIDTH 0x1
1240#define OMAP54XX_RST_ICECRUSHER_SEQ2_MASK (1 << 6)
1241
1242/* Used by RM_IPU_RSTCTRL, RM_IPU_RSTST */
1243#define OMAP54XX_RST_IPU_MMU_CACHE_SHIFT 2
1244#define OMAP54XX_RST_IPU_MMU_CACHE_WIDTH 0x1
1245#define OMAP54XX_RST_IPU_MMU_CACHE_MASK (1 << 2)
1246
1247/* Used by RM_IVA_RSTCTRL, RM_IVA_RSTST */
1248#define OMAP54XX_RST_LOGIC_SHIFT 2
1249#define OMAP54XX_RST_LOGIC_WIDTH 0x1
1250#define OMAP54XX_RST_LOGIC_MASK (1 << 2)
1251
1252/* Used by RM_IVA_RSTCTRL, RM_IVA_RSTST */
1253#define OMAP54XX_RST_SEQ1_SHIFT 0
1254#define OMAP54XX_RST_SEQ1_WIDTH 0x1
1255#define OMAP54XX_RST_SEQ1_MASK (1 << 0)
1256
1257/* Used by RM_IVA_RSTCTRL, RM_IVA_RSTST */
1258#define OMAP54XX_RST_SEQ2_SHIFT 1
1259#define OMAP54XX_RST_SEQ2_WIDTH 0x1
1260#define OMAP54XX_RST_SEQ2_MASK (1 << 1)
1261
1262/* Used by REVISION_PRM */
1263#define OMAP54XX_R_RTL_SHIFT 11
1264#define OMAP54XX_R_RTL_WIDTH 0x5
1265#define OMAP54XX_R_RTL_MASK (0x1f << 11)
1266
1267/* Used by PRM_VC_SMPS_CORE_CONFIG */
1268#define OMAP54XX_SA_VDD_CORE_L_SHIFT 0
1269#define OMAP54XX_SA_VDD_CORE_L_WIDTH 0x7
1270#define OMAP54XX_SA_VDD_CORE_L_MASK (0x7f << 0)
1271
1272/* Used by PRM_VC_SMPS_MM_CONFIG */
1273#define OMAP54XX_SA_VDD_MM_L_SHIFT 0
1274#define OMAP54XX_SA_VDD_MM_L_WIDTH 0x7
1275#define OMAP54XX_SA_VDD_MM_L_MASK (0x7f << 0)
1276
1277/* Used by PRM_VC_SMPS_MPU_CONFIG */
1278#define OMAP54XX_SA_VDD_MPU_L_SHIFT 0
1279#define OMAP54XX_SA_VDD_MPU_L_WIDTH 0x7
1280#define OMAP54XX_SA_VDD_MPU_L_MASK (0x7f << 0)
1281
1282/* Used by REVISION_PRM */
1283#define OMAP54XX_SCHEME_SHIFT 30
1284#define OMAP54XX_SCHEME_WIDTH 0x2
1285#define OMAP54XX_SCHEME_MASK (0x3 << 30)
1286
1287/* Used by PRM_VC_CFG_I2C_CLK */
1288#define OMAP54XX_SCLH_SHIFT 0
1289#define OMAP54XX_SCLH_WIDTH 0x8
1290#define OMAP54XX_SCLH_MASK (0xff << 0)
1291
1292/* Used by PRM_VC_CFG_I2C_CLK */
1293#define OMAP54XX_SCLL_SHIFT 8
1294#define OMAP54XX_SCLL_WIDTH 0x8
1295#define OMAP54XX_SCLL_MASK (0xff << 8)
1296
1297/* Used by PRM_RSTST */
1298#define OMAP54XX_SECURE_WDT_RST_SHIFT 4
1299#define OMAP54XX_SECURE_WDT_RST_WIDTH 0x1
1300#define OMAP54XX_SECURE_WDT_RST_MASK (1 << 4)
1301
1302/* Used by PRM_VC_SMPS_CORE_CONFIG */
1303#define OMAP54XX_SEL_SA_VDD_CORE_L_SHIFT 24
1304#define OMAP54XX_SEL_SA_VDD_CORE_L_WIDTH 0x1
1305#define OMAP54XX_SEL_SA_VDD_CORE_L_MASK (1 << 24)
1306
1307/* Used by PRM_VC_SMPS_MM_CONFIG */
1308#define OMAP54XX_SEL_SA_VDD_MM_L_SHIFT 24
1309#define OMAP54XX_SEL_SA_VDD_MM_L_WIDTH 0x1
1310#define OMAP54XX_SEL_SA_VDD_MM_L_MASK (1 << 24)
1311
1312/* Used by PRM_VC_SMPS_MPU_CONFIG */
1313#define OMAP54XX_SEL_SA_VDD_MPU_L_SHIFT 24
1314#define OMAP54XX_SEL_SA_VDD_MPU_L_WIDTH 0x1
1315#define OMAP54XX_SEL_SA_VDD_MPU_L_MASK (1 << 24)
1316
1317/* Used by PM_IVA_PWRSTCTRL */
1318#define OMAP54XX_SL2_MEM_ONSTATE_SHIFT 18
1319#define OMAP54XX_SL2_MEM_ONSTATE_WIDTH 0x2
1320#define OMAP54XX_SL2_MEM_ONSTATE_MASK (0x3 << 18)
1321
1322/* Used by PM_IVA_PWRSTCTRL */
1323#define OMAP54XX_SL2_MEM_RETSTATE_SHIFT 9
1324#define OMAP54XX_SL2_MEM_RETSTATE_WIDTH 0x1
1325#define OMAP54XX_SL2_MEM_RETSTATE_MASK (1 << 9)
1326
1327/* Used by PM_IVA_PWRSTST */
1328#define OMAP54XX_SL2_MEM_STATEST_SHIFT 6
1329#define OMAP54XX_SL2_MEM_STATEST_WIDTH 0x2
1330#define OMAP54XX_SL2_MEM_STATEST_MASK (0x3 << 6)
1331
1332/* Used by PRM_VC_VAL_BYPASS */
1333#define OMAP54XX_SLAVEADDR_SHIFT 0
1334#define OMAP54XX_SLAVEADDR_WIDTH 0x7
1335#define OMAP54XX_SLAVEADDR_MASK (0x7f << 0)
1336
1337/* Used by PRM_SRAM_COUNT */
1338#define OMAP54XX_SLPCNT_VALUE_SHIFT 16
1339#define OMAP54XX_SLPCNT_VALUE_WIDTH 0x8
1340#define OMAP54XX_SLPCNT_VALUE_MASK (0xff << 16)
1341
1342/* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_MM_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */
1343#define OMAP54XX_SMPSWAITTIMEMAX_SHIFT 8
1344#define OMAP54XX_SMPSWAITTIMEMAX_WIDTH 0x10
1345#define OMAP54XX_SMPSWAITTIMEMAX_MASK (0xffff << 8)
1346
1347/* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_MM_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */
1348#define OMAP54XX_SMPSWAITTIMEMIN_SHIFT 8
1349#define OMAP54XX_SMPSWAITTIMEMIN_WIDTH 0x10
1350#define OMAP54XX_SMPSWAITTIMEMIN_MASK (0xffff << 8)
1351
1352/* Used by PRM_VC_CORE_ERRST */
1353#define OMAP54XX_SMPS_RA_ERR_CORE_SHIFT 1
1354#define OMAP54XX_SMPS_RA_ERR_CORE_WIDTH 0x1
1355#define OMAP54XX_SMPS_RA_ERR_CORE_MASK (1 << 1)
1356
1357/* Used by PRM_VC_MM_ERRST */
1358#define OMAP54XX_SMPS_RA_ERR_MM_SHIFT 1
1359#define OMAP54XX_SMPS_RA_ERR_MM_WIDTH 0x1
1360#define OMAP54XX_SMPS_RA_ERR_MM_MASK (1 << 1)
1361
1362/* Used by PRM_VC_MPU_ERRST */
1363#define OMAP54XX_SMPS_RA_ERR_MPU_SHIFT 1
1364#define OMAP54XX_SMPS_RA_ERR_MPU_WIDTH 0x1
1365#define OMAP54XX_SMPS_RA_ERR_MPU_MASK (1 << 1)
1366
1367/* Used by PRM_VC_CORE_ERRST */
1368#define OMAP54XX_SMPS_SA_ERR_CORE_SHIFT 0
1369#define OMAP54XX_SMPS_SA_ERR_CORE_WIDTH 0x1
1370#define OMAP54XX_SMPS_SA_ERR_CORE_MASK (1 << 0)
1371
1372/* Used by PRM_VC_MM_ERRST */
1373#define OMAP54XX_SMPS_SA_ERR_MM_SHIFT 0
1374#define OMAP54XX_SMPS_SA_ERR_MM_WIDTH 0x1
1375#define OMAP54XX_SMPS_SA_ERR_MM_MASK (1 << 0)
1376
1377/* Used by PRM_VC_MPU_ERRST */
1378#define OMAP54XX_SMPS_SA_ERR_MPU_SHIFT 0
1379#define OMAP54XX_SMPS_SA_ERR_MPU_WIDTH 0x1
1380#define OMAP54XX_SMPS_SA_ERR_MPU_MASK (1 << 0)
1381
1382/* Used by PRM_VC_CORE_ERRST */
1383#define OMAP54XX_SMPS_TIMEOUT_ERR_CORE_SHIFT 2
1384#define OMAP54XX_SMPS_TIMEOUT_ERR_CORE_WIDTH 0x1
1385#define OMAP54XX_SMPS_TIMEOUT_ERR_CORE_MASK (1 << 2)
1386
1387/* Used by PRM_VC_MM_ERRST */
1388#define OMAP54XX_SMPS_TIMEOUT_ERR_MM_SHIFT 2
1389#define OMAP54XX_SMPS_TIMEOUT_ERR_MM_WIDTH 0x1
1390#define OMAP54XX_SMPS_TIMEOUT_ERR_MM_MASK (1 << 2)
1391
1392/* Used by PRM_VC_MPU_ERRST */
1393#define OMAP54XX_SMPS_TIMEOUT_ERR_MPU_SHIFT 2
1394#define OMAP54XX_SMPS_TIMEOUT_ERR_MPU_WIDTH 0x1
1395#define OMAP54XX_SMPS_TIMEOUT_ERR_MPU_MASK (1 << 2)
1396
1397/* Used by PRM_ABBLDO_MM_SETUP, PRM_ABBLDO_MPU_SETUP */
1398#define OMAP54XX_SR2EN_SHIFT 0
1399#define OMAP54XX_SR2EN_WIDTH 0x1
1400#define OMAP54XX_SR2EN_MASK (1 << 0)
1401
1402/* Used by PRM_ABBLDO_MM_CTRL, PRM_ABBLDO_MPU_CTRL */
1403#define OMAP54XX_SR2_IN_TRANSITION_SHIFT 6
1404#define OMAP54XX_SR2_IN_TRANSITION_WIDTH 0x1
1405#define OMAP54XX_SR2_IN_TRANSITION_MASK (1 << 6)
1406
1407/* Used by PRM_ABBLDO_MM_CTRL, PRM_ABBLDO_MPU_CTRL */
1408#define OMAP54XX_SR2_STATUS_SHIFT 3
1409#define OMAP54XX_SR2_STATUS_WIDTH 0x2
1410#define OMAP54XX_SR2_STATUS_MASK (0x3 << 3)
1411
1412/* Used by PRM_ABBLDO_MM_SETUP, PRM_ABBLDO_MPU_SETUP */
1413#define OMAP54XX_SR2_WTCNT_VALUE_SHIFT 8
1414#define OMAP54XX_SR2_WTCNT_VALUE_WIDTH 0x8
1415#define OMAP54XX_SR2_WTCNT_VALUE_MASK (0xff << 8)
1416
1417/* Used by PRM_SLDO_CORE_CTRL, PRM_SLDO_MM_CTRL, PRM_SLDO_MPU_CTRL */
1418#define OMAP54XX_SRAMLDO_STATUS_SHIFT 8
1419#define OMAP54XX_SRAMLDO_STATUS_WIDTH 0x1
1420#define OMAP54XX_SRAMLDO_STATUS_MASK (1 << 8)
1421
1422/* Used by PRM_SLDO_CORE_CTRL, PRM_SLDO_MM_CTRL, PRM_SLDO_MPU_CTRL */
1423#define OMAP54XX_SRAM_IN_TRANSITION_SHIFT 9
1424#define OMAP54XX_SRAM_IN_TRANSITION_WIDTH 0x1
1425#define OMAP54XX_SRAM_IN_TRANSITION_MASK (1 << 9)
1426
1427/* Used by PRM_VC_CFG_I2C_MODE */
1428#define OMAP54XX_SRMODEEN_SHIFT 4
1429#define OMAP54XX_SRMODEEN_WIDTH 0x1
1430#define OMAP54XX_SRMODEEN_MASK (1 << 4)
1431
1432/* Used by PRM_VOLTSETUP_WARMRESET */
1433#define OMAP54XX_STABLE_COUNT_SHIFT 0
1434#define OMAP54XX_STABLE_COUNT_WIDTH 0x6
1435#define OMAP54XX_STABLE_COUNT_MASK (0x3f << 0)
1436
1437/* Used by PRM_VOLTSETUP_WARMRESET */
1438#define OMAP54XX_STABLE_PRESCAL_SHIFT 8
1439#define OMAP54XX_STABLE_PRESCAL_WIDTH 0x2
1440#define OMAP54XX_STABLE_PRESCAL_MASK (0x3 << 8)
1441
1442/* Used by PRM_BANDGAP_SETUP */
1443#define OMAP54XX_STARTUP_COUNT_SHIFT 0
1444#define OMAP54XX_STARTUP_COUNT_WIDTH 0x8
1445#define OMAP54XX_STARTUP_COUNT_MASK (0xff << 0)
1446
1447/* Renamed from STARTUP_COUNT Used by PRM_SRAM_COUNT */
1448#define OMAP54XX_STARTUP_COUNT_24_31_SHIFT 24
1449#define OMAP54XX_STARTUP_COUNT_24_31_WIDTH 0x8
1450#define OMAP54XX_STARTUP_COUNT_24_31_MASK (0xff << 24)
1451
1452/* Used by PM_IVA_PWRSTCTRL */
1453#define OMAP54XX_TCM1_MEM_ONSTATE_SHIFT 20
1454#define OMAP54XX_TCM1_MEM_ONSTATE_WIDTH 0x2
1455#define OMAP54XX_TCM1_MEM_ONSTATE_MASK (0x3 << 20)
1456
1457/* Used by PM_IVA_PWRSTCTRL */
1458#define OMAP54XX_TCM1_MEM_RETSTATE_SHIFT 10
1459#define OMAP54XX_TCM1_MEM_RETSTATE_WIDTH 0x1
1460#define OMAP54XX_TCM1_MEM_RETSTATE_MASK (1 << 10)
1461
1462/* Used by PM_IVA_PWRSTST */
1463#define OMAP54XX_TCM1_MEM_STATEST_SHIFT 8
1464#define OMAP54XX_TCM1_MEM_STATEST_WIDTH 0x2
1465#define OMAP54XX_TCM1_MEM_STATEST_MASK (0x3 << 8)
1466
1467/* Used by PM_IVA_PWRSTCTRL */
1468#define OMAP54XX_TCM2_MEM_ONSTATE_SHIFT 22
1469#define OMAP54XX_TCM2_MEM_ONSTATE_WIDTH 0x2
1470#define OMAP54XX_TCM2_MEM_ONSTATE_MASK (0x3 << 22)
1471
1472/* Used by PM_IVA_PWRSTCTRL */
1473#define OMAP54XX_TCM2_MEM_RETSTATE_SHIFT 11
1474#define OMAP54XX_TCM2_MEM_RETSTATE_WIDTH 0x1
1475#define OMAP54XX_TCM2_MEM_RETSTATE_MASK (1 << 11)
1476
1477/* Used by PM_IVA_PWRSTST */
1478#define OMAP54XX_TCM2_MEM_STATEST_SHIFT 10
1479#define OMAP54XX_TCM2_MEM_STATEST_WIDTH 0x2
1480#define OMAP54XX_TCM2_MEM_STATEST_MASK (0x3 << 10)
1481
1482/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_MM_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1483#define OMAP54XX_TIMEOUT_SHIFT 0
1484#define OMAP54XX_TIMEOUT_WIDTH 0x10
1485#define OMAP54XX_TIMEOUT_MASK (0xffff << 0)
1486
1487/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
1488#define OMAP54XX_TIMEOUTEN_SHIFT 3
1489#define OMAP54XX_TIMEOUTEN_WIDTH 0x1
1490#define OMAP54XX_TIMEOUTEN_MASK (1 << 3)
1491
1492/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1493#define OMAP54XX_TRANSITION_EN_SHIFT 8
1494#define OMAP54XX_TRANSITION_EN_WIDTH 0x1
1495#define OMAP54XX_TRANSITION_EN_MASK (1 << 8)
1496
1497/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1498#define OMAP54XX_TRANSITION_ST_SHIFT 8
1499#define OMAP54XX_TRANSITION_ST_WIDTH 0x1
1500#define OMAP54XX_TRANSITION_ST_MASK (1 << 8)
1501
1502/* Used by PRM_DEBUG_TRANS_CFG */
1503#define OMAP54XX_TRIGGER_CLEAR_SHIFT 2
1504#define OMAP54XX_TRIGGER_CLEAR_WIDTH 0x1
1505#define OMAP54XX_TRIGGER_CLEAR_MASK (1 << 2)
1506
1507/* Used by PRM_RSTST */
1508#define OMAP54XX_TSHUT_CORE_RST_SHIFT 13
1509#define OMAP54XX_TSHUT_CORE_RST_WIDTH 0x1
1510#define OMAP54XX_TSHUT_CORE_RST_MASK (1 << 13)
1511
1512/* Used by PRM_RSTST */
1513#define OMAP54XX_TSHUT_MM_RST_SHIFT 12
1514#define OMAP54XX_TSHUT_MM_RST_WIDTH 0x1
1515#define OMAP54XX_TSHUT_MM_RST_MASK (1 << 12)
1516
1517/* Used by PRM_RSTST */
1518#define OMAP54XX_TSHUT_MPU_RST_SHIFT 11
1519#define OMAP54XX_TSHUT_MPU_RST_WIDTH 0x1
1520#define OMAP54XX_TSHUT_MPU_RST_MASK (1 << 11)
1521
1522/* Used by PRM_VC_VAL_BYPASS */
1523#define OMAP54XX_VALID_SHIFT 24
1524#define OMAP54XX_VALID_WIDTH 0x1
1525#define OMAP54XX_VALID_MASK (1 << 24)
1526
1527/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1528#define OMAP54XX_VC_BYPASSACK_EN_SHIFT 14
1529#define OMAP54XX_VC_BYPASSACK_EN_WIDTH 0x1
1530#define OMAP54XX_VC_BYPASSACK_EN_MASK (1 << 14)
1531
1532/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1533#define OMAP54XX_VC_BYPASSACK_ST_SHIFT 14
1534#define OMAP54XX_VC_BYPASSACK_ST_WIDTH 0x1
1535#define OMAP54XX_VC_BYPASSACK_ST_MASK (1 << 14)
1536
1537/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1538#define OMAP54XX_VC_CORE_VPACK_EN_SHIFT 22
1539#define OMAP54XX_VC_CORE_VPACK_EN_WIDTH 0x1
1540#define OMAP54XX_VC_CORE_VPACK_EN_MASK (1 << 22)
1541
1542/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1543#define OMAP54XX_VC_CORE_VPACK_ST_SHIFT 22
1544#define OMAP54XX_VC_CORE_VPACK_ST_WIDTH 0x1
1545#define OMAP54XX_VC_CORE_VPACK_ST_MASK (1 << 22)
1546
1547/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1548#define OMAP54XX_VC_MM_VPACK_EN_SHIFT 30
1549#define OMAP54XX_VC_MM_VPACK_EN_WIDTH 0x1
1550#define OMAP54XX_VC_MM_VPACK_EN_MASK (1 << 30)
1551
1552/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1553#define OMAP54XX_VC_MM_VPACK_ST_SHIFT 30
1554#define OMAP54XX_VC_MM_VPACK_ST_WIDTH 0x1
1555#define OMAP54XX_VC_MM_VPACK_ST_MASK (1 << 30)
1556
1557/* Used by PRM_IRQENABLE_MPU_2 */
1558#define OMAP54XX_VC_MPU_VPACK_EN_SHIFT 6
1559#define OMAP54XX_VC_MPU_VPACK_EN_WIDTH 0x1
1560#define OMAP54XX_VC_MPU_VPACK_EN_MASK (1 << 6)
1561
1562/* Used by PRM_IRQSTATUS_MPU_2 */
1563#define OMAP54XX_VC_MPU_VPACK_ST_SHIFT 6
1564#define OMAP54XX_VC_MPU_VPACK_ST_WIDTH 0x1
1565#define OMAP54XX_VC_MPU_VPACK_ST_MASK (1 << 6)
1566
1567/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1568#define OMAP54XX_VC_RAERR_EN_SHIFT 12
1569#define OMAP54XX_VC_RAERR_EN_WIDTH 0x1
1570#define OMAP54XX_VC_RAERR_EN_MASK (1 << 12)
1571
1572/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1573#define OMAP54XX_VC_RAERR_ST_SHIFT 12
1574#define OMAP54XX_VC_RAERR_ST_WIDTH 0x1
1575#define OMAP54XX_VC_RAERR_ST_MASK (1 << 12)
1576
1577/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1578#define OMAP54XX_VC_SAERR_EN_SHIFT 11
1579#define OMAP54XX_VC_SAERR_EN_WIDTH 0x1
1580#define OMAP54XX_VC_SAERR_EN_MASK (1 << 11)
1581
1582/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1583#define OMAP54XX_VC_SAERR_ST_SHIFT 11
1584#define OMAP54XX_VC_SAERR_ST_WIDTH 0x1
1585#define OMAP54XX_VC_SAERR_ST_MASK (1 << 11)
1586
1587/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1588#define OMAP54XX_VC_TOERR_EN_SHIFT 13
1589#define OMAP54XX_VC_TOERR_EN_WIDTH 0x1
1590#define OMAP54XX_VC_TOERR_EN_MASK (1 << 13)
1591
1592/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1593#define OMAP54XX_VC_TOERR_ST_SHIFT 13
1594#define OMAP54XX_VC_TOERR_ST_WIDTH 0x1
1595#define OMAP54XX_VC_TOERR_ST_MASK (1 << 13)
1596
1597/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_MM_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1598#define OMAP54XX_VDDMAX_SHIFT 24
1599#define OMAP54XX_VDDMAX_WIDTH 0x8
1600#define OMAP54XX_VDDMAX_MASK (0xff << 24)
1601
1602/* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_MM_VLIMITTO, PRM_VP_MPU_VLIMITTO */
1603#define OMAP54XX_VDDMIN_SHIFT 16
1604#define OMAP54XX_VDDMIN_WIDTH 0x8
1605#define OMAP54XX_VDDMIN_MASK (0xff << 16)
1606
1607/* Used by PRM_VOLTCTRL */
1608#define OMAP54XX_VDD_CORE_I2C_DISABLE_SHIFT 12
1609#define OMAP54XX_VDD_CORE_I2C_DISABLE_WIDTH 0x1
1610#define OMAP54XX_VDD_CORE_I2C_DISABLE_MASK (1 << 12)
1611
1612/* Used by PRM_RSTST */
1613#define OMAP54XX_VDD_CORE_VOLT_MGR_RST_SHIFT 8
1614#define OMAP54XX_VDD_CORE_VOLT_MGR_RST_WIDTH 0x1
1615#define OMAP54XX_VDD_CORE_VOLT_MGR_RST_MASK (1 << 8)
1616
1617/* Used by PRM_VOLTCTRL */
1618#define OMAP54XX_VDD_MM_I2C_DISABLE_SHIFT 14
1619#define OMAP54XX_VDD_MM_I2C_DISABLE_WIDTH 0x1
1620#define OMAP54XX_VDD_MM_I2C_DISABLE_MASK (1 << 14)
1621
1622/* Used by PRM_VOLTCTRL */
1623#define OMAP54XX_VDD_MM_PRESENCE_SHIFT 9
1624#define OMAP54XX_VDD_MM_PRESENCE_WIDTH 0x1
1625#define OMAP54XX_VDD_MM_PRESENCE_MASK (1 << 9)
1626
1627/* Used by PRM_RSTST */
1628#define OMAP54XX_VDD_MM_VOLT_MGR_RST_SHIFT 7
1629#define OMAP54XX_VDD_MM_VOLT_MGR_RST_WIDTH 0x1
1630#define OMAP54XX_VDD_MM_VOLT_MGR_RST_MASK (1 << 7)
1631
1632/* Used by PRM_VOLTCTRL */
1633#define OMAP54XX_VDD_MPU_I2C_DISABLE_SHIFT 13
1634#define OMAP54XX_VDD_MPU_I2C_DISABLE_WIDTH 0x1
1635#define OMAP54XX_VDD_MPU_I2C_DISABLE_MASK (1 << 13)
1636
1637/* Used by PRM_VOLTCTRL */
1638#define OMAP54XX_VDD_MPU_PRESENCE_SHIFT 8
1639#define OMAP54XX_VDD_MPU_PRESENCE_WIDTH 0x1
1640#define OMAP54XX_VDD_MPU_PRESENCE_MASK (1 << 8)
1641
1642/* Used by PRM_RSTST */
1643#define OMAP54XX_VDD_MPU_VOLT_MGR_RST_SHIFT 6
1644#define OMAP54XX_VDD_MPU_VOLT_MGR_RST_WIDTH 0x1
1645#define OMAP54XX_VDD_MPU_VOLT_MGR_RST_MASK (1 << 6)
1646
1647/* Used by PRM_VC_CORE_ERRST */
1648#define OMAP54XX_VFSM_RA_ERR_CORE_SHIFT 4
1649#define OMAP54XX_VFSM_RA_ERR_CORE_WIDTH 0x1
1650#define OMAP54XX_VFSM_RA_ERR_CORE_MASK (1 << 4)
1651
1652/* Used by PRM_VC_MM_ERRST */
1653#define OMAP54XX_VFSM_RA_ERR_MM_SHIFT 4
1654#define OMAP54XX_VFSM_RA_ERR_MM_WIDTH 0x1
1655#define OMAP54XX_VFSM_RA_ERR_MM_MASK (1 << 4)
1656
1657/* Used by PRM_VC_MPU_ERRST */
1658#define OMAP54XX_VFSM_RA_ERR_MPU_SHIFT 4
1659#define OMAP54XX_VFSM_RA_ERR_MPU_WIDTH 0x1
1660#define OMAP54XX_VFSM_RA_ERR_MPU_MASK (1 << 4)
1661
1662/* Used by PRM_VC_CORE_ERRST */
1663#define OMAP54XX_VFSM_SA_ERR_CORE_SHIFT 3
1664#define OMAP54XX_VFSM_SA_ERR_CORE_WIDTH 0x1
1665#define OMAP54XX_VFSM_SA_ERR_CORE_MASK (1 << 3)
1666
1667/* Used by PRM_VC_MM_ERRST */
1668#define OMAP54XX_VFSM_SA_ERR_MM_SHIFT 3
1669#define OMAP54XX_VFSM_SA_ERR_MM_WIDTH 0x1
1670#define OMAP54XX_VFSM_SA_ERR_MM_MASK (1 << 3)
1671
1672/* Used by PRM_VC_MPU_ERRST */
1673#define OMAP54XX_VFSM_SA_ERR_MPU_SHIFT 3
1674#define OMAP54XX_VFSM_SA_ERR_MPU_WIDTH 0x1
1675#define OMAP54XX_VFSM_SA_ERR_MPU_MASK (1 << 3)
1676
1677/* Used by PRM_VC_CORE_ERRST */
1678#define OMAP54XX_VFSM_TIMEOUT_ERR_CORE_SHIFT 5
1679#define OMAP54XX_VFSM_TIMEOUT_ERR_CORE_WIDTH 0x1
1680#define OMAP54XX_VFSM_TIMEOUT_ERR_CORE_MASK (1 << 5)
1681
1682/* Used by PRM_VC_MM_ERRST */
1683#define OMAP54XX_VFSM_TIMEOUT_ERR_MM_SHIFT 5
1684#define OMAP54XX_VFSM_TIMEOUT_ERR_MM_WIDTH 0x1
1685#define OMAP54XX_VFSM_TIMEOUT_ERR_MM_MASK (1 << 5)
1686
1687/* Used by PRM_VC_MPU_ERRST */
1688#define OMAP54XX_VFSM_TIMEOUT_ERR_MPU_SHIFT 5
1689#define OMAP54XX_VFSM_TIMEOUT_ERR_MPU_WIDTH 0x1
1690#define OMAP54XX_VFSM_TIMEOUT_ERR_MPU_MASK (1 << 5)
1691
1692/* Used by PRM_VC_SMPS_CORE_CONFIG */
1693#define OMAP54XX_VOLRA_VDD_CORE_L_SHIFT 8
1694#define OMAP54XX_VOLRA_VDD_CORE_L_WIDTH 0x8
1695#define OMAP54XX_VOLRA_VDD_CORE_L_MASK (0xff << 8)
1696
1697/* Used by PRM_VC_SMPS_MM_CONFIG */
1698#define OMAP54XX_VOLRA_VDD_MM_L_SHIFT 8
1699#define OMAP54XX_VOLRA_VDD_MM_L_WIDTH 0x8
1700#define OMAP54XX_VOLRA_VDD_MM_L_MASK (0xff << 8)
1701
1702/* Used by PRM_VC_SMPS_MPU_CONFIG */
1703#define OMAP54XX_VOLRA_VDD_MPU_L_SHIFT 8
1704#define OMAP54XX_VOLRA_VDD_MPU_L_WIDTH 0x8
1705#define OMAP54XX_VOLRA_VDD_MPU_L_MASK (0xff << 8)
1706
1707/* Used by PRM_VOLTST_MM, PRM_VOLTST_MPU */
1708#define OMAP54XX_VOLTSTATEST_SHIFT 0
1709#define OMAP54XX_VOLTSTATEST_WIDTH 0x2
1710#define OMAP54XX_VOLTSTATEST_MASK (0x3 << 0)
1711
1712/* Used by PRM_VP_CORE_CONFIG, PRM_VP_MM_CONFIG, PRM_VP_MPU_CONFIG */
1713#define OMAP54XX_VPENABLE_SHIFT 0
1714#define OMAP54XX_VPENABLE_WIDTH 0x1
1715#define OMAP54XX_VPENABLE_MASK (1 << 0)
1716
1717/* Used by PRM_VP_CORE_STATUS, PRM_VP_MM_STATUS, PRM_VP_MPU_STATUS */
1718#define OMAP54XX_VPINIDLE_SHIFT 0
1719#define OMAP54XX_VPINIDLE_WIDTH 0x1
1720#define OMAP54XX_VPINIDLE_MASK (1 << 0)
1721
1722/* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_MM_VOLTAGE, PRM_VP_MPU_VOLTAGE */
1723#define OMAP54XX_VPVOLTAGE_SHIFT 0
1724#define OMAP54XX_VPVOLTAGE_WIDTH 0x8
1725#define OMAP54XX_VPVOLTAGE_MASK (0xff << 0)
1726
1727/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1728#define OMAP54XX_VP_CORE_EQVALUE_EN_SHIFT 20
1729#define OMAP54XX_VP_CORE_EQVALUE_EN_WIDTH 0x1
1730#define OMAP54XX_VP_CORE_EQVALUE_EN_MASK (1 << 20)
1731
1732/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1733#define OMAP54XX_VP_CORE_EQVALUE_ST_SHIFT 20
1734#define OMAP54XX_VP_CORE_EQVALUE_ST_WIDTH 0x1
1735#define OMAP54XX_VP_CORE_EQVALUE_ST_MASK (1 << 20)
1736
1737/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1738#define OMAP54XX_VP_CORE_MAXVDD_EN_SHIFT 18
1739#define OMAP54XX_VP_CORE_MAXVDD_EN_WIDTH 0x1
1740#define OMAP54XX_VP_CORE_MAXVDD_EN_MASK (1 << 18)
1741
1742/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1743#define OMAP54XX_VP_CORE_MAXVDD_ST_SHIFT 18
1744#define OMAP54XX_VP_CORE_MAXVDD_ST_WIDTH 0x1
1745#define OMAP54XX_VP_CORE_MAXVDD_ST_MASK (1 << 18)
1746
1747/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1748#define OMAP54XX_VP_CORE_MINVDD_EN_SHIFT 17
1749#define OMAP54XX_VP_CORE_MINVDD_EN_WIDTH 0x1
1750#define OMAP54XX_VP_CORE_MINVDD_EN_MASK (1 << 17)
1751
1752/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1753#define OMAP54XX_VP_CORE_MINVDD_ST_SHIFT 17
1754#define OMAP54XX_VP_CORE_MINVDD_ST_WIDTH 0x1
1755#define OMAP54XX_VP_CORE_MINVDD_ST_MASK (1 << 17)
1756
1757/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1758#define OMAP54XX_VP_CORE_NOSMPSACK_EN_SHIFT 19
1759#define OMAP54XX_VP_CORE_NOSMPSACK_EN_WIDTH 0x1
1760#define OMAP54XX_VP_CORE_NOSMPSACK_EN_MASK (1 << 19)
1761
1762/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1763#define OMAP54XX_VP_CORE_NOSMPSACK_ST_SHIFT 19
1764#define OMAP54XX_VP_CORE_NOSMPSACK_ST_WIDTH 0x1
1765#define OMAP54XX_VP_CORE_NOSMPSACK_ST_MASK (1 << 19)
1766
1767/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1768#define OMAP54XX_VP_CORE_OPPCHANGEDONE_EN_SHIFT 16
1769#define OMAP54XX_VP_CORE_OPPCHANGEDONE_EN_WIDTH 0x1
1770#define OMAP54XX_VP_CORE_OPPCHANGEDONE_EN_MASK (1 << 16)
1771
1772/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1773#define OMAP54XX_VP_CORE_OPPCHANGEDONE_ST_SHIFT 16
1774#define OMAP54XX_VP_CORE_OPPCHANGEDONE_ST_WIDTH 0x1
1775#define OMAP54XX_VP_CORE_OPPCHANGEDONE_ST_MASK (1 << 16)
1776
1777/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1778#define OMAP54XX_VP_CORE_TRANXDONE_EN_SHIFT 21
1779#define OMAP54XX_VP_CORE_TRANXDONE_EN_WIDTH 0x1
1780#define OMAP54XX_VP_CORE_TRANXDONE_EN_MASK (1 << 21)
1781
1782/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1783#define OMAP54XX_VP_CORE_TRANXDONE_ST_SHIFT 21
1784#define OMAP54XX_VP_CORE_TRANXDONE_ST_WIDTH 0x1
1785#define OMAP54XX_VP_CORE_TRANXDONE_ST_MASK (1 << 21)
1786
1787/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1788#define OMAP54XX_VP_MM_EQVALUE_EN_SHIFT 28
1789#define OMAP54XX_VP_MM_EQVALUE_EN_WIDTH 0x1
1790#define OMAP54XX_VP_MM_EQVALUE_EN_MASK (1 << 28)
1791
1792/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1793#define OMAP54XX_VP_MM_EQVALUE_ST_SHIFT 28
1794#define OMAP54XX_VP_MM_EQVALUE_ST_WIDTH 0x1
1795#define OMAP54XX_VP_MM_EQVALUE_ST_MASK (1 << 28)
1796
1797/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1798#define OMAP54XX_VP_MM_MAXVDD_EN_SHIFT 26
1799#define OMAP54XX_VP_MM_MAXVDD_EN_WIDTH 0x1
1800#define OMAP54XX_VP_MM_MAXVDD_EN_MASK (1 << 26)
1801
1802/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1803#define OMAP54XX_VP_MM_MAXVDD_ST_SHIFT 26
1804#define OMAP54XX_VP_MM_MAXVDD_ST_WIDTH 0x1
1805#define OMAP54XX_VP_MM_MAXVDD_ST_MASK (1 << 26)
1806
1807/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1808#define OMAP54XX_VP_MM_MINVDD_EN_SHIFT 25
1809#define OMAP54XX_VP_MM_MINVDD_EN_WIDTH 0x1
1810#define OMAP54XX_VP_MM_MINVDD_EN_MASK (1 << 25)
1811
1812/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1813#define OMAP54XX_VP_MM_MINVDD_ST_SHIFT 25
1814#define OMAP54XX_VP_MM_MINVDD_ST_WIDTH 0x1
1815#define OMAP54XX_VP_MM_MINVDD_ST_MASK (1 << 25)
1816
1817/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1818#define OMAP54XX_VP_MM_NOSMPSACK_EN_SHIFT 27
1819#define OMAP54XX_VP_MM_NOSMPSACK_EN_WIDTH 0x1
1820#define OMAP54XX_VP_MM_NOSMPSACK_EN_MASK (1 << 27)
1821
1822/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1823#define OMAP54XX_VP_MM_NOSMPSACK_ST_SHIFT 27
1824#define OMAP54XX_VP_MM_NOSMPSACK_ST_WIDTH 0x1
1825#define OMAP54XX_VP_MM_NOSMPSACK_ST_MASK (1 << 27)
1826
1827/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1828#define OMAP54XX_VP_MM_OPPCHANGEDONE_EN_SHIFT 24
1829#define OMAP54XX_VP_MM_OPPCHANGEDONE_EN_WIDTH 0x1
1830#define OMAP54XX_VP_MM_OPPCHANGEDONE_EN_MASK (1 << 24)
1831
1832/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1833#define OMAP54XX_VP_MM_OPPCHANGEDONE_ST_SHIFT 24
1834#define OMAP54XX_VP_MM_OPPCHANGEDONE_ST_WIDTH 0x1
1835#define OMAP54XX_VP_MM_OPPCHANGEDONE_ST_MASK (1 << 24)
1836
1837/* Used by PRM_IRQENABLE_IPU, PRM_IRQENABLE_MPU */
1838#define OMAP54XX_VP_MM_TRANXDONE_EN_SHIFT 29
1839#define OMAP54XX_VP_MM_TRANXDONE_EN_WIDTH 0x1
1840#define OMAP54XX_VP_MM_TRANXDONE_EN_MASK (1 << 29)
1841
1842/* Used by PRM_IRQSTATUS_IPU, PRM_IRQSTATUS_MPU */
1843#define OMAP54XX_VP_MM_TRANXDONE_ST_SHIFT 29
1844#define OMAP54XX_VP_MM_TRANXDONE_ST_WIDTH 0x1
1845#define OMAP54XX_VP_MM_TRANXDONE_ST_MASK (1 << 29)
1846
1847/* Used by PRM_IRQENABLE_MPU_2 */
1848#define OMAP54XX_VP_MPU_EQVALUE_EN_SHIFT 4
1849#define OMAP54XX_VP_MPU_EQVALUE_EN_WIDTH 0x1
1850#define OMAP54XX_VP_MPU_EQVALUE_EN_MASK (1 << 4)
1851
1852/* Used by PRM_IRQSTATUS_MPU_2 */
1853#define OMAP54XX_VP_MPU_EQVALUE_ST_SHIFT 4
1854#define OMAP54XX_VP_MPU_EQVALUE_ST_WIDTH 0x1
1855#define OMAP54XX_VP_MPU_EQVALUE_ST_MASK (1 << 4)
1856
1857/* Used by PRM_IRQENABLE_MPU_2 */
1858#define OMAP54XX_VP_MPU_MAXVDD_EN_SHIFT 2
1859#define OMAP54XX_VP_MPU_MAXVDD_EN_WIDTH 0x1
1860#define OMAP54XX_VP_MPU_MAXVDD_EN_MASK (1 << 2)
1861
1862/* Used by PRM_IRQSTATUS_MPU_2 */
1863#define OMAP54XX_VP_MPU_MAXVDD_ST_SHIFT 2
1864#define OMAP54XX_VP_MPU_MAXVDD_ST_WIDTH 0x1
1865#define OMAP54XX_VP_MPU_MAXVDD_ST_MASK (1 << 2)
1866
1867/* Used by PRM_IRQENABLE_MPU_2 */
1868#define OMAP54XX_VP_MPU_MINVDD_EN_SHIFT 1
1869#define OMAP54XX_VP_MPU_MINVDD_EN_WIDTH 0x1
1870#define OMAP54XX_VP_MPU_MINVDD_EN_MASK (1 << 1)
1871
1872/* Used by PRM_IRQSTATUS_MPU_2 */
1873#define OMAP54XX_VP_MPU_MINVDD_ST_SHIFT 1
1874#define OMAP54XX_VP_MPU_MINVDD_ST_WIDTH 0x1
1875#define OMAP54XX_VP_MPU_MINVDD_ST_MASK (1 << 1)
1876
1877/* Used by PRM_IRQENABLE_MPU_2 */
1878#define OMAP54XX_VP_MPU_NOSMPSACK_EN_SHIFT 3
1879#define OMAP54XX_VP_MPU_NOSMPSACK_EN_WIDTH 0x1
1880#define OMAP54XX_VP_MPU_NOSMPSACK_EN_MASK (1 << 3)
1881
1882/* Used by PRM_IRQSTATUS_MPU_2 */
1883#define OMAP54XX_VP_MPU_NOSMPSACK_ST_SHIFT 3
1884#define OMAP54XX_VP_MPU_NOSMPSACK_ST_WIDTH 0x1
1885#define OMAP54XX_VP_MPU_NOSMPSACK_ST_MASK (1 << 3)
1886
1887/* Used by PRM_IRQENABLE_MPU_2 */
1888#define OMAP54XX_VP_MPU_OPPCHANGEDONE_EN_SHIFT 0
1889#define OMAP54XX_VP_MPU_OPPCHANGEDONE_EN_WIDTH 0x1
1890#define OMAP54XX_VP_MPU_OPPCHANGEDONE_EN_MASK (1 << 0)
1891
1892/* Used by PRM_IRQSTATUS_MPU_2 */
1893#define OMAP54XX_VP_MPU_OPPCHANGEDONE_ST_SHIFT 0
1894#define OMAP54XX_VP_MPU_OPPCHANGEDONE_ST_WIDTH 0x1
1895#define OMAP54XX_VP_MPU_OPPCHANGEDONE_ST_MASK (1 << 0)
1896
1897/* Used by PRM_IRQENABLE_MPU_2 */
1898#define OMAP54XX_VP_MPU_TRANXDONE_EN_SHIFT 5
1899#define OMAP54XX_VP_MPU_TRANXDONE_EN_WIDTH 0x1
1900#define OMAP54XX_VP_MPU_TRANXDONE_EN_MASK (1 << 5)
1901
1902/* Used by PRM_IRQSTATUS_MPU_2 */
1903#define OMAP54XX_VP_MPU_TRANXDONE_ST_SHIFT 5
1904#define OMAP54XX_VP_MPU_TRANXDONE_ST_WIDTH 0x1
1905#define OMAP54XX_VP_MPU_TRANXDONE_ST_MASK (1 << 5)
1906
1907/* Used by PRM_SRAM_COUNT */
1908#define OMAP54XX_VSETUPCNT_VALUE_SHIFT 8
1909#define OMAP54XX_VSETUPCNT_VALUE_WIDTH 0x8
1910#define OMAP54XX_VSETUPCNT_VALUE_MASK (0xff << 8)
1911
1912/* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_MM_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */
1913#define OMAP54XX_VSTEPMAX_SHIFT 0
1914#define OMAP54XX_VSTEPMAX_WIDTH 0x8
1915#define OMAP54XX_VSTEPMAX_MASK (0xff << 0)
1916
1917/* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_MM_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */
1918#define OMAP54XX_VSTEPMIN_SHIFT 0
1919#define OMAP54XX_VSTEPMIN_WIDTH 0x8
1920#define OMAP54XX_VSTEPMIN_MASK (0xff << 0)
1921
1922/* Used by PM_DSS_DSS_WKDEP */
1923#define OMAP54XX_WKUPDEP_DISPC_DSP_SHIFT 2
1924#define OMAP54XX_WKUPDEP_DISPC_DSP_WIDTH 0x1
1925#define OMAP54XX_WKUPDEP_DISPC_DSP_MASK (1 << 2)
1926
1927/* Used by PM_DSS_DSS_WKDEP */
1928#define OMAP54XX_WKUPDEP_DISPC_IPU_SHIFT 1
1929#define OMAP54XX_WKUPDEP_DISPC_IPU_WIDTH 0x1
1930#define OMAP54XX_WKUPDEP_DISPC_IPU_MASK (1 << 1)
1931
1932/* Used by PM_DSS_DSS_WKDEP */
1933#define OMAP54XX_WKUPDEP_DISPC_MPU_SHIFT 0
1934#define OMAP54XX_WKUPDEP_DISPC_MPU_WIDTH 0x1
1935#define OMAP54XX_WKUPDEP_DISPC_MPU_MASK (1 << 0)
1936
1937/* Used by PM_DSS_DSS_WKDEP */
1938#define OMAP54XX_WKUPDEP_DISPC_SDMA_SHIFT 3
1939#define OMAP54XX_WKUPDEP_DISPC_SDMA_WIDTH 0x1
1940#define OMAP54XX_WKUPDEP_DISPC_SDMA_MASK (1 << 3)
1941
1942/* Used by PM_ABE_DMIC_WKDEP */
1943#define OMAP54XX_WKUPDEP_DMIC_DMA_DSP_SHIFT 6
1944#define OMAP54XX_WKUPDEP_DMIC_DMA_DSP_WIDTH 0x1
1945#define OMAP54XX_WKUPDEP_DMIC_DMA_DSP_MASK (1 << 6)
1946
1947/* Used by PM_ABE_DMIC_WKDEP */
1948#define OMAP54XX_WKUPDEP_DMIC_DMA_SDMA_SHIFT 7
1949#define OMAP54XX_WKUPDEP_DMIC_DMA_SDMA_WIDTH 0x1
1950#define OMAP54XX_WKUPDEP_DMIC_DMA_SDMA_MASK (1 << 7)
1951
1952/* Used by PM_ABE_DMIC_WKDEP */
1953#define OMAP54XX_WKUPDEP_DMIC_IRQ_DSP_SHIFT 2
1954#define OMAP54XX_WKUPDEP_DMIC_IRQ_DSP_WIDTH 0x1
1955#define OMAP54XX_WKUPDEP_DMIC_IRQ_DSP_MASK (1 << 2)
1956
1957/* Used by PM_ABE_DMIC_WKDEP */
1958#define OMAP54XX_WKUPDEP_DMIC_IRQ_MPU_SHIFT 0
1959#define OMAP54XX_WKUPDEP_DMIC_IRQ_MPU_WIDTH 0x1
1960#define OMAP54XX_WKUPDEP_DMIC_IRQ_MPU_MASK (1 << 0)
1961
1962/* Used by PM_DSS_DSS_WKDEP */
1963#define OMAP54XX_WKUPDEP_DSI1_A_DSP_SHIFT 6
1964#define OMAP54XX_WKUPDEP_DSI1_A_DSP_WIDTH 0x1
1965#define OMAP54XX_WKUPDEP_DSI1_A_DSP_MASK (1 << 6)
1966
1967/* Used by PM_DSS_DSS_WKDEP */
1968#define OMAP54XX_WKUPDEP_DSI1_A_IPU_SHIFT 5
1969#define OMAP54XX_WKUPDEP_DSI1_A_IPU_WIDTH 0x1
1970#define OMAP54XX_WKUPDEP_DSI1_A_IPU_MASK (1 << 5)
1971
1972/* Used by PM_DSS_DSS_WKDEP */
1973#define OMAP54XX_WKUPDEP_DSI1_A_MPU_SHIFT 4
1974#define OMAP54XX_WKUPDEP_DSI1_A_MPU_WIDTH 0x1
1975#define OMAP54XX_WKUPDEP_DSI1_A_MPU_MASK (1 << 4)
1976
1977/* Used by PM_DSS_DSS_WKDEP */
1978#define OMAP54XX_WKUPDEP_DSI1_A_SDMA_SHIFT 7
1979#define OMAP54XX_WKUPDEP_DSI1_A_SDMA_WIDTH 0x1
1980#define OMAP54XX_WKUPDEP_DSI1_A_SDMA_MASK (1 << 7)
1981
1982/* Used by PM_DSS_DSS_WKDEP */
1983#define OMAP54XX_WKUPDEP_DSI1_B_DSP_SHIFT 10
1984#define OMAP54XX_WKUPDEP_DSI1_B_DSP_WIDTH 0x1
1985#define OMAP54XX_WKUPDEP_DSI1_B_DSP_MASK (1 << 10)
1986
1987/* Used by PM_DSS_DSS_WKDEP */
1988#define OMAP54XX_WKUPDEP_DSI1_B_IPU_SHIFT 9
1989#define OMAP54XX_WKUPDEP_DSI1_B_IPU_WIDTH 0x1
1990#define OMAP54XX_WKUPDEP_DSI1_B_IPU_MASK (1 << 9)
1991
1992/* Used by PM_DSS_DSS_WKDEP */
1993#define OMAP54XX_WKUPDEP_DSI1_B_MPU_SHIFT 8
1994#define OMAP54XX_WKUPDEP_DSI1_B_MPU_WIDTH 0x1
1995#define OMAP54XX_WKUPDEP_DSI1_B_MPU_MASK (1 << 8)
1996
1997/* Used by PM_DSS_DSS_WKDEP */
1998#define OMAP54XX_WKUPDEP_DSI1_B_SDMA_SHIFT 11
1999#define OMAP54XX_WKUPDEP_DSI1_B_SDMA_WIDTH 0x1
2000#define OMAP54XX_WKUPDEP_DSI1_B_SDMA_MASK (1 << 11)
2001
2002/* Used by PM_DSS_DSS_WKDEP */
2003#define OMAP54XX_WKUPDEP_DSI1_C_DSP_SHIFT 17
2004#define OMAP54XX_WKUPDEP_DSI1_C_DSP_WIDTH 0x1
2005#define OMAP54XX_WKUPDEP_DSI1_C_DSP_MASK (1 << 17)
2006
2007/* Used by PM_DSS_DSS_WKDEP */
2008#define OMAP54XX_WKUPDEP_DSI1_C_IPU_SHIFT 16
2009#define OMAP54XX_WKUPDEP_DSI1_C_IPU_WIDTH 0x1
2010#define OMAP54XX_WKUPDEP_DSI1_C_IPU_MASK (1 << 16)
2011
2012/* Used by PM_DSS_DSS_WKDEP */
2013#define OMAP54XX_WKUPDEP_DSI1_C_MPU_SHIFT 15
2014#define OMAP54XX_WKUPDEP_DSI1_C_MPU_WIDTH 0x1
2015#define OMAP54XX_WKUPDEP_DSI1_C_MPU_MASK (1 << 15)
2016
2017/* Used by PM_DSS_DSS_WKDEP */
2018#define OMAP54XX_WKUPDEP_DSI1_C_SDMA_SHIFT 18
2019#define OMAP54XX_WKUPDEP_DSI1_C_SDMA_WIDTH 0x1
2020#define OMAP54XX_WKUPDEP_DSI1_C_SDMA_MASK (1 << 18)
2021
2022/* Used by PM_WKUPAON_GPIO1_WKDEP */
2023#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_IPU_SHIFT 1
2024#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_IPU_WIDTH 0x1
2025#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_IPU_MASK (1 << 1)
2026
2027/* Used by PM_WKUPAON_GPIO1_WKDEP */
2028#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_MPU_SHIFT 0
2029#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_MPU_WIDTH 0x1
2030#define OMAP54XX_WKUPDEP_GPIO1_IRQ1_MPU_MASK (1 << 0)
2031
2032/* Used by PM_WKUPAON_GPIO1_WKDEP */
2033#define OMAP54XX_WKUPDEP_GPIO1_IRQ2_DSP_SHIFT 6
2034#define OMAP54XX_WKUPDEP_GPIO1_IRQ2_DSP_WIDTH 0x1
2035#define OMAP54XX_WKUPDEP_GPIO1_IRQ2_DSP_MASK (1 << 6)
2036
2037/* Used by PM_L4PER_GPIO2_WKDEP */
2038#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_IPU_SHIFT 1
2039#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_IPU_WIDTH 0x1
2040#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_IPU_MASK (1 << 1)
2041
2042/* Used by PM_L4PER_GPIO2_WKDEP */
2043#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_MPU_SHIFT 0
2044#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_MPU_WIDTH 0x1
2045#define OMAP54XX_WKUPDEP_GPIO2_IRQ1_MPU_MASK (1 << 0)
2046
2047/* Used by PM_L4PER_GPIO2_WKDEP */
2048#define OMAP54XX_WKUPDEP_GPIO2_IRQ2_DSP_SHIFT 6
2049#define OMAP54XX_WKUPDEP_GPIO2_IRQ2_DSP_WIDTH 0x1
2050#define OMAP54XX_WKUPDEP_GPIO2_IRQ2_DSP_MASK (1 << 6)
2051
2052/* Used by PM_L4PER_GPIO3_WKDEP */
2053#define OMAP54XX_WKUPDEP_GPIO3_IRQ1_MPU_SHIFT 0
2054#define OMAP54XX_WKUPDEP_GPIO3_IRQ1_MPU_WIDTH 0x1
2055#define OMAP54XX_WKUPDEP_GPIO3_IRQ1_MPU_MASK (1 << 0)
2056
2057/* Used by PM_L4PER_GPIO3_WKDEP */
2058#define OMAP54XX_WKUPDEP_GPIO3_IRQ2_DSP_SHIFT 6
2059#define OMAP54XX_WKUPDEP_GPIO3_IRQ2_DSP_WIDTH 0x1
2060#define OMAP54XX_WKUPDEP_GPIO3_IRQ2_DSP_MASK (1 << 6)
2061
2062/* Used by PM_L4PER_GPIO4_WKDEP */
2063#define OMAP54XX_WKUPDEP_GPIO4_IRQ1_MPU_SHIFT 0
2064#define OMAP54XX_WKUPDEP_GPIO4_IRQ1_MPU_WIDTH 0x1
2065#define OMAP54XX_WKUPDEP_GPIO4_IRQ1_MPU_MASK (1 << 0)
2066
2067/* Used by PM_L4PER_GPIO4_WKDEP */
2068#define OMAP54XX_WKUPDEP_GPIO4_IRQ2_DSP_SHIFT 6
2069#define OMAP54XX_WKUPDEP_GPIO4_IRQ2_DSP_WIDTH 0x1
2070#define OMAP54XX_WKUPDEP_GPIO4_IRQ2_DSP_MASK (1 << 6)
2071
2072/* Used by PM_L4PER_GPIO5_WKDEP */
2073#define OMAP54XX_WKUPDEP_GPIO5_IRQ1_MPU_SHIFT 0
2074#define OMAP54XX_WKUPDEP_GPIO5_IRQ1_MPU_WIDTH 0x1
2075#define OMAP54XX_WKUPDEP_GPIO5_IRQ1_MPU_MASK (1 << 0)
2076
2077/* Used by PM_L4PER_GPIO5_WKDEP */
2078#define OMAP54XX_WKUPDEP_GPIO5_IRQ2_DSP_SHIFT 6
2079#define OMAP54XX_WKUPDEP_GPIO5_IRQ2_DSP_WIDTH 0x1
2080#define OMAP54XX_WKUPDEP_GPIO5_IRQ2_DSP_MASK (1 << 6)
2081
2082/* Used by PM_L4PER_GPIO6_WKDEP */
2083#define OMAP54XX_WKUPDEP_GPIO6_IRQ1_MPU_SHIFT 0
2084#define OMAP54XX_WKUPDEP_GPIO6_IRQ1_MPU_WIDTH 0x1
2085#define OMAP54XX_WKUPDEP_GPIO6_IRQ1_MPU_MASK (1 << 0)
2086
2087/* Used by PM_L4PER_GPIO6_WKDEP */
2088#define OMAP54XX_WKUPDEP_GPIO6_IRQ2_DSP_SHIFT 6
2089#define OMAP54XX_WKUPDEP_GPIO6_IRQ2_DSP_WIDTH 0x1
2090#define OMAP54XX_WKUPDEP_GPIO6_IRQ2_DSP_MASK (1 << 6)
2091
2092/* Used by PM_L4PER_GPIO7_WKDEP */
2093#define OMAP54XX_WKUPDEP_GPIO7_IRQ1_MPU_SHIFT 0
2094#define OMAP54XX_WKUPDEP_GPIO7_IRQ1_MPU_WIDTH 0x1
2095#define OMAP54XX_WKUPDEP_GPIO7_IRQ1_MPU_MASK (1 << 0)
2096
2097/* Used by PM_L4PER_GPIO8_WKDEP */
2098#define OMAP54XX_WKUPDEP_GPIO8_IRQ1_MPU_SHIFT 0
2099#define OMAP54XX_WKUPDEP_GPIO8_IRQ1_MPU_WIDTH 0x1
2100#define OMAP54XX_WKUPDEP_GPIO8_IRQ1_MPU_MASK (1 << 0)
2101
2102/* Used by PM_DSS_DSS_WKDEP */
2103#define OMAP54XX_WKUPDEP_HDMIDMA_SDMA_SHIFT 19
2104#define OMAP54XX_WKUPDEP_HDMIDMA_SDMA_WIDTH 0x1
2105#define OMAP54XX_WKUPDEP_HDMIDMA_SDMA_MASK (1 << 19)
2106
2107/* Used by PM_DSS_DSS_WKDEP */
2108#define OMAP54XX_WKUPDEP_HDMIIRQ_DSP_SHIFT 14
2109#define OMAP54XX_WKUPDEP_HDMIIRQ_DSP_WIDTH 0x1
2110#define OMAP54XX_WKUPDEP_HDMIIRQ_DSP_MASK (1 << 14)
2111
2112/* Used by PM_DSS_DSS_WKDEP */
2113#define OMAP54XX_WKUPDEP_HDMIIRQ_IPU_SHIFT 13
2114#define OMAP54XX_WKUPDEP_HDMIIRQ_IPU_WIDTH 0x1
2115#define OMAP54XX_WKUPDEP_HDMIIRQ_IPU_MASK (1 << 13)
2116
2117/* Used by PM_DSS_DSS_WKDEP */
2118#define OMAP54XX_WKUPDEP_HDMIIRQ_MPU_SHIFT 12
2119#define OMAP54XX_WKUPDEP_HDMIIRQ_MPU_WIDTH 0x1
2120#define OMAP54XX_WKUPDEP_HDMIIRQ_MPU_MASK (1 << 12)
2121
2122/* Used by PM_L3INIT_HSI_WKDEP */
2123#define OMAP54XX_WKUPDEP_HSI_DSP_DSP_SHIFT 6
2124#define OMAP54XX_WKUPDEP_HSI_DSP_DSP_WIDTH 0x1
2125#define OMAP54XX_WKUPDEP_HSI_DSP_DSP_MASK (1 << 6)
2126
2127/* Used by PM_L3INIT_HSI_WKDEP */
2128#define OMAP54XX_WKUPDEP_HSI_MCU_IPU_SHIFT 1
2129#define OMAP54XX_WKUPDEP_HSI_MCU_IPU_WIDTH 0x1
2130#define OMAP54XX_WKUPDEP_HSI_MCU_IPU_MASK (1 << 1)
2131
2132/* Used by PM_L3INIT_HSI_WKDEP */
2133#define OMAP54XX_WKUPDEP_HSI_MCU_MPU_SHIFT 0
2134#define OMAP54XX_WKUPDEP_HSI_MCU_MPU_WIDTH 0x1
2135#define OMAP54XX_WKUPDEP_HSI_MCU_MPU_MASK (1 << 0)
2136
2137/* Used by PM_L4PER_I2C1_WKDEP */
2138#define OMAP54XX_WKUPDEP_I2C1_DMA_SDMA_SHIFT 7
2139#define OMAP54XX_WKUPDEP_I2C1_DMA_SDMA_WIDTH 0x1
2140#define OMAP54XX_WKUPDEP_I2C1_DMA_SDMA_MASK (1 << 7)
2141
2142/* Used by PM_L4PER_I2C1_WKDEP */
2143#define OMAP54XX_WKUPDEP_I2C1_IRQ_IPU_SHIFT 1
2144#define OMAP54XX_WKUPDEP_I2C1_IRQ_IPU_WIDTH 0x1
2145#define OMAP54XX_WKUPDEP_I2C1_IRQ_IPU_MASK (1 << 1)
2146
2147/* Used by PM_L4PER_I2C1_WKDEP */
2148#define OMAP54XX_WKUPDEP_I2C1_IRQ_MPU_SHIFT 0
2149#define OMAP54XX_WKUPDEP_I2C1_IRQ_MPU_WIDTH 0x1
2150#define OMAP54XX_WKUPDEP_I2C1_IRQ_MPU_MASK (1 << 0)
2151
2152/* Used by PM_L4PER_I2C2_WKDEP */
2153#define OMAP54XX_WKUPDEP_I2C2_DMA_SDMA_SHIFT 7
2154#define OMAP54XX_WKUPDEP_I2C2_DMA_SDMA_WIDTH 0x1
2155#define OMAP54XX_WKUPDEP_I2C2_DMA_SDMA_MASK (1 << 7)
2156
2157/* Used by PM_L4PER_I2C2_WKDEP */
2158#define OMAP54XX_WKUPDEP_I2C2_IRQ_IPU_SHIFT 1
2159#define OMAP54XX_WKUPDEP_I2C2_IRQ_IPU_WIDTH 0x1
2160#define OMAP54XX_WKUPDEP_I2C2_IRQ_IPU_MASK (1 << 1)
2161
2162/* Used by PM_L4PER_I2C2_WKDEP */
2163#define OMAP54XX_WKUPDEP_I2C2_IRQ_MPU_SHIFT 0
2164#define OMAP54XX_WKUPDEP_I2C2_IRQ_MPU_WIDTH 0x1
2165#define OMAP54XX_WKUPDEP_I2C2_IRQ_MPU_MASK (1 << 0)
2166
2167/* Used by PM_L4PER_I2C3_WKDEP */
2168#define OMAP54XX_WKUPDEP_I2C3_DMA_SDMA_SHIFT 7
2169#define OMAP54XX_WKUPDEP_I2C3_DMA_SDMA_WIDTH 0x1
2170#define OMAP54XX_WKUPDEP_I2C3_DMA_SDMA_MASK (1 << 7)
2171
2172/* Used by PM_L4PER_I2C3_WKDEP */
2173#define OMAP54XX_WKUPDEP_I2C3_IRQ_IPU_SHIFT 1
2174#define OMAP54XX_WKUPDEP_I2C3_IRQ_IPU_WIDTH 0x1
2175#define OMAP54XX_WKUPDEP_I2C3_IRQ_IPU_MASK (1 << 1)
2176
2177/* Used by PM_L4PER_I2C3_WKDEP */
2178#define OMAP54XX_WKUPDEP_I2C3_IRQ_MPU_SHIFT 0
2179#define OMAP54XX_WKUPDEP_I2C3_IRQ_MPU_WIDTH 0x1
2180#define OMAP54XX_WKUPDEP_I2C3_IRQ_MPU_MASK (1 << 0)
2181
2182/* Used by PM_L4PER_I2C4_WKDEP */
2183#define OMAP54XX_WKUPDEP_I2C4_DMA_SDMA_SHIFT 7
2184#define OMAP54XX_WKUPDEP_I2C4_DMA_SDMA_WIDTH 0x1
2185#define OMAP54XX_WKUPDEP_I2C4_DMA_SDMA_MASK (1 << 7)
2186
2187/* Used by PM_L4PER_I2C4_WKDEP */
2188#define OMAP54XX_WKUPDEP_I2C4_IRQ_IPU_SHIFT 1
2189#define OMAP54XX_WKUPDEP_I2C4_IRQ_IPU_WIDTH 0x1
2190#define OMAP54XX_WKUPDEP_I2C4_IRQ_IPU_MASK (1 << 1)
2191
2192/* Used by PM_L4PER_I2C4_WKDEP */
2193#define OMAP54XX_WKUPDEP_I2C4_IRQ_MPU_SHIFT 0
2194#define OMAP54XX_WKUPDEP_I2C4_IRQ_MPU_WIDTH 0x1
2195#define OMAP54XX_WKUPDEP_I2C4_IRQ_MPU_MASK (1 << 0)
2196
2197/* Used by PM_L4PER_I2C5_WKDEP */
2198#define OMAP54XX_WKUPDEP_I2C5_IRQ_MPU_SHIFT 0
2199#define OMAP54XX_WKUPDEP_I2C5_IRQ_MPU_WIDTH 0x1
2200#define OMAP54XX_WKUPDEP_I2C5_IRQ_MPU_MASK (1 << 0)
2201
2202/* Used by PM_WKUPAON_KBD_WKDEP */
2203#define OMAP54XX_WKUPDEP_KBD_MPU_SHIFT 0
2204#define OMAP54XX_WKUPDEP_KBD_MPU_WIDTH 0x1
2205#define OMAP54XX_WKUPDEP_KBD_MPU_MASK (1 << 0)
2206
2207/* Used by PM_ABE_MCASP_WKDEP */
2208#define OMAP54XX_WKUPDEP_MCASP_DMA_DSP_SHIFT 6
2209#define OMAP54XX_WKUPDEP_MCASP_DMA_DSP_WIDTH 0x1
2210#define OMAP54XX_WKUPDEP_MCASP_DMA_DSP_MASK (1 << 6)
2211
2212/* Used by PM_ABE_MCASP_WKDEP */
2213#define OMAP54XX_WKUPDEP_MCASP_DMA_SDMA_SHIFT 7
2214#define OMAP54XX_WKUPDEP_MCASP_DMA_SDMA_WIDTH 0x1
2215#define OMAP54XX_WKUPDEP_MCASP_DMA_SDMA_MASK (1 << 7)
2216
2217/* Used by PM_ABE_MCASP_WKDEP */
2218#define OMAP54XX_WKUPDEP_MCASP_IRQ_DSP_SHIFT 2
2219#define OMAP54XX_WKUPDEP_MCASP_IRQ_DSP_WIDTH 0x1
2220#define OMAP54XX_WKUPDEP_MCASP_IRQ_DSP_MASK (1 << 2)
2221
2222/* Used by PM_ABE_MCASP_WKDEP */
2223#define OMAP54XX_WKUPDEP_MCASP_IRQ_MPU_SHIFT 0
2224#define OMAP54XX_WKUPDEP_MCASP_IRQ_MPU_WIDTH 0x1
2225#define OMAP54XX_WKUPDEP_MCASP_IRQ_MPU_MASK (1 << 0)
2226
2227/* Used by PM_ABE_MCBSP1_WKDEP */
2228#define OMAP54XX_WKUPDEP_MCBSP1_DSP_SHIFT 2
2229#define OMAP54XX_WKUPDEP_MCBSP1_DSP_WIDTH 0x1
2230#define OMAP54XX_WKUPDEP_MCBSP1_DSP_MASK (1 << 2)
2231
2232/* Used by PM_ABE_MCBSP1_WKDEP */
2233#define OMAP54XX_WKUPDEP_MCBSP1_MPU_SHIFT 0
2234#define OMAP54XX_WKUPDEP_MCBSP1_MPU_WIDTH 0x1
2235#define OMAP54XX_WKUPDEP_MCBSP1_MPU_MASK (1 << 0)
2236
2237/* Used by PM_ABE_MCBSP1_WKDEP */
2238#define OMAP54XX_WKUPDEP_MCBSP1_SDMA_SHIFT 3
2239#define OMAP54XX_WKUPDEP_MCBSP1_SDMA_WIDTH 0x1
2240#define OMAP54XX_WKUPDEP_MCBSP1_SDMA_MASK (1 << 3)
2241
2242/* Used by PM_ABE_MCBSP2_WKDEP */
2243#define OMAP54XX_WKUPDEP_MCBSP2_DSP_SHIFT 2
2244#define OMAP54XX_WKUPDEP_MCBSP2_DSP_WIDTH 0x1
2245#define OMAP54XX_WKUPDEP_MCBSP2_DSP_MASK (1 << 2)
2246
2247/* Used by PM_ABE_MCBSP2_WKDEP */
2248#define OMAP54XX_WKUPDEP_MCBSP2_MPU_SHIFT 0
2249#define OMAP54XX_WKUPDEP_MCBSP2_MPU_WIDTH 0x1
2250#define OMAP54XX_WKUPDEP_MCBSP2_MPU_MASK (1 << 0)
2251
2252/* Used by PM_ABE_MCBSP2_WKDEP */
2253#define OMAP54XX_WKUPDEP_MCBSP2_SDMA_SHIFT 3
2254#define OMAP54XX_WKUPDEP_MCBSP2_SDMA_WIDTH 0x1
2255#define OMAP54XX_WKUPDEP_MCBSP2_SDMA_MASK (1 << 3)
2256
2257/* Used by PM_ABE_MCBSP3_WKDEP */
2258#define OMAP54XX_WKUPDEP_MCBSP3_DSP_SHIFT 2
2259#define OMAP54XX_WKUPDEP_MCBSP3_DSP_WIDTH 0x1
2260#define OMAP54XX_WKUPDEP_MCBSP3_DSP_MASK (1 << 2)
2261
2262/* Used by PM_ABE_MCBSP3_WKDEP */
2263#define OMAP54XX_WKUPDEP_MCBSP3_MPU_SHIFT 0
2264#define OMAP54XX_WKUPDEP_MCBSP3_MPU_WIDTH 0x1
2265#define OMAP54XX_WKUPDEP_MCBSP3_MPU_MASK (1 << 0)
2266
2267/* Used by PM_ABE_MCBSP3_WKDEP */
2268#define OMAP54XX_WKUPDEP_MCBSP3_SDMA_SHIFT 3
2269#define OMAP54XX_WKUPDEP_MCBSP3_SDMA_WIDTH 0x1
2270#define OMAP54XX_WKUPDEP_MCBSP3_SDMA_MASK (1 << 3)
2271
2272/* Used by PM_ABE_MCPDM_WKDEP */
2273#define OMAP54XX_WKUPDEP_MCPDM_DMA_DSP_SHIFT 6
2274#define OMAP54XX_WKUPDEP_MCPDM_DMA_DSP_WIDTH 0x1
2275#define OMAP54XX_WKUPDEP_MCPDM_DMA_DSP_MASK (1 << 6)
2276
2277/* Used by PM_ABE_MCPDM_WKDEP */
2278#define OMAP54XX_WKUPDEP_MCPDM_DMA_SDMA_SHIFT 7
2279#define OMAP54XX_WKUPDEP_MCPDM_DMA_SDMA_WIDTH 0x1
2280#define OMAP54XX_WKUPDEP_MCPDM_DMA_SDMA_MASK (1 << 7)
2281
2282/* Used by PM_ABE_MCPDM_WKDEP */
2283#define OMAP54XX_WKUPDEP_MCPDM_IRQ_DSP_SHIFT 2
2284#define OMAP54XX_WKUPDEP_MCPDM_IRQ_DSP_WIDTH 0x1
2285#define OMAP54XX_WKUPDEP_MCPDM_IRQ_DSP_MASK (1 << 2)
2286
2287/* Used by PM_ABE_MCPDM_WKDEP */
2288#define OMAP54XX_WKUPDEP_MCPDM_IRQ_MPU_SHIFT 0
2289#define OMAP54XX_WKUPDEP_MCPDM_IRQ_MPU_WIDTH 0x1
2290#define OMAP54XX_WKUPDEP_MCPDM_IRQ_MPU_MASK (1 << 0)
2291
2292/* Used by PM_L4PER_MCSPI1_WKDEP */
2293#define OMAP54XX_WKUPDEP_MCSPI1_DSP_SHIFT 2
2294#define OMAP54XX_WKUPDEP_MCSPI1_DSP_WIDTH 0x1
2295#define OMAP54XX_WKUPDEP_MCSPI1_DSP_MASK (1 << 2)
2296
2297/* Used by PM_L4PER_MCSPI1_WKDEP */
2298#define OMAP54XX_WKUPDEP_MCSPI1_IPU_SHIFT 1
2299#define OMAP54XX_WKUPDEP_MCSPI1_IPU_WIDTH 0x1
2300#define OMAP54XX_WKUPDEP_MCSPI1_IPU_MASK (1 << 1)
2301
2302/* Used by PM_L4PER_MCSPI1_WKDEP */
2303#define OMAP54XX_WKUPDEP_MCSPI1_MPU_SHIFT 0
2304#define OMAP54XX_WKUPDEP_MCSPI1_MPU_WIDTH 0x1
2305#define OMAP54XX_WKUPDEP_MCSPI1_MPU_MASK (1 << 0)
2306
2307/* Used by PM_L4PER_MCSPI1_WKDEP */
2308#define OMAP54XX_WKUPDEP_MCSPI1_SDMA_SHIFT 3
2309#define OMAP54XX_WKUPDEP_MCSPI1_SDMA_WIDTH 0x1
2310#define OMAP54XX_WKUPDEP_MCSPI1_SDMA_MASK (1 << 3)
2311
2312/* Used by PM_L4PER_MCSPI2_WKDEP */
2313#define OMAP54XX_WKUPDEP_MCSPI2_IPU_SHIFT 1
2314#define OMAP54XX_WKUPDEP_MCSPI2_IPU_WIDTH 0x1
2315#define OMAP54XX_WKUPDEP_MCSPI2_IPU_MASK (1 << 1)
2316
2317/* Used by PM_L4PER_MCSPI2_WKDEP */
2318#define OMAP54XX_WKUPDEP_MCSPI2_MPU_SHIFT 0
2319#define OMAP54XX_WKUPDEP_MCSPI2_MPU_WIDTH 0x1
2320#define OMAP54XX_WKUPDEP_MCSPI2_MPU_MASK (1 << 0)
2321
2322/* Used by PM_L4PER_MCSPI2_WKDEP */
2323#define OMAP54XX_WKUPDEP_MCSPI2_SDMA_SHIFT 3
2324#define OMAP54XX_WKUPDEP_MCSPI2_SDMA_WIDTH 0x1
2325#define OMAP54XX_WKUPDEP_MCSPI2_SDMA_MASK (1 << 3)
2326
2327/* Used by PM_L4PER_MCSPI3_WKDEP */
2328#define OMAP54XX_WKUPDEP_MCSPI3_MPU_SHIFT 0
2329#define OMAP54XX_WKUPDEP_MCSPI3_MPU_WIDTH 0x1
2330#define OMAP54XX_WKUPDEP_MCSPI3_MPU_MASK (1 << 0)
2331
2332/* Used by PM_L4PER_MCSPI3_WKDEP */
2333#define OMAP54XX_WKUPDEP_MCSPI3_SDMA_SHIFT 3
2334#define OMAP54XX_WKUPDEP_MCSPI3_SDMA_WIDTH 0x1
2335#define OMAP54XX_WKUPDEP_MCSPI3_SDMA_MASK (1 << 3)
2336
2337/* Used by PM_L4PER_MCSPI4_WKDEP */
2338#define OMAP54XX_WKUPDEP_MCSPI4_MPU_SHIFT 0
2339#define OMAP54XX_WKUPDEP_MCSPI4_MPU_WIDTH 0x1
2340#define OMAP54XX_WKUPDEP_MCSPI4_MPU_MASK (1 << 0)
2341
2342/* Used by PM_L4PER_MCSPI4_WKDEP */
2343#define OMAP54XX_WKUPDEP_MCSPI4_SDMA_SHIFT 3
2344#define OMAP54XX_WKUPDEP_MCSPI4_SDMA_WIDTH 0x1
2345#define OMAP54XX_WKUPDEP_MCSPI4_SDMA_MASK (1 << 3)
2346
2347/* Used by PM_L3INIT_MMC1_WKDEP */
2348#define OMAP54XX_WKUPDEP_MMC1_DSP_SHIFT 2
2349#define OMAP54XX_WKUPDEP_MMC1_DSP_WIDTH 0x1
2350#define OMAP54XX_WKUPDEP_MMC1_DSP_MASK (1 << 2)
2351
2352/* Used by PM_L3INIT_MMC1_WKDEP */
2353#define OMAP54XX_WKUPDEP_MMC1_IPU_SHIFT 1
2354#define OMAP54XX_WKUPDEP_MMC1_IPU_WIDTH 0x1
2355#define OMAP54XX_WKUPDEP_MMC1_IPU_MASK (1 << 1)
2356
2357/* Used by PM_L3INIT_MMC1_WKDEP */
2358#define OMAP54XX_WKUPDEP_MMC1_MPU_SHIFT 0
2359#define OMAP54XX_WKUPDEP_MMC1_MPU_WIDTH 0x1
2360#define OMAP54XX_WKUPDEP_MMC1_MPU_MASK (1 << 0)
2361
2362/* Used by PM_L3INIT_MMC1_WKDEP */
2363#define OMAP54XX_WKUPDEP_MMC1_SDMA_SHIFT 3
2364#define OMAP54XX_WKUPDEP_MMC1_SDMA_WIDTH 0x1
2365#define OMAP54XX_WKUPDEP_MMC1_SDMA_MASK (1 << 3)
2366
2367/* Used by PM_L3INIT_MMC2_WKDEP */
2368#define OMAP54XX_WKUPDEP_MMC2_DSP_SHIFT 2
2369#define OMAP54XX_WKUPDEP_MMC2_DSP_WIDTH 0x1
2370#define OMAP54XX_WKUPDEP_MMC2_DSP_MASK (1 << 2)
2371
2372/* Used by PM_L3INIT_MMC2_WKDEP */
2373#define OMAP54XX_WKUPDEP_MMC2_IPU_SHIFT 1
2374#define OMAP54XX_WKUPDEP_MMC2_IPU_WIDTH 0x1
2375#define OMAP54XX_WKUPDEP_MMC2_IPU_MASK (1 << 1)
2376
2377/* Used by PM_L3INIT_MMC2_WKDEP */
2378#define OMAP54XX_WKUPDEP_MMC2_MPU_SHIFT 0
2379#define OMAP54XX_WKUPDEP_MMC2_MPU_WIDTH 0x1
2380#define OMAP54XX_WKUPDEP_MMC2_MPU_MASK (1 << 0)
2381
2382/* Used by PM_L3INIT_MMC2_WKDEP */
2383#define OMAP54XX_WKUPDEP_MMC2_SDMA_SHIFT 3
2384#define OMAP54XX_WKUPDEP_MMC2_SDMA_WIDTH 0x1
2385#define OMAP54XX_WKUPDEP_MMC2_SDMA_MASK (1 << 3)
2386
2387/* Used by PM_L4PER_MMC3_WKDEP */
2388#define OMAP54XX_WKUPDEP_MMC3_IPU_SHIFT 1
2389#define OMAP54XX_WKUPDEP_MMC3_IPU_WIDTH 0x1
2390#define OMAP54XX_WKUPDEP_MMC3_IPU_MASK (1 << 1)
2391
2392/* Used by PM_L4PER_MMC3_WKDEP */
2393#define OMAP54XX_WKUPDEP_MMC3_MPU_SHIFT 0
2394#define OMAP54XX_WKUPDEP_MMC3_MPU_WIDTH 0x1
2395#define OMAP54XX_WKUPDEP_MMC3_MPU_MASK (1 << 0)
2396
2397/* Used by PM_L4PER_MMC3_WKDEP */
2398#define OMAP54XX_WKUPDEP_MMC3_SDMA_SHIFT 3
2399#define OMAP54XX_WKUPDEP_MMC3_SDMA_WIDTH 0x1
2400#define OMAP54XX_WKUPDEP_MMC3_SDMA_MASK (1 << 3)
2401
2402/* Used by PM_L4PER_MMC4_WKDEP */
2403#define OMAP54XX_WKUPDEP_MMC4_MPU_SHIFT 0
2404#define OMAP54XX_WKUPDEP_MMC4_MPU_WIDTH 0x1
2405#define OMAP54XX_WKUPDEP_MMC4_MPU_MASK (1 << 0)
2406
2407/* Used by PM_L4PER_MMC4_WKDEP */
2408#define OMAP54XX_WKUPDEP_MMC4_SDMA_SHIFT 3
2409#define OMAP54XX_WKUPDEP_MMC4_SDMA_WIDTH 0x1
2410#define OMAP54XX_WKUPDEP_MMC4_SDMA_MASK (1 << 3)
2411
2412/* Used by PM_L4PER_MMC5_WKDEP */
2413#define OMAP54XX_WKUPDEP_MMC5_MPU_SHIFT 0
2414#define OMAP54XX_WKUPDEP_MMC5_MPU_WIDTH 0x1
2415#define OMAP54XX_WKUPDEP_MMC5_MPU_MASK (1 << 0)
2416
2417/* Used by PM_L4PER_MMC5_WKDEP */
2418#define OMAP54XX_WKUPDEP_MMC5_SDMA_SHIFT 3
2419#define OMAP54XX_WKUPDEP_MMC5_SDMA_WIDTH 0x1
2420#define OMAP54XX_WKUPDEP_MMC5_SDMA_MASK (1 << 3)
2421
2422/* Used by PM_L3INIT_SATA_WKDEP */
2423#define OMAP54XX_WKUPDEP_SATA_MPU_SHIFT 0
2424#define OMAP54XX_WKUPDEP_SATA_MPU_WIDTH 0x1
2425#define OMAP54XX_WKUPDEP_SATA_MPU_MASK (1 << 0)
2426
2427/* Used by PM_ABE_SLIMBUS1_WKDEP */
2428#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_DSP_SHIFT 6
2429#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_DSP_WIDTH 0x1
2430#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_DSP_MASK (1 << 6)
2431
2432/* Used by PM_ABE_SLIMBUS1_WKDEP */
2433#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_SDMA_SHIFT 7
2434#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_SDMA_WIDTH 0x1
2435#define OMAP54XX_WKUPDEP_SLIMBUS1_DMA_SDMA_MASK (1 << 7)
2436
2437/* Used by PM_ABE_SLIMBUS1_WKDEP */
2438#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_DSP_SHIFT 2
2439#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_DSP_WIDTH 0x1
2440#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_DSP_MASK (1 << 2)
2441
2442/* Used by PM_ABE_SLIMBUS1_WKDEP */
2443#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_MPU_SHIFT 0
2444#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_MPU_WIDTH 0x1
2445#define OMAP54XX_WKUPDEP_SLIMBUS1_IRQ_MPU_MASK (1 << 0)
2446
2447/* Used by PM_COREAON_SMARTREFLEX_CORE_WKDEP */
2448#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_IPU_SHIFT 1
2449#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_IPU_WIDTH 0x1
2450#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_IPU_MASK (1 << 1)
2451
2452/* Used by PM_COREAON_SMARTREFLEX_CORE_WKDEP */
2453#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_MPU_SHIFT 0
2454#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_MPU_WIDTH 0x1
2455#define OMAP54XX_WKUPDEP_SMARTREFLEX_CORE_MPU_MASK (1 << 0)
2456
2457/* Used by PM_COREAON_SMARTREFLEX_MM_WKDEP */
2458#define OMAP54XX_WKUPDEP_SMARTREFLEX_MM_MPU_SHIFT 0
2459#define OMAP54XX_WKUPDEP_SMARTREFLEX_MM_MPU_WIDTH 0x1
2460#define OMAP54XX_WKUPDEP_SMARTREFLEX_MM_MPU_MASK (1 << 0)
2461
2462/* Used by PM_COREAON_SMARTREFLEX_MPU_WKDEP */
2463#define OMAP54XX_WKUPDEP_SMARTREFLEX_MPU_MPU_SHIFT 0
2464#define OMAP54XX_WKUPDEP_SMARTREFLEX_MPU_MPU_WIDTH 0x1
2465#define OMAP54XX_WKUPDEP_SMARTREFLEX_MPU_MPU_MASK (1 << 0)
2466
2467/* Used by PM_L4PER_TIMER10_WKDEP */
2468#define OMAP54XX_WKUPDEP_TIMER10_MPU_SHIFT 0
2469#define OMAP54XX_WKUPDEP_TIMER10_MPU_WIDTH 0x1
2470#define OMAP54XX_WKUPDEP_TIMER10_MPU_MASK (1 << 0)
2471
2472/* Used by PM_L4PER_TIMER11_WKDEP */
2473#define OMAP54XX_WKUPDEP_TIMER11_IPU_SHIFT 1
2474#define OMAP54XX_WKUPDEP_TIMER11_IPU_WIDTH 0x1
2475#define OMAP54XX_WKUPDEP_TIMER11_IPU_MASK (1 << 1)
2476
2477/* Used by PM_L4PER_TIMER11_WKDEP */
2478#define OMAP54XX_WKUPDEP_TIMER11_MPU_SHIFT 0
2479#define OMAP54XX_WKUPDEP_TIMER11_MPU_WIDTH 0x1
2480#define OMAP54XX_WKUPDEP_TIMER11_MPU_MASK (1 << 0)
2481
2482/* Used by PM_WKUPAON_TIMER12_WKDEP */
2483#define OMAP54XX_WKUPDEP_TIMER12_MPU_SHIFT 0
2484#define OMAP54XX_WKUPDEP_TIMER12_MPU_WIDTH 0x1
2485#define OMAP54XX_WKUPDEP_TIMER12_MPU_MASK (1 << 0)
2486
2487/* Used by PM_WKUPAON_TIMER1_WKDEP */
2488#define OMAP54XX_WKUPDEP_TIMER1_MPU_SHIFT 0
2489#define OMAP54XX_WKUPDEP_TIMER1_MPU_WIDTH 0x1
2490#define OMAP54XX_WKUPDEP_TIMER1_MPU_MASK (1 << 0)
2491
2492/* Used by PM_L4PER_TIMER2_WKDEP */
2493#define OMAP54XX_WKUPDEP_TIMER2_MPU_SHIFT 0
2494#define OMAP54XX_WKUPDEP_TIMER2_MPU_WIDTH 0x1
2495#define OMAP54XX_WKUPDEP_TIMER2_MPU_MASK (1 << 0)
2496
2497/* Used by PM_L4PER_TIMER3_WKDEP */
2498#define OMAP54XX_WKUPDEP_TIMER3_IPU_SHIFT 1
2499#define OMAP54XX_WKUPDEP_TIMER3_IPU_WIDTH 0x1
2500#define OMAP54XX_WKUPDEP_TIMER3_IPU_MASK (1 << 1)
2501
2502/* Used by PM_L4PER_TIMER3_WKDEP */
2503#define OMAP54XX_WKUPDEP_TIMER3_MPU_SHIFT 0
2504#define OMAP54XX_WKUPDEP_TIMER3_MPU_WIDTH 0x1
2505#define OMAP54XX_WKUPDEP_TIMER3_MPU_MASK (1 << 0)
2506
2507/* Used by PM_L4PER_TIMER4_WKDEP */
2508#define OMAP54XX_WKUPDEP_TIMER4_IPU_SHIFT 1
2509#define OMAP54XX_WKUPDEP_TIMER4_IPU_WIDTH 0x1
2510#define OMAP54XX_WKUPDEP_TIMER4_IPU_MASK (1 << 1)
2511
2512/* Used by PM_L4PER_TIMER4_WKDEP */
2513#define OMAP54XX_WKUPDEP_TIMER4_MPU_SHIFT 0
2514#define OMAP54XX_WKUPDEP_TIMER4_MPU_WIDTH 0x1
2515#define OMAP54XX_WKUPDEP_TIMER4_MPU_MASK (1 << 0)
2516
2517/* Used by PM_ABE_TIMER5_WKDEP */
2518#define OMAP54XX_WKUPDEP_TIMER5_DSP_SHIFT 2
2519#define OMAP54XX_WKUPDEP_TIMER5_DSP_WIDTH 0x1
2520#define OMAP54XX_WKUPDEP_TIMER5_DSP_MASK (1 << 2)
2521
2522/* Used by PM_ABE_TIMER5_WKDEP */
2523#define OMAP54XX_WKUPDEP_TIMER5_MPU_SHIFT 0
2524#define OMAP54XX_WKUPDEP_TIMER5_MPU_WIDTH 0x1
2525#define OMAP54XX_WKUPDEP_TIMER5_MPU_MASK (1 << 0)
2526
2527/* Used by PM_ABE_TIMER6_WKDEP */
2528#define OMAP54XX_WKUPDEP_TIMER6_DSP_SHIFT 2
2529#define OMAP54XX_WKUPDEP_TIMER6_DSP_WIDTH 0x1
2530#define OMAP54XX_WKUPDEP_TIMER6_DSP_MASK (1 << 2)
2531
2532/* Used by PM_ABE_TIMER6_WKDEP */
2533#define OMAP54XX_WKUPDEP_TIMER6_MPU_SHIFT 0
2534#define OMAP54XX_WKUPDEP_TIMER6_MPU_WIDTH 0x1
2535#define OMAP54XX_WKUPDEP_TIMER6_MPU_MASK (1 << 0)
2536
2537/* Used by PM_ABE_TIMER7_WKDEP */
2538#define OMAP54XX_WKUPDEP_TIMER7_DSP_SHIFT 2
2539#define OMAP54XX_WKUPDEP_TIMER7_DSP_WIDTH 0x1
2540#define OMAP54XX_WKUPDEP_TIMER7_DSP_MASK (1 << 2)
2541
2542/* Used by PM_ABE_TIMER7_WKDEP */
2543#define OMAP54XX_WKUPDEP_TIMER7_MPU_SHIFT 0
2544#define OMAP54XX_WKUPDEP_TIMER7_MPU_WIDTH 0x1
2545#define OMAP54XX_WKUPDEP_TIMER7_MPU_MASK (1 << 0)
2546
2547/* Used by PM_ABE_TIMER8_WKDEP */
2548#define OMAP54XX_WKUPDEP_TIMER8_DSP_SHIFT 2
2549#define OMAP54XX_WKUPDEP_TIMER8_DSP_WIDTH 0x1
2550#define OMAP54XX_WKUPDEP_TIMER8_DSP_MASK (1 << 2)
2551
2552/* Used by PM_ABE_TIMER8_WKDEP */
2553#define OMAP54XX_WKUPDEP_TIMER8_MPU_SHIFT 0
2554#define OMAP54XX_WKUPDEP_TIMER8_MPU_WIDTH 0x1
2555#define OMAP54XX_WKUPDEP_TIMER8_MPU_MASK (1 << 0)
2556
2557/* Used by PM_L4PER_TIMER9_WKDEP */
2558#define OMAP54XX_WKUPDEP_TIMER9_IPU_SHIFT 1
2559#define OMAP54XX_WKUPDEP_TIMER9_IPU_WIDTH 0x1
2560#define OMAP54XX_WKUPDEP_TIMER9_IPU_MASK (1 << 1)
2561
2562/* Used by PM_L4PER_TIMER9_WKDEP */
2563#define OMAP54XX_WKUPDEP_TIMER9_MPU_SHIFT 0
2564#define OMAP54XX_WKUPDEP_TIMER9_MPU_WIDTH 0x1
2565#define OMAP54XX_WKUPDEP_TIMER9_MPU_MASK (1 << 0)
2566
2567/* Used by PM_L4PER_UART1_WKDEP */
2568#define OMAP54XX_WKUPDEP_UART1_MPU_SHIFT 0
2569#define OMAP54XX_WKUPDEP_UART1_MPU_WIDTH 0x1
2570#define OMAP54XX_WKUPDEP_UART1_MPU_MASK (1 << 0)
2571
2572/* Used by PM_L4PER_UART1_WKDEP */
2573#define OMAP54XX_WKUPDEP_UART1_SDMA_SHIFT 3
2574#define OMAP54XX_WKUPDEP_UART1_SDMA_WIDTH 0x1
2575#define OMAP54XX_WKUPDEP_UART1_SDMA_MASK (1 << 3)
2576
2577/* Used by PM_L4PER_UART2_WKDEP */
2578#define OMAP54XX_WKUPDEP_UART2_MPU_SHIFT 0
2579#define OMAP54XX_WKUPDEP_UART2_MPU_WIDTH 0x1
2580#define OMAP54XX_WKUPDEP_UART2_MPU_MASK (1 << 0)
2581
2582/* Used by PM_L4PER_UART2_WKDEP */
2583#define OMAP54XX_WKUPDEP_UART2_SDMA_SHIFT 3
2584#define OMAP54XX_WKUPDEP_UART2_SDMA_WIDTH 0x1
2585#define OMAP54XX_WKUPDEP_UART2_SDMA_MASK (1 << 3)
2586
2587/* Used by PM_L4PER_UART3_WKDEP */
2588#define OMAP54XX_WKUPDEP_UART3_DSP_SHIFT 2
2589#define OMAP54XX_WKUPDEP_UART3_DSP_WIDTH 0x1
2590#define OMAP54XX_WKUPDEP_UART3_DSP_MASK (1 << 2)
2591
2592/* Used by PM_L4PER_UART3_WKDEP */
2593#define OMAP54XX_WKUPDEP_UART3_IPU_SHIFT 1
2594#define OMAP54XX_WKUPDEP_UART3_IPU_WIDTH 0x1
2595#define OMAP54XX_WKUPDEP_UART3_IPU_MASK (1 << 1)
2596
2597/* Used by PM_L4PER_UART3_WKDEP */
2598#define OMAP54XX_WKUPDEP_UART3_MPU_SHIFT 0
2599#define OMAP54XX_WKUPDEP_UART3_MPU_WIDTH 0x1
2600#define OMAP54XX_WKUPDEP_UART3_MPU_MASK (1 << 0)
2601
2602/* Used by PM_L4PER_UART3_WKDEP */
2603#define OMAP54XX_WKUPDEP_UART3_SDMA_SHIFT 3
2604#define OMAP54XX_WKUPDEP_UART3_SDMA_WIDTH 0x1
2605#define OMAP54XX_WKUPDEP_UART3_SDMA_MASK (1 << 3)
2606
2607/* Used by PM_L4PER_UART4_WKDEP */
2608#define OMAP54XX_WKUPDEP_UART4_MPU_SHIFT 0
2609#define OMAP54XX_WKUPDEP_UART4_MPU_WIDTH 0x1
2610#define OMAP54XX_WKUPDEP_UART4_MPU_MASK (1 << 0)
2611
2612/* Used by PM_L4PER_UART4_WKDEP */
2613#define OMAP54XX_WKUPDEP_UART4_SDMA_SHIFT 3
2614#define OMAP54XX_WKUPDEP_UART4_SDMA_WIDTH 0x1
2615#define OMAP54XX_WKUPDEP_UART4_SDMA_MASK (1 << 3)
2616
2617/* Used by PM_L4PER_UART5_WKDEP */
2618#define OMAP54XX_WKUPDEP_UART5_MPU_SHIFT 0
2619#define OMAP54XX_WKUPDEP_UART5_MPU_WIDTH 0x1
2620#define OMAP54XX_WKUPDEP_UART5_MPU_MASK (1 << 0)
2621
2622/* Used by PM_L4PER_UART5_WKDEP */
2623#define OMAP54XX_WKUPDEP_UART5_SDMA_SHIFT 3
2624#define OMAP54XX_WKUPDEP_UART5_SDMA_WIDTH 0x1
2625#define OMAP54XX_WKUPDEP_UART5_SDMA_MASK (1 << 3)
2626
2627/* Used by PM_L4PER_UART6_WKDEP */
2628#define OMAP54XX_WKUPDEP_UART6_MPU_SHIFT 0
2629#define OMAP54XX_WKUPDEP_UART6_MPU_WIDTH 0x1
2630#define OMAP54XX_WKUPDEP_UART6_MPU_MASK (1 << 0)
2631
2632/* Used by PM_L4PER_UART6_WKDEP */
2633#define OMAP54XX_WKUPDEP_UART6_SDMA_SHIFT 3
2634#define OMAP54XX_WKUPDEP_UART6_SDMA_WIDTH 0x1
2635#define OMAP54XX_WKUPDEP_UART6_SDMA_MASK (1 << 3)
2636
2637/* Used by PM_L3INIT_UNIPRO2_WKDEP */
2638#define OMAP54XX_WKUPDEP_UNIPRO2_MPU_SHIFT 0
2639#define OMAP54XX_WKUPDEP_UNIPRO2_MPU_WIDTH 0x1
2640#define OMAP54XX_WKUPDEP_UNIPRO2_MPU_MASK (1 << 0)
2641
2642/* Used by PM_L3INIT_USB_HOST_HS_WKDEP */
2643#define OMAP54XX_WKUPDEP_USB_HOST_HS_IPU_SHIFT 1
2644#define OMAP54XX_WKUPDEP_USB_HOST_HS_IPU_WIDTH 0x1
2645#define OMAP54XX_WKUPDEP_USB_HOST_HS_IPU_MASK (1 << 1)
2646
2647/* Used by PM_L3INIT_USB_HOST_HS_WKDEP */
2648#define OMAP54XX_WKUPDEP_USB_HOST_HS_MPU_SHIFT 0
2649#define OMAP54XX_WKUPDEP_USB_HOST_HS_MPU_WIDTH 0x1
2650#define OMAP54XX_WKUPDEP_USB_HOST_HS_MPU_MASK (1 << 0)
2651
2652/* Used by PM_L3INIT_USB_OTG_SS_WKDEP */
2653#define OMAP54XX_WKUPDEP_USB_OTG_SS_IPU_SHIFT 1
2654#define OMAP54XX_WKUPDEP_USB_OTG_SS_IPU_WIDTH 0x1
2655#define OMAP54XX_WKUPDEP_USB_OTG_SS_IPU_MASK (1 << 1)
2656
2657/* Used by PM_L3INIT_USB_OTG_SS_WKDEP */
2658#define OMAP54XX_WKUPDEP_USB_OTG_SS_MPU_SHIFT 0
2659#define OMAP54XX_WKUPDEP_USB_OTG_SS_MPU_WIDTH 0x1
2660#define OMAP54XX_WKUPDEP_USB_OTG_SS_MPU_MASK (1 << 0)
2661
2662/* Used by PM_L3INIT_USB_TLL_HS_WKDEP */
2663#define OMAP54XX_WKUPDEP_USB_TLL_HS_IPU_SHIFT 1
2664#define OMAP54XX_WKUPDEP_USB_TLL_HS_IPU_WIDTH 0x1
2665#define OMAP54XX_WKUPDEP_USB_TLL_HS_IPU_MASK (1 << 1)
2666
2667/* Used by PM_L3INIT_USB_TLL_HS_WKDEP */
2668#define OMAP54XX_WKUPDEP_USB_TLL_HS_MPU_SHIFT 0
2669#define OMAP54XX_WKUPDEP_USB_TLL_HS_MPU_WIDTH 0x1
2670#define OMAP54XX_WKUPDEP_USB_TLL_HS_MPU_MASK (1 << 0)
2671
2672/* Used by PM_WKUPAON_WD_TIMER2_WKDEP */
2673#define OMAP54XX_WKUPDEP_WD_TIMER2_MPU_SHIFT 0
2674#define OMAP54XX_WKUPDEP_WD_TIMER2_MPU_WIDTH 0x1
2675#define OMAP54XX_WKUPDEP_WD_TIMER2_MPU_MASK (1 << 0)
2676
2677/* Used by PM_ABE_WD_TIMER3_WKDEP */
2678#define OMAP54XX_WKUPDEP_WD_TIMER3_MPU_SHIFT 0
2679#define OMAP54XX_WKUPDEP_WD_TIMER3_MPU_WIDTH 0x1
2680#define OMAP54XX_WKUPDEP_WD_TIMER3_MPU_MASK (1 << 0)
2681
2682/* Used by PRM_IO_PMCTRL */
2683#define OMAP54XX_WUCLK_CTRL_SHIFT 8
2684#define OMAP54XX_WUCLK_CTRL_WIDTH 0x1
2685#define OMAP54XX_WUCLK_CTRL_MASK (1 << 8)
2686
2687/* Used by PRM_IO_PMCTRL */
2688#define OMAP54XX_WUCLK_STATUS_SHIFT 9
2689#define OMAP54XX_WUCLK_STATUS_WIDTH 0x1
2690#define OMAP54XX_WUCLK_STATUS_MASK (1 << 9)
2691
2692/* Used by REVISION_PRM */
2693#define OMAP54XX_X_MAJOR_SHIFT 8
2694#define OMAP54XX_X_MAJOR_WIDTH 0x3
2695#define OMAP54XX_X_MAJOR_MASK (0x7 << 8)
2696
2697/* Used by REVISION_PRM */
2698#define OMAP54XX_Y_MINOR_SHIFT 0
2699#define OMAP54XX_Y_MINOR_WIDTH 0x6
2700#define OMAP54XX_Y_MINOR_MASK (0x3f << 0)
2701#endif
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 9265e031fa2f..801287ee4d98 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -600,7 +600,7 @@ static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon",
600#endif 600#endif
601 601
602#ifdef CONFIG_ARCH_OMAP4 602#ifdef CONFIG_ARCH_OMAP4
603#ifdef CONFIG_LOCAL_TIMERS 603#ifdef CONFIG_HAVE_ARM_TWD
604static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); 604static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29);
605void __init omap4_local_timer_init(void) 605void __init omap4_local_timer_init(void)
606{ 606{
@@ -619,12 +619,12 @@ void __init omap4_local_timer_init(void)
619 pr_err("twd_local_timer_register failed %d\n", err); 619 pr_err("twd_local_timer_register failed %d\n", err);
620 } 620 }
621} 621}
622#else /* CONFIG_LOCAL_TIMERS */ 622#else
623void __init omap4_local_timer_init(void) 623void __init omap4_local_timer_init(void)
624{ 624{
625 omap4_sync32k_timer_init(); 625 omap4_sync32k_timer_init();
626} 626}
627#endif /* CONFIG_LOCAL_TIMERS */ 627#endif /* CONFIG_HAVE_ARM_TWD */
628#endif /* CONFIG_ARCH_OMAP4 */ 628#endif /* CONFIG_ARCH_OMAP4 */
629 629
630#ifdef CONFIG_SOC_OMAP5 630#ifdef CONFIG_SOC_OMAP5
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 8091aac89edf..f9423493ed36 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -29,7 +29,7 @@
29#include <linux/pwm_backlight.h> 29#include <linux/pwm_backlight.h>
30 30
31#include <linux/i2c.h> 31#include <linux/i2c.h>
32#include <linux/i2c/pca953x.h> 32#include <linux/platform_data/pca953x.h>
33#include <linux/i2c/pxa-i2c.h> 33#include <linux/i2c/pxa-i2c.h>
34 34
35#include <linux/mfd/da903x.h> 35#include <linux/mfd/da903x.h>
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 3a3362fa793e..8eb4e23c561d 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -30,7 +30,7 @@
30#include <linux/power_supply.h> 30#include <linux/power_supply.h>
31#include <linux/apm-emulation.h> 31#include <linux/apm-emulation.h>
32#include <linux/i2c.h> 32#include <linux/i2c.h>
33#include <linux/i2c/pca953x.h> 33#include <linux/platform_data/pca953x.h>
34#include <linux/i2c/pxa-i2c.h> 34#include <linux/i2c/pxa-i2c.h>
35#include <linux/regulator/userspace-consumer.h> 35#include <linux/regulator/userspace-consumer.h>
36 36
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 13e5b00eae90..3133ba82c508 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -408,7 +408,7 @@ struct pxacamera_platform_data pcm990_pxacamera_platform_data = {
408 .mclk_10khz = 1000, 408 .mclk_10khz = 1000,
409}; 409};
410 410
411#include <linux/i2c/pca953x.h> 411#include <linux/platform_data/pca953x.h>
412 412
413static struct pca953x_platform_data pca9536_data = { 413static struct pca953x_platform_data pca9536_data = {
414 .gpio_base = PXA_NR_BUILTIN_GPIO, 414 .gpio_base = PXA_NR_BUILTIN_GPIO,
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 4c29173026e8..0b11c1af51c4 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -20,7 +20,7 @@
20#include <linux/leds.h> 20#include <linux/leds.h>
21#include <linux/i2c.h> 21#include <linux/i2c.h>
22#include <linux/i2c/pxa-i2c.h> 22#include <linux/i2c/pxa-i2c.h>
23#include <linux/i2c/pca953x.h> 23#include <linux/platform_data/pca953x.h>
24#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
25#include <linux/spi/ads7846.h> 25#include <linux/spi/ads7846.h>
26#include <linux/spi/corgi_lcd.h> 26#include <linux/spi/corgi_lcd.h>
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index 04a0aea23873..b19d1c361cab 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -26,7 +26,7 @@
26#include <linux/mtd/physmap.h> 26#include <linux/mtd/physmap.h>
27#include <linux/i2c.h> 27#include <linux/i2c.h>
28#include <linux/i2c/pxa-i2c.h> 28#include <linux/i2c/pxa-i2c.h>
29#include <linux/i2c/pca953x.h> 29#include <linux/platform_data/pca953x.h>
30#include <linux/apm-emulation.h> 30#include <linux/apm-emulation.h>
31#include <linux/can/platform/mcp251x.h> 31#include <linux/can/platform/mcp251x.h>
32#include <linux/regulator/fixed.h> 32#include <linux/regulator/fixed.h>
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c
index 86e59c043de2..869bce7c3f24 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -18,7 +18,7 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/i2c.h> 19#include <linux/i2c.h>
20#include <linux/i2c/pxa-i2c.h> 20#include <linux/i2c/pxa-i2c.h>
21#include <linux/i2c/pca953x.h> 21#include <linux/platform_data/pca953x.h>
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23 23
24#include <mach/pxa300.h> 24#include <mach/pxa300.h>
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
index d210c0f9c2c4..9db2029aa632 100644
--- a/arch/arm/mach-realview/Kconfig
+++ b/arch/arm/mach-realview/Kconfig
@@ -13,7 +13,7 @@ config REALVIEW_EB_A9MP
13 depends on MACH_REALVIEW_EB 13 depends on MACH_REALVIEW_EB
14 select CPU_V7 14 select CPU_V7
15 select HAVE_ARM_SCU if SMP 15 select HAVE_ARM_SCU if SMP
16 select HAVE_ARM_TWD if LOCAL_TIMERS 16 select HAVE_ARM_TWD if SMP
17 select HAVE_SMP 17 select HAVE_SMP
18 select MIGHT_HAVE_CACHE_L2X0 18 select MIGHT_HAVE_CACHE_L2X0
19 help 19 help
@@ -26,7 +26,7 @@ config REALVIEW_EB_ARM11MP
26 select ARCH_HAS_BARRIERS if SMP 26 select ARCH_HAS_BARRIERS if SMP
27 select CPU_V6K 27 select CPU_V6K
28 select HAVE_ARM_SCU if SMP 28 select HAVE_ARM_SCU if SMP
29 select HAVE_ARM_TWD if LOCAL_TIMERS 29 select HAVE_ARM_TWD if SMP
30 select HAVE_SMP 30 select HAVE_SMP
31 select MIGHT_HAVE_CACHE_L2X0 31 select MIGHT_HAVE_CACHE_L2X0
32 help 32 help
@@ -48,7 +48,7 @@ config MACH_REALVIEW_PB11MP
48 select ARM_GIC 48 select ARM_GIC
49 select CPU_V6K 49 select CPU_V6K
50 select HAVE_ARM_SCU if SMP 50 select HAVE_ARM_SCU if SMP
51 select HAVE_ARM_TWD if LOCAL_TIMERS 51 select HAVE_ARM_TWD if SMP
52 select HAVE_PATA_PLATFORM 52 select HAVE_PATA_PLATFORM
53 select HAVE_SMP 53 select HAVE_SMP
54 select MIGHT_HAVE_CACHE_L2X0 54 select MIGHT_HAVE_CACHE_L2X0
@@ -92,7 +92,7 @@ config MACH_REALVIEW_PBX
92 select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET 92 select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET
93 select ARM_GIC 93 select ARM_GIC
94 select HAVE_ARM_SCU if SMP 94 select HAVE_ARM_SCU if SMP
95 select HAVE_ARM_TWD if LOCAL_TIMERS 95 select HAVE_ARM_TWD if SMP
96 select HAVE_PATA_PLATFORM 96 select HAVE_PATA_PLATFORM
97 select HAVE_SMP 97 select HAVE_SMP
98 select MIGHT_HAVE_CACHE_L2X0 98 select MIGHT_HAVE_CACHE_L2X0
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 7791ac76f945..dba2173e70f3 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -30,7 +30,6 @@ config CPU_S3C2410
30 select S3C2410_CLOCK 30 select S3C2410_CLOCK
31 select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ 31 select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ
32 select S3C2410_PM if PM 32 select S3C2410_PM if PM
33 select SAMSUNG_HRT
34 select SAMSUNG_WDT_RESET 33 select SAMSUNG_WDT_RESET
35 help 34 help
36 Support for S3C2410 and S3C2410A family from the S3C24XX line 35 Support for S3C2410 and S3C2410A family from the S3C24XX line
@@ -42,7 +41,6 @@ config CPU_S3C2412
42 select CPU_LLSERIAL_S3C2440 41 select CPU_LLSERIAL_S3C2440
43 select S3C2412_DMA if S3C24XX_DMA 42 select S3C2412_DMA if S3C24XX_DMA
44 select S3C2412_PM if PM 43 select S3C2412_PM if PM
45 select SAMSUNG_HRT
46 help 44 help
47 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line 45 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
48 46
@@ -54,7 +52,6 @@ config CPU_S3C2416
54 select S3C2443_COMMON 52 select S3C2443_COMMON
55 select S3C2443_DMA if S3C24XX_DMA 53 select S3C2443_DMA if S3C24XX_DMA
56 select SAMSUNG_CLKSRC 54 select SAMSUNG_CLKSRC
57 select SAMSUNG_HRT
58 help 55 help
59 Support for the S3C2416 SoC from the S3C24XX line 56 Support for the S3C2416 SoC from the S3C24XX line
60 57
@@ -65,7 +62,6 @@ config CPU_S3C2440
65 select S3C2410_CLOCK 62 select S3C2410_CLOCK
66 select S3C2410_PM if PM 63 select S3C2410_PM if PM
67 select S3C2440_DMA if S3C24XX_DMA 64 select S3C2440_DMA if S3C24XX_DMA
68 select SAMSUNG_HRT
69 help 65 help
70 Support for S3C2440 Samsung Mobile CPU based systems. 66 Support for S3C2440 Samsung Mobile CPU based systems.
71 67
@@ -75,7 +71,6 @@ config CPU_S3C2442
75 select CPU_LLSERIAL_S3C2440 71 select CPU_LLSERIAL_S3C2440
76 select S3C2410_CLOCK 72 select S3C2410_CLOCK
77 select S3C2410_PM if PM 73 select S3C2410_PM if PM
78 select SAMSUNG_HRT
79 help 74 help
80 Support for S3C2442 Samsung Mobile CPU based systems. 75 Support for S3C2442 Samsung Mobile CPU based systems.
81 76
@@ -91,7 +86,6 @@ config CPU_S3C2443
91 select S3C2443_COMMON 86 select S3C2443_COMMON
92 select S3C2443_DMA if S3C24XX_DMA 87 select S3C2443_DMA if S3C24XX_DMA
93 select SAMSUNG_CLKSRC 88 select SAMSUNG_CLKSRC
94 select SAMSUNG_HRT
95 help 89 help
96 Support for the S3C2443 SoC from the S3C24XX line 90 Support for the S3C2443 SoC from the S3C24XX line
97 91
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2410.c b/arch/arm/mach-s3c24xx/clock-s3c2410.c
index 564553694b54..d39d3c787580 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2410.c
@@ -281,6 +281,5 @@ int __init s3c2410_baseclk_add(void)
281 (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on", 281 (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on",
282 (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on"); 282 (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on");
283 283
284 s3c_pwmclk_init();
285 return 0; 284 return 0;
286} 285}
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2412.c b/arch/arm/mach-s3c24xx/clock-s3c2412.c
index 2cc017da88fe..d8f253f2b486 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2412.c
@@ -757,6 +757,5 @@ int __init s3c2412_baseclk_add(void)
757 } 757 }
758 758
759 clkdev_add_table(s3c2412_clk_lookup, ARRAY_SIZE(s3c2412_clk_lookup)); 759 clkdev_add_table(s3c2412_clk_lookup, ARRAY_SIZE(s3c2412_clk_lookup));
760 s3c_pwmclk_init();
761 return 0; 760 return 0;
762} 761}
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2416.c b/arch/arm/mach-s3c24xx/clock-s3c2416.c
index 036056cea57c..d421a72920a5 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2416.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2416.c
@@ -168,6 +168,4 @@ void __init s3c2416_init_clocks(int xtal)
168 s3c24xx_register_clock(&hsmmc0_clk); 168 s3c24xx_register_clock(&hsmmc0_clk);
169 clkdev_add_table(s3c2416_clk_lookup, ARRAY_SIZE(s3c2416_clk_lookup)); 169 clkdev_add_table(s3c2416_clk_lookup, ARRAY_SIZE(s3c2416_clk_lookup));
170 170
171 s3c_pwmclk_init();
172
173} 171}
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c
index 0a53051b0787..76cd31f7804e 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
@@ -209,6 +209,4 @@ void __init s3c2443_init_clocks(int xtal)
209 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); 209 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
210 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); 210 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
211 clkdev_add_table(s3c2443_clk_lookup, ARRAY_SIZE(s3c2443_clk_lookup)); 211 clkdev_add_table(s3c2443_clk_lookup, ARRAY_SIZE(s3c2443_clk_lookup));
212
213 s3c_pwmclk_init();
214} 212}
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index c157103ed8eb..457261c98433 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -27,6 +27,7 @@
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29#include <linux/serial_core.h> 29#include <linux/serial_core.h>
30#include <clocksource/samsung_pwm.h>
30#include <linux/platform_device.h> 31#include <linux/platform_device.h>
31#include <linux/delay.h> 32#include <linux/delay.h>
32#include <linux/io.h> 33#include <linux/io.h>
@@ -49,6 +50,7 @@
49#include <plat/clock.h> 50#include <plat/clock.h>
50#include <plat/cpu-freq.h> 51#include <plat/cpu-freq.h>
51#include <plat/pll.h> 52#include <plat/pll.h>
53#include <plat/pwm-core.h>
52 54
53#include "common.h" 55#include "common.h"
54 56
@@ -216,6 +218,13 @@ static void s3c24xx_default_idle(void)
216 S3C2410_CLKCON); 218 S3C2410_CLKCON);
217} 219}
218 220
221static struct samsung_pwm_variant s3c24xx_pwm_variant = {
222 .bits = 16,
223 .div_base = 1,
224 .has_tint_cstat = false,
225 .tclk_mask = (1 << 4),
226};
227
219void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) 228void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
220{ 229{
221 arm_pm_idle = s3c24xx_default_idle; 230 arm_pm_idle = s3c24xx_default_idle;
@@ -232,6 +241,24 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
232 s3c24xx_init_cpu(); 241 s3c24xx_init_cpu();
233 242
234 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); 243 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
244
245 samsung_pwm_set_platdata(&s3c24xx_pwm_variant);
246}
247
248void __init samsung_set_timer_source(unsigned int event, unsigned int source)
249{
250 s3c24xx_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
251 s3c24xx_pwm_variant.output_mask &= ~(BIT(event) | BIT(source));
252}
253
254void __init samsung_timer_init(void)
255{
256 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
257 IRQ_TIMER0, IRQ_TIMER1, IRQ_TIMER2, IRQ_TIMER3, IRQ_TIMER4,
258 };
259
260 samsung_pwm_clocksource_init(S3C_VA_TIMER,
261 timer_irqs, &s3c24xx_pwm_variant);
235} 262}
236 263
237/* Serial port registrations */ 264/* Serial port registrations */
diff --git a/arch/arm/mach-s3c24xx/include/mach/map.h b/arch/arm/mach-s3c24xx/include/mach/map.h
index 8ba381f2dbe1..444793f0f5f1 100644
--- a/arch/arm/mach-s3c24xx/include/mach/map.h
+++ b/arch/arm/mach-s3c24xx/include/mach/map.h
@@ -167,4 +167,6 @@
167#define S3C_PA_SPI0 S3C2443_PA_SPI0 167#define S3C_PA_SPI0 S3C2443_PA_SPI0
168#define S3C_PA_SPI1 S3C2443_PA_SPI1 168#define S3C_PA_SPI1 S3C2443_PA_SPI1
169 169
170#define SAMSUNG_PA_TIMER S3C2410_PA_TIMER
171
170#endif /* __ASM_ARCH_MAP_H */ 172#endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index af4334d6b4d5..74dd47988b41 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -512,7 +512,7 @@ static struct platform_pwm_backlight_data backlight_data = {
512static struct platform_device h1940_backlight = { 512static struct platform_device h1940_backlight = {
513 .name = "pwm-backlight", 513 .name = "pwm-backlight",
514 .dev = { 514 .dev = {
515 .parent = &s3c_device_timer[0].dev, 515 .parent = &samsung_device_pwm.dev,
516 .platform_data = &backlight_data, 516 .platform_data = &backlight_data,
517 }, 517 },
518 .id = -1, 518 .id = -1,
@@ -632,7 +632,7 @@ static struct platform_device *h1940_devices[] __initdata = {
632 &h1940_device_bluetooth, 632 &h1940_device_bluetooth,
633 &s3c_device_sdi, 633 &s3c_device_sdi,
634 &s3c_device_rtc, 634 &s3c_device_rtc,
635 &s3c_device_timer[0], 635 &samsung_device_pwm,
636 &h1940_backlight, 636 &h1940_backlight,
637 &h1940_lcd_powerdev, 637 &h1940_lcd_powerdev,
638 &s3c_device_adc, 638 &s3c_device_adc,
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 44ca018e1f96..206b1f7546d1 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -530,7 +530,7 @@ static struct platform_pwm_backlight_data rx1950_backlight_data = {
530static struct platform_device rx1950_backlight = { 530static struct platform_device rx1950_backlight = {
531 .name = "pwm-backlight", 531 .name = "pwm-backlight",
532 .dev = { 532 .dev = {
533 .parent = &s3c_device_timer[0].dev, 533 .parent = &samsung_device_pwm.dev,
534 .platform_data = &rx1950_backlight_data, 534 .platform_data = &rx1950_backlight_data,
535 }, 535 },
536}; 536};
@@ -717,8 +717,7 @@ static struct platform_device *rx1950_devices[] __initdata = {
717 &s3c_device_sdi, 717 &s3c_device_sdi,
718 &s3c_device_adc, 718 &s3c_device_adc,
719 &s3c_device_ts, 719 &s3c_device_ts,
720 &s3c_device_timer[0], 720 &samsung_device_pwm,
721 &s3c_device_timer[1],
722 &rx1950_backlight, 721 &rx1950_backlight,
723 &rx1950_device_gpiokeys, 722 &rx1950_device_gpiokeys,
724 &power_supply, 723 &power_supply,
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 20578536aec7..041da5172423 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -17,13 +17,11 @@ config PLAT_S3C64XX
17# Configuration options for the S3C6410 CPU 17# Configuration options for the S3C6410 CPU
18 18
19config CPU_S3C6400 19config CPU_S3C6400
20 select SAMSUNG_HRT
21 bool 20 bool
22 help 21 help
23 Enable S3C6400 CPU support 22 Enable S3C6400 CPU support
24 23
25config CPU_S3C6410 24config CPU_S3C6410
26 select SAMSUNG_HRT
27 bool 25 bool
28 help 26 help
29 Enable S3C6410 CPU support 27 Enable S3C6410 CPU support
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c
index 8499415be9cd..c1bcc4a6d3a8 100644
--- a/arch/arm/mach-s3c64xx/clock.c
+++ b/arch/arm/mach-s3c64xx/clock.c
@@ -1004,6 +1004,4 @@ void __init s3c64xx_register_clocks(unsigned long xtal,
1004 for (cnt = 0; cnt < ARRAY_SIZE(clksrc_cdev); cnt++) 1004 for (cnt = 0; cnt < ARRAY_SIZE(clksrc_cdev); cnt++)
1005 s3c_register_clksrc(clksrc_cdev[cnt], 1); 1005 s3c_register_clksrc(clksrc_cdev[cnt], 1);
1006 clkdev_add_table(s3c64xx_clk_lookup, ARRAY_SIZE(s3c64xx_clk_lookup)); 1006 clkdev_add_table(s3c64xx_clk_lookup, ARRAY_SIZE(s3c64xx_clk_lookup));
1007
1008 s3c_pwmclk_init();
1009} 1007}
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 3f62e467b129..73d79cf5e141 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -27,6 +27,7 @@
27#include <linux/irq.h> 27#include <linux/irq.h>
28#include <linux/gpio.h> 28#include <linux/gpio.h>
29#include <linux/irqchip/arm-vic.h> 29#include <linux/irqchip/arm-vic.h>
30#include <clocksource/samsung_pwm.h>
30 31
31#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
32#include <asm/mach/map.h> 33#include <asm/mach/map.h>
@@ -42,7 +43,7 @@
42#include <plat/pm.h> 43#include <plat/pm.h>
43#include <plat/gpio-cfg.h> 44#include <plat/gpio-cfg.h>
44#include <plat/irq-uart.h> 45#include <plat/irq-uart.h>
45#include <plat/irq-vic-timer.h> 46#include <plat/pwm-core.h>
46#include <plat/regs-irqtype.h> 47#include <plat/regs-irqtype.h>
47#include <plat/regs-serial.h> 48#include <plat/regs-serial.h>
48#include <plat/watchdog-reset.h> 49#include <plat/watchdog-reset.h>
@@ -149,6 +150,30 @@ static struct device s3c64xx_dev = {
149 .bus = &s3c64xx_subsys, 150 .bus = &s3c64xx_subsys,
150}; 151};
151 152
153static struct samsung_pwm_variant s3c64xx_pwm_variant = {
154 .bits = 32,
155 .div_base = 0,
156 .has_tint_cstat = true,
157 .tclk_mask = (1 << 7) | (1 << 6) | (1 << 5),
158};
159
160void __init samsung_set_timer_source(unsigned int event, unsigned int source)
161{
162 s3c64xx_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
163 s3c64xx_pwm_variant.output_mask &= ~(BIT(event) | BIT(source));
164}
165
166void __init samsung_timer_init(void)
167{
168 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
169 IRQ_TIMER0_VIC, IRQ_TIMER1_VIC, IRQ_TIMER2_VIC,
170 IRQ_TIMER3_VIC, IRQ_TIMER4_VIC,
171 };
172
173 samsung_pwm_clocksource_init(S3C_VA_TIMER,
174 timer_irqs, &s3c64xx_pwm_variant);
175}
176
152/* read cpu identification code */ 177/* read cpu identification code */
153 178
154void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) 179void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
@@ -161,6 +186,8 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
161 s3c64xx_init_cpu(); 186 s3c64xx_init_cpu();
162 187
163 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); 188 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
189
190 samsung_pwm_set_platdata(&s3c64xx_pwm_variant);
164} 191}
165 192
166static __init int s3c64xx_dev_init(void) 193static __init int s3c64xx_dev_init(void)
@@ -195,9 +222,6 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)
195 /* initialise the pair of VICs */ 222 /* initialise the pair of VICs */
196 vic_init(VA_VIC0, IRQ_VIC0_BASE, vic0_valid, IRQ_VIC0_RESUME); 223 vic_init(VA_VIC0, IRQ_VIC0_BASE, vic0_valid, IRQ_VIC0_RESUME);
197 vic_init(VA_VIC1, IRQ_VIC1_BASE, vic1_valid, IRQ_VIC1_RESUME); 224 vic_init(VA_VIC1, IRQ_VIC1_BASE, vic1_valid, IRQ_VIC1_RESUME);
198
199 /* add the timer sub-irqs */
200 s3c_init_vic_timer_irq(5, IRQ_TIMER0);
201} 225}
202 226
203#define eint_offset(irq) ((irq) - IRQ_EINT(0)) 227#define eint_offset(irq) ((irq) - IRQ_EINT(0))
diff --git a/arch/arm/mach-s3c64xx/include/mach/irqs.h b/arch/arm/mach-s3c64xx/include/mach/irqs.h
index 96d60e0d9372..67bbd1dd04c2 100644
--- a/arch/arm/mach-s3c64xx/include/mach/irqs.h
+++ b/arch/arm/mach-s3c64xx/include/mach/irqs.h
@@ -107,14 +107,6 @@
107#define IRQ_TC IRQ_PENDN 107#define IRQ_TC IRQ_PENDN
108#define IRQ_ADC S3C64XX_IRQ_VIC1(31) 108#define IRQ_ADC S3C64XX_IRQ_VIC1(31)
109 109
110#define S3C64XX_TIMER_IRQ(x) S3C_IRQ(64 + (x))
111
112#define IRQ_TIMER0 S3C64XX_TIMER_IRQ(0)
113#define IRQ_TIMER1 S3C64XX_TIMER_IRQ(1)
114#define IRQ_TIMER2 S3C64XX_TIMER_IRQ(2)
115#define IRQ_TIMER3 S3C64XX_TIMER_IRQ(3)
116#define IRQ_TIMER4 S3C64XX_TIMER_IRQ(4)
117
118/* compatibility for device defines */ 110/* compatibility for device defines */
119 111
120#define IRQ_IIC1 IRQ_S3C6410_IIC1 112#define IRQ_IIC1 IRQ_S3C6410_IIC1
diff --git a/arch/arm/mach-s3c64xx/include/mach/map.h b/arch/arm/mach-s3c64xx/include/mach/map.h
index 8e2097bb208a..f55ccb1ce893 100644
--- a/arch/arm/mach-s3c64xx/include/mach/map.h
+++ b/arch/arm/mach-s3c64xx/include/mach/map.h
@@ -121,5 +121,6 @@
121#define SAMSUNG_PA_ADC S3C64XX_PA_ADC 121#define SAMSUNG_PA_ADC S3C64XX_PA_ADC
122#define SAMSUNG_PA_CFCON S3C64XX_PA_CFCON 122#define SAMSUNG_PA_CFCON S3C64XX_PA_CFCON
123#define SAMSUNG_PA_KEYPAD S3C64XX_PA_KEYPAD 123#define SAMSUNG_PA_KEYPAD S3C64XX_PA_KEYPAD
124#define SAMSUNG_PA_TIMER S3C64XX_PA_TIMER
124 125
125#endif /* __ASM_ARCH_6400_MAP_H */ 126#endif /* __ASM_ARCH_6400_MAP_H */
diff --git a/arch/arm/mach-s3c64xx/irq-pm.c b/arch/arm/mach-s3c64xx/irq-pm.c
index 0c7e1d960ca4..c3da1b68d03e 100644
--- a/arch/arm/mach-s3c64xx/irq-pm.c
+++ b/arch/arm/mach-s3c64xx/irq-pm.c
@@ -22,7 +22,6 @@
22#include <mach/map.h> 22#include <mach/map.h>
23 23
24#include <plat/regs-serial.h> 24#include <plat/regs-serial.h>
25#include <plat/regs-timer.h>
26#include <mach/regs-gpio.h> 25#include <mach/regs-gpio.h>
27#include <plat/cpu.h> 26#include <plat/cpu.h>
28#include <plat/pm.h> 27#include <plat/pm.h>
@@ -43,7 +42,6 @@ static struct sleep_save irq_save[] = {
43 SAVE_ITEM(S3C64XX_EINT0FLTCON2), 42 SAVE_ITEM(S3C64XX_EINT0FLTCON2),
44 SAVE_ITEM(S3C64XX_EINT0FLTCON3), 43 SAVE_ITEM(S3C64XX_EINT0FLTCON3),
45 SAVE_ITEM(S3C64XX_EINT0MASK), 44 SAVE_ITEM(S3C64XX_EINT0MASK),
46 SAVE_ITEM(S3C64XX_TINT_CSTAT),
47}; 45};
48 46
49static struct irq_grp_save { 47static struct irq_grp_save {
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 8ad88ace795a..eb8e5a1aca42 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -30,7 +30,7 @@
30#include <linux/basic_mmio_gpio.h> 30#include <linux/basic_mmio_gpio.h>
31#include <linux/spi/spi.h> 31#include <linux/spi/spi.h>
32 32
33#include <linux/i2c/pca953x.h> 33#include <linux/platform_data/pca953x.h>
34#include <linux/platform_data/s3c-hsotg.h> 34#include <linux/platform_data/s3c-hsotg.h>
35 35
36#include <video/platform_lcd.h> 36#include <video/platform_lcd.h>
@@ -120,7 +120,7 @@ static struct platform_device crag6410_backlight_device = {
120 .name = "pwm-backlight", 120 .name = "pwm-backlight",
121 .id = -1, 121 .id = -1,
122 .dev = { 122 .dev = {
123 .parent = &s3c_device_timer[0].dev, 123 .parent = &samsung_device_pwm.dev,
124 .platform_data = &crag6410_backlight_data, 124 .platform_data = &crag6410_backlight_data,
125 }, 125 },
126}; 126};
@@ -375,7 +375,7 @@ static struct platform_device *crag6410_devices[] __initdata = {
375 &s3c_device_fb, 375 &s3c_device_fb,
376 &s3c_device_ohci, 376 &s3c_device_ohci,
377 &s3c_device_usb_hsotg, 377 &s3c_device_usb_hsotg,
378 &s3c_device_timer[0], 378 &samsung_device_pwm,
379 &s3c64xx_device_iis0, 379 &s3c64xx_device_iis0,
380 &s3c64xx_device_iis1, 380 &s3c64xx_device_iis1,
381 &samsung_device_keypad, 381 &samsung_device_keypad,
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 5b7f357d8c22..f39569e0f2e6 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -123,7 +123,7 @@ static struct platform_pwm_backlight_data hmt_backlight_data = {
123static struct platform_device hmt_backlight_device = { 123static struct platform_device hmt_backlight_device = {
124 .name = "pwm-backlight", 124 .name = "pwm-backlight",
125 .dev = { 125 .dev = {
126 .parent = &s3c_device_timer[1].dev, 126 .parent = &samsung_device_pwm.dev,
127 .platform_data = &hmt_backlight_data, 127 .platform_data = &hmt_backlight_data,
128 }, 128 },
129}; 129};
@@ -239,7 +239,7 @@ static struct platform_device *hmt_devices[] __initdata = {
239 &s3c_device_nand, 239 &s3c_device_nand,
240 &s3c_device_fb, 240 &s3c_device_fb,
241 &s3c_device_ohci, 241 &s3c_device_ohci,
242 &s3c_device_timer[1], 242 &samsung_device_pwm,
243 &hmt_backlight_device, 243 &hmt_backlight_device,
244 &hmt_leds_device, 244 &hmt_leds_device,
245}; 245};
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c
index 58ac99041274..86d980b448fd 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq.c
@@ -157,7 +157,7 @@ static struct platform_pwm_backlight_data smartq_backlight_data = {
157static struct platform_device smartq_backlight_device = { 157static struct platform_device smartq_backlight_device = {
158 .name = "pwm-backlight", 158 .name = "pwm-backlight",
159 .dev = { 159 .dev = {
160 .parent = &s3c_device_timer[1].dev, 160 .parent = &samsung_device_pwm.dev,
161 .platform_data = &smartq_backlight_data, 161 .platform_data = &smartq_backlight_data,
162 }, 162 },
163}; 163};
@@ -246,7 +246,7 @@ static struct platform_device *smartq_devices[] __initdata = {
246 &s3c_device_i2c0, 246 &s3c_device_i2c0,
247 &s3c_device_ohci, 247 &s3c_device_ohci,
248 &s3c_device_rtc, 248 &s3c_device_rtc,
249 &s3c_device_timer[1], 249 &samsung_device_pwm,
250 &s3c_device_ts, 250 &s3c_device_ts,
251 &s3c_device_usb_hsotg, 251 &s3c_device_usb_hsotg,
252 &s3c64xx_device_iis0, 252 &s3c64xx_device_iis0,
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index bd3295a19ad7..d90b450c5645 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -274,6 +274,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
274 &s3c_device_i2c1, 274 &s3c_device_i2c1,
275 &s3c_device_fb, 275 &s3c_device_fb,
276 &s3c_device_ohci, 276 &s3c_device_ohci,
277 &samsung_device_pwm,
277 &s3c_device_usb_hsotg, 278 &s3c_device_usb_hsotg,
278 &s3c64xx_device_iisv4, 279 &s3c64xx_device_iisv4,
279 &samsung_device_keypad, 280 &samsung_device_keypad,
@@ -691,9 +692,9 @@ static void __init smdk6410_machine_init(void)
691 692
692 s3c_ide_set_platdata(&smdk6410_ide_pdata); 693 s3c_ide_set_platdata(&smdk6410_ide_pdata);
693 694
694 samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data);
695
696 platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); 695 platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices));
696
697 samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data);
697} 698}
698 699
699MACHINE_START(SMDK6410, "SMDK6410") 700MACHINE_START(SMDK6410, "SMDK6410")
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig
index 5a707bdb9ea0..bb2111b3751e 100644
--- a/arch/arm/mach-s5p64x0/Kconfig
+++ b/arch/arm/mach-s5p64x0/Kconfig
@@ -11,14 +11,12 @@ config CPU_S5P6440
11 bool 11 bool
12 select S5P_SLEEP if PM 12 select S5P_SLEEP if PM
13 select SAMSUNG_DMADEV 13 select SAMSUNG_DMADEV
14 select SAMSUNG_HRT
15 select SAMSUNG_WAKEMASK if PM 14 select SAMSUNG_WAKEMASK if PM
16 help 15 help
17 Enable S5P6440 CPU support 16 Enable S5P6440 CPU support
18 17
19config CPU_S5P6450 18config CPU_S5P6450
20 bool 19 bool
21 select SAMSUNG_HRT
22 select S5P_SLEEP if PM 20 select S5P_SLEEP if PM
23 select SAMSUNG_DMADEV 21 select SAMSUNG_DMADEV
24 select SAMSUNG_WAKEMASK if PM 22 select SAMSUNG_WAKEMASK if PM
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6440.c b/arch/arm/mach-s5p64x0/clock-s5p6440.c
index 3537815247f1..ae34a1d5e10a 100644
--- a/arch/arm/mach-s5p64x0/clock-s5p6440.c
+++ b/arch/arm/mach-s5p64x0/clock-s5p6440.c
@@ -629,6 +629,4 @@ void __init s5p6440_register_clocks(void)
629 clkdev_add_table(s5p6440_clk_lookup, ARRAY_SIZE(s5p6440_clk_lookup)); 629 clkdev_add_table(s5p6440_clk_lookup, ARRAY_SIZE(s5p6440_clk_lookup));
630 630
631 s3c24xx_register_clock(&dummy_apb_pclk); 631 s3c24xx_register_clock(&dummy_apb_pclk);
632
633 s3c_pwmclk_init();
634} 632}
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-s5p64x0/clock-s5p6450.c
index af384ddd2dcf..0b3ca2ed53e9 100644
--- a/arch/arm/mach-s5p64x0/clock-s5p6450.c
+++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c
@@ -698,6 +698,4 @@ void __init s5p6450_register_clocks(void)
698 clkdev_add_table(s5p6450_clk_lookup, ARRAY_SIZE(s5p6450_clk_lookup)); 698 clkdev_add_table(s5p6450_clk_lookup, ARRAY_SIZE(s5p6450_clk_lookup));
699 699
700 s3c24xx_register_clock(&dummy_apb_pclk); 700 s3c24xx_register_clock(&dummy_apb_pclk);
701
702 s3c_pwmclk_init();
703} 701}
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c
index dfdfdc320ce7..42e14f2e7ca7 100644
--- a/arch/arm/mach-s5p64x0/common.c
+++ b/arch/arm/mach-s5p64x0/common.c
@@ -19,6 +19,7 @@
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <clocksource/samsung_pwm.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23#include <linux/sched.h> 24#include <linux/sched.h>
24#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
@@ -47,6 +48,7 @@
47#include <plat/fb-core.h> 48#include <plat/fb-core.h>
48#include <plat/spi-core.h> 49#include <plat/spi-core.h>
49#include <plat/gpio-cfg.h> 50#include <plat/gpio-cfg.h>
51#include <plat/pwm-core.h>
50#include <plat/regs-irqtype.h> 52#include <plat/regs-irqtype.h>
51#include <plat/regs-serial.h> 53#include <plat/regs-serial.h>
52#include <plat/watchdog-reset.h> 54#include <plat/watchdog-reset.h>
@@ -157,6 +159,30 @@ static void s5p64x0_idle(void)
157 cpu_do_idle(); 159 cpu_do_idle();
158} 160}
159 161
162static struct samsung_pwm_variant s5p64x0_pwm_variant = {
163 .bits = 32,
164 .div_base = 0,
165 .has_tint_cstat = true,
166 .tclk_mask = 0,
167};
168
169void __init samsung_set_timer_source(unsigned int event, unsigned int source)
170{
171 s5p64x0_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
172 s5p64x0_pwm_variant.output_mask &= ~(BIT(event) | BIT(source));
173}
174
175void __init samsung_timer_init(void)
176{
177 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
178 IRQ_TIMER0_VIC, IRQ_TIMER1_VIC, IRQ_TIMER2_VIC,
179 IRQ_TIMER3_VIC, IRQ_TIMER4_VIC,
180 };
181
182 samsung_pwm_clocksource_init(S3C_VA_TIMER,
183 timer_irqs, &s5p64x0_pwm_variant);
184}
185
160/* 186/*
161 * s5p64x0_map_io 187 * s5p64x0_map_io
162 * 188 *
@@ -176,6 +202,7 @@ void __init s5p64x0_init_io(struct map_desc *mach_desc, int size)
176 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); 202 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
177 samsung_wdt_reset_init(S3C_VA_WATCHDOG); 203 samsung_wdt_reset_init(S3C_VA_WATCHDOG);
178 204
205 samsung_pwm_set_platdata(&s5p64x0_pwm_variant);
179} 206}
180 207
181void __init s5p6440_map_io(void) 208void __init s5p6440_map_io(void)
diff --git a/arch/arm/mach-s5p64x0/include/mach/irqs.h b/arch/arm/mach-s5p64x0/include/mach/irqs.h
index 5b845e849b30..53982db9d259 100644
--- a/arch/arm/mach-s5p64x0/include/mach/irqs.h
+++ b/arch/arm/mach-s5p64x0/include/mach/irqs.h
@@ -141,8 +141,6 @@
141 141
142#define IRQ_EINT_GROUP(grp, x) (IRQ_EINT_GROUP##grp##_BASE + (x)) 142#define IRQ_EINT_GROUP(grp, x) (IRQ_EINT_GROUP##grp##_BASE + (x))
143 143
144#define IRQ_TIMER_BASE (11)
145
146/* Set the default NR_IRQS */ 144/* Set the default NR_IRQS */
147 145
148#define NR_IRQS (IRQ_EINT_GROUP8_BASE + IRQ_EINT_GROUP8_NR + 1) 146#define NR_IRQS (IRQ_EINT_GROUP8_BASE + IRQ_EINT_GROUP8_NR + 1)
diff --git a/arch/arm/mach-s5p64x0/include/mach/map.h b/arch/arm/mach-s5p64x0/include/mach/map.h
index 0c0175dbfa34..50a6e96d6389 100644
--- a/arch/arm/mach-s5p64x0/include/mach/map.h
+++ b/arch/arm/mach-s5p64x0/include/mach/map.h
@@ -76,6 +76,7 @@
76#define S5P_PA_TIMER S5P64X0_PA_TIMER 76#define S5P_PA_TIMER S5P64X0_PA_TIMER
77 77
78#define SAMSUNG_PA_ADC S5P64X0_PA_ADC 78#define SAMSUNG_PA_ADC S5P64X0_PA_ADC
79#define SAMSUNG_PA_TIMER S5P64X0_PA_TIMER
79 80
80/* UART */ 81/* UART */
81 82
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index 73f71a698a34..0b00304c1e91 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -162,6 +162,7 @@ static struct platform_device *smdk6440_devices[] __initdata = {
162 &s3c_device_rtc, 162 &s3c_device_rtc,
163 &s3c_device_i2c0, 163 &s3c_device_i2c0,
164 &s3c_device_i2c1, 164 &s3c_device_i2c1,
165 &samsung_device_pwm,
165 &s3c_device_ts, 166 &s3c_device_ts,
166 &s3c_device_wdt, 167 &s3c_device_wdt,
167 &s5p6440_device_iis, 168 &s5p6440_device_iis,
@@ -254,8 +255,6 @@ static void __init smdk6440_machine_init(void)
254 i2c_register_board_info(1, smdk6440_i2c_devs1, 255 i2c_register_board_info(1, smdk6440_i2c_devs1,
255 ARRAY_SIZE(smdk6440_i2c_devs1)); 256 ARRAY_SIZE(smdk6440_i2c_devs1));
256 257
257 samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data);
258
259 s5p6440_set_lcd_interface(); 258 s5p6440_set_lcd_interface();
260 s3c_fb_set_platdata(&smdk6440_lcd_pdata); 259 s3c_fb_set_platdata(&smdk6440_lcd_pdata);
261 260
@@ -264,6 +263,8 @@ static void __init smdk6440_machine_init(void)
264 s3c_sdhci2_set_platdata(&smdk6440_hsmmc2_pdata); 263 s3c_sdhci2_set_platdata(&smdk6440_hsmmc2_pdata);
265 264
266 platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices)); 265 platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
266
267 samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data);
267} 268}
268 269
269MACHINE_START(SMDK6440, "SMDK6440") 270MACHINE_START(SMDK6440, "SMDK6440")
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index 18303e12019f..5949296e88fd 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -180,6 +180,7 @@ static struct platform_device *smdk6450_devices[] __initdata = {
180 &s3c_device_rtc, 180 &s3c_device_rtc,
181 &s3c_device_i2c0, 181 &s3c_device_i2c0,
182 &s3c_device_i2c1, 182 &s3c_device_i2c1,
183 &samsung_device_pwm,
183 &s3c_device_ts, 184 &s3c_device_ts,
184 &s3c_device_wdt, 185 &s3c_device_wdt,
185 &s5p6450_device_iis0, 186 &s5p6450_device_iis0,
@@ -273,8 +274,6 @@ static void __init smdk6450_machine_init(void)
273 i2c_register_board_info(1, smdk6450_i2c_devs1, 274 i2c_register_board_info(1, smdk6450_i2c_devs1,
274 ARRAY_SIZE(smdk6450_i2c_devs1)); 275 ARRAY_SIZE(smdk6450_i2c_devs1));
275 276
276 samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data);
277
278 s5p6450_set_lcd_interface(); 277 s5p6450_set_lcd_interface();
279 s3c_fb_set_platdata(&smdk6450_lcd_pdata); 278 s3c_fb_set_platdata(&smdk6450_lcd_pdata);
280 279
@@ -283,6 +282,8 @@ static void __init smdk6450_machine_init(void)
283 s3c_sdhci2_set_platdata(&smdk6450_hsmmc2_pdata); 282 s3c_sdhci2_set_platdata(&smdk6450_hsmmc2_pdata);
284 283
285 platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices)); 284 platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices));
285
286 samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data);
286} 287}
287 288
288MACHINE_START(SMDK6450, "SMDK6450") 289MACHINE_START(SMDK6450, "SMDK6450")
diff --git a/arch/arm/mach-s5p64x0/pm.c b/arch/arm/mach-s5p64x0/pm.c
index 97c2a08ad490..861e15cea691 100644
--- a/arch/arm/mach-s5p64x0/pm.c
+++ b/arch/arm/mach-s5p64x0/pm.c
@@ -18,7 +18,6 @@
18 18
19#include <plat/cpu.h> 19#include <plat/cpu.h>
20#include <plat/pm.h> 20#include <plat/pm.h>
21#include <plat/regs-timer.h>
22#include <plat/wakeup-mask.h> 21#include <plat/wakeup-mask.h>
23 22
24#include <mach/regs-clock.h> 23#include <mach/regs-clock.h>
@@ -48,8 +47,6 @@ static struct sleep_save s5p64x0_misc_save[] = {
48 SAVE_ITEM(S5P64X0_MEM0CONSLP1), 47 SAVE_ITEM(S5P64X0_MEM0CONSLP1),
49 SAVE_ITEM(S5P64X0_MEM0DRVCON), 48 SAVE_ITEM(S5P64X0_MEM0DRVCON),
50 SAVE_ITEM(S5P64X0_MEM1DRVCON), 49 SAVE_ITEM(S5P64X0_MEM1DRVCON),
51
52 SAVE_ITEM(S3C64XX_TINT_CSTAT),
53}; 50};
54 51
55/* DPLL is present only in S5P6450 */ 52/* DPLL is present only in S5P6450 */
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig
index 2f456a4533ba..15170be97a74 100644
--- a/arch/arm/mach-s5pc100/Kconfig
+++ b/arch/arm/mach-s5pc100/Kconfig
@@ -11,7 +11,6 @@ config CPU_S5PC100
11 bool 11 bool
12 select S5P_EXT_INT 12 select S5P_EXT_INT
13 select SAMSUNG_DMADEV 13 select SAMSUNG_DMADEV
14 select SAMSUNG_HRT
15 help 14 help
16 Enable S5PC100 CPU support 15 Enable S5PC100 CPU support
17 16
diff --git a/arch/arm/mach-s5pc100/clock.c b/arch/arm/mach-s5pc100/clock.c
index a206dc35eff1..d0dc10ee7729 100644
--- a/arch/arm/mach-s5pc100/clock.c
+++ b/arch/arm/mach-s5pc100/clock.c
@@ -1358,6 +1358,4 @@ void __init s5pc100_register_clocks(void)
1358 s3c_disable_clocks(clk_cdev[ptr], 1); 1358 s3c_disable_clocks(clk_cdev[ptr], 1);
1359 1359
1360 s3c24xx_register_clock(&dummy_apb_pclk); 1360 s3c24xx_register_clock(&dummy_apb_pclk);
1361
1362 s3c_pwmclk_init();
1363} 1361}
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c
index 4bdfecf6d024..c5a8eeacf81c 100644
--- a/arch/arm/mach-s5pc100/common.c
+++ b/arch/arm/mach-s5pc100/common.c
@@ -22,6 +22,7 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/device.h> 23#include <linux/device.h>
24#include <linux/serial_core.h> 24#include <linux/serial_core.h>
25#include <clocksource/samsung_pwm.h>
25#include <linux/platform_device.h> 26#include <linux/platform_device.h>
26#include <linux/sched.h> 27#include <linux/sched.h>
27#include <linux/reboot.h> 28#include <linux/reboot.h>
@@ -46,6 +47,7 @@
46#include <plat/fb-core.h> 47#include <plat/fb-core.h>
47#include <plat/iic-core.h> 48#include <plat/iic-core.h>
48#include <plat/onenand-core.h> 49#include <plat/onenand-core.h>
50#include <plat/pwm-core.h>
49#include <plat/spi-core.h> 51#include <plat/spi-core.h>
50#include <plat/regs-serial.h> 52#include <plat/regs-serial.h>
51#include <plat/watchdog-reset.h> 53#include <plat/watchdog-reset.h>
@@ -132,6 +134,30 @@ static struct map_desc s5pc100_iodesc[] __initdata = {
132 } 134 }
133}; 135};
134 136
137static struct samsung_pwm_variant s5pc100_pwm_variant = {
138 .bits = 32,
139 .div_base = 0,
140 .has_tint_cstat = true,
141 .tclk_mask = (1 << 5),
142};
143
144void __init samsung_set_timer_source(unsigned int event, unsigned int source)
145{
146 s5pc100_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
147 s5pc100_pwm_variant.output_mask &= ~(BIT(event) | BIT(source));
148}
149
150void __init samsung_timer_init(void)
151{
152 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
153 IRQ_TIMER0_VIC, IRQ_TIMER1_VIC, IRQ_TIMER2_VIC,
154 IRQ_TIMER3_VIC, IRQ_TIMER4_VIC,
155 };
156
157 samsung_pwm_clocksource_init(S3C_VA_TIMER,
158 timer_irqs, &s5pc100_pwm_variant);
159}
160
135/* 161/*
136 * s5pc100_map_io 162 * s5pc100_map_io
137 * 163 *
@@ -149,6 +175,8 @@ void __init s5pc100_init_io(struct map_desc *mach_desc, int size)
149 s5p_init_cpu(S5P_VA_CHIPID); 175 s5p_init_cpu(S5P_VA_CHIPID);
150 176
151 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); 177 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
178
179 samsung_pwm_set_platdata(&s5pc100_pwm_variant);
152} 180}
153 181
154void __init s5pc100_map_io(void) 182void __init s5pc100_map_io(void)
diff --git a/arch/arm/mach-s5pc100/include/mach/irqs.h b/arch/arm/mach-s5pc100/include/mach/irqs.h
index 2870f12c7926..d2eb4757381f 100644
--- a/arch/arm/mach-s5pc100/include/mach/irqs.h
+++ b/arch/arm/mach-s5pc100/include/mach/irqs.h
@@ -97,8 +97,6 @@
97#define IRQ_SDMFIQ S5P_IRQ_VIC2(31) 97#define IRQ_SDMFIQ S5P_IRQ_VIC2(31)
98#define IRQ_VIC_END S5P_IRQ_VIC2(31) 98#define IRQ_VIC_END S5P_IRQ_VIC2(31)
99 99
100#define IRQ_TIMER_BASE (11)
101
102#define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) 100#define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0))
103#define S5P_EINT_BASE2 (IRQ_VIC_END + 1) 101#define S5P_EINT_BASE2 (IRQ_VIC_END + 1)
104 102
diff --git a/arch/arm/mach-s5pc100/include/mach/map.h b/arch/arm/mach-s5pc100/include/mach/map.h
index 54bc4f82e17a..2550b6112b82 100644
--- a/arch/arm/mach-s5pc100/include/mach/map.h
+++ b/arch/arm/mach-s5pc100/include/mach/map.h
@@ -116,6 +116,7 @@
116#define SAMSUNG_PA_ADC S5PC100_PA_TSADC 116#define SAMSUNG_PA_ADC S5PC100_PA_TSADC
117#define SAMSUNG_PA_CFCON S5PC100_PA_CFCON 117#define SAMSUNG_PA_CFCON S5PC100_PA_CFCON
118#define SAMSUNG_PA_KEYPAD S5PC100_PA_KEYPAD 118#define SAMSUNG_PA_KEYPAD S5PC100_PA_KEYPAD
119#define SAMSUNG_PA_TIMER S5PC100_PA_TIMER
119 120
120#define S5PC100_VA_OTHERS (S3C_VA_SYS + 0x10000) 121#define S5PC100_VA_OTHERS (S3C_VA_SYS + 0x10000)
121 122
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
index 8c880f76f274..7c57a221785e 100644
--- a/arch/arm/mach-s5pc100/mach-smdkc100.c
+++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
@@ -194,6 +194,7 @@ static struct platform_device *smdkc100_devices[] __initdata = {
194 &s3c_device_hsmmc0, 194 &s3c_device_hsmmc0,
195 &s3c_device_hsmmc1, 195 &s3c_device_hsmmc1,
196 &s3c_device_hsmmc2, 196 &s3c_device_hsmmc2,
197 &samsung_device_pwm,
197 &s3c_device_ts, 198 &s3c_device_ts,
198 &s3c_device_wdt, 199 &s3c_device_wdt,
199 &smdkc100_lcd_powerdev, 200 &smdkc100_lcd_powerdev,
@@ -246,9 +247,9 @@ static void __init smdkc100_machine_init(void)
246 gpio_request(S5PC100_GPH0(6), "GPH0"); 247 gpio_request(S5PC100_GPH0(6), "GPH0");
247 smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); 248 smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0);
248 249
249 samsung_bl_set(&smdkc100_bl_gpio_info, &smdkc100_bl_data);
250
251 platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); 250 platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices));
251
252 samsung_bl_set(&smdkc100_bl_gpio_info, &smdkc100_bl_data);
252} 253}
253 254
254MACHINE_START(SMDKC100, "SMDKC100") 255MACHINE_START(SMDKC100, "SMDKC100")
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 0963283a7c5d..caaedafbbf5f 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -15,7 +15,6 @@ config CPU_S5PV210
15 select S5P_PM if PM 15 select S5P_PM if PM
16 select S5P_SLEEP if PM 16 select S5P_SLEEP if PM
17 select SAMSUNG_DMADEV 17 select SAMSUNG_DMADEV
18 select SAMSUNG_HRT
19 help 18 help
20 Enable S5PV210 CPU support 19 Enable S5PV210 CPU support
21 20
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
index f051f53e35b7..ca463724a3df 100644
--- a/arch/arm/mach-s5pv210/clock.c
+++ b/arch/arm/mach-s5pv210/clock.c
@@ -1362,5 +1362,4 @@ void __init s5pv210_register_clocks(void)
1362 for (ptr = 0; ptr < ARRAY_SIZE(clk_cdev); ptr++) 1362 for (ptr = 0; ptr < ARRAY_SIZE(clk_cdev); ptr++)
1363 s3c_disable_clocks(clk_cdev[ptr], 1); 1363 s3c_disable_clocks(clk_cdev[ptr], 1);
1364 1364
1365 s3c_pwmclk_init();
1366} 1365}
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c
index 023f1a796a9c..26027a29b8a1 100644
--- a/arch/arm/mach-s5pv210/common.c
+++ b/arch/arm/mach-s5pv210/common.c
@@ -19,6 +19,7 @@
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/device.h> 21#include <linux/device.h>
22#include <clocksource/samsung_pwm.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23#include <linux/sched.h> 24#include <linux/sched.h>
24#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
@@ -42,6 +43,7 @@
42#include <plat/fimc-core.h> 43#include <plat/fimc-core.h>
43#include <plat/iic-core.h> 44#include <plat/iic-core.h>
44#include <plat/keypad-core.h> 45#include <plat/keypad-core.h>
46#include <plat/pwm-core.h>
45#include <plat/tv-core.h> 47#include <plat/tv-core.h>
46#include <plat/spi-core.h> 48#include <plat/spi-core.h>
47#include <plat/regs-serial.h> 49#include <plat/regs-serial.h>
@@ -148,6 +150,30 @@ void s5pv210_restart(enum reboot_mode mode, const char *cmd)
148 __raw_writel(0x1, S5P_SWRESET); 150 __raw_writel(0x1, S5P_SWRESET);
149} 151}
150 152
153static struct samsung_pwm_variant s5pv210_pwm_variant = {
154 .bits = 32,
155 .div_base = 0,
156 .has_tint_cstat = true,
157 .tclk_mask = (1 << 5),
158};
159
160void __init samsung_set_timer_source(unsigned int event, unsigned int source)
161{
162 s5pv210_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
163 s5pv210_pwm_variant.output_mask &= ~(BIT(event) | BIT(source));
164}
165
166void __init samsung_timer_init(void)
167{
168 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
169 IRQ_TIMER0_VIC, IRQ_TIMER1_VIC, IRQ_TIMER2_VIC,
170 IRQ_TIMER3_VIC, IRQ_TIMER4_VIC,
171 };
172
173 samsung_pwm_clocksource_init(S3C_VA_TIMER,
174 timer_irqs, &s5pv210_pwm_variant);
175}
176
151/* 177/*
152 * s5pv210_map_io 178 * s5pv210_map_io
153 * 179 *
@@ -165,6 +191,8 @@ void __init s5pv210_init_io(struct map_desc *mach_desc, int size)
165 s5p_init_cpu(S5P_VA_CHIPID); 191 s5p_init_cpu(S5P_VA_CHIPID);
166 192
167 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); 193 s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
194
195 samsung_pwm_set_platdata(&s5pv210_pwm_variant);
168} 196}
169 197
170void __init s5pv210_map_io(void) 198void __init s5pv210_map_io(void)
diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-s5pv210/include/mach/irqs.h
index e777e010ed2e..5e0de3a31f3d 100644
--- a/arch/arm/mach-s5pv210/include/mach/irqs.h
+++ b/arch/arm/mach-s5pv210/include/mach/irqs.h
@@ -118,8 +118,6 @@
118#define IRQ_MDNIE3 S5P_IRQ_VIC3(8) 118#define IRQ_MDNIE3 S5P_IRQ_VIC3(8)
119#define IRQ_VIC_END S5P_IRQ_VIC3(31) 119#define IRQ_VIC_END S5P_IRQ_VIC3(31)
120 120
121#define IRQ_TIMER_BASE (11)
122
123#define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) 121#define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0))
124#define S5P_EINT_BASE2 (IRQ_VIC_END + 1) 122#define S5P_EINT_BASE2 (IRQ_VIC_END + 1)
125 123
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h
index b7c8a1917ffc..763929aca52d 100644
--- a/arch/arm/mach-s5pv210/include/mach/map.h
+++ b/arch/arm/mach-s5pv210/include/mach/map.h
@@ -139,6 +139,7 @@
139#define SAMSUNG_PA_ADC S5PV210_PA_ADC 139#define SAMSUNG_PA_ADC S5PV210_PA_ADC
140#define SAMSUNG_PA_CFCON S5PV210_PA_CFCON 140#define SAMSUNG_PA_CFCON S5PV210_PA_CFCON
141#define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD 141#define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD
142#define SAMSUNG_PA_TIMER S5PV210_PA_TIMER
142 143
143/* UART */ 144/* UART */
144 145
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index d50b6f124465..6d72bb992e38 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -218,6 +218,7 @@ static struct platform_device *smdkv210_devices[] __initdata = {
218 &s3c_device_i2c0, 218 &s3c_device_i2c0,
219 &s3c_device_i2c1, 219 &s3c_device_i2c1,
220 &s3c_device_i2c2, 220 &s3c_device_i2c2,
221 &samsung_device_pwm,
221 &s3c_device_rtc, 222 &s3c_device_rtc,
222 &s3c_device_ts, 223 &s3c_device_ts,
223 &s3c_device_usb_hsotg, 224 &s3c_device_usb_hsotg,
@@ -316,11 +317,11 @@ static void __init smdkv210_machine_init(void)
316 317
317 s3c_fb_set_platdata(&smdkv210_lcd0_pdata); 318 s3c_fb_set_platdata(&smdkv210_lcd0_pdata);
318 319
319 samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data);
320
321 s3c_hsotg_set_platdata(&smdkv210_hsotg_pdata); 320 s3c_hsotg_set_platdata(&smdkv210_hsotg_pdata);
322 321
323 platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); 322 platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices));
323
324 samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data);
324} 325}
325 326
326MACHINE_START(SMDKV210, "SMDKV210") 327MACHINE_START(SMDKV210, "SMDKV210")
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c
index 2b68a67b6e95..3cf3f9c8ddd1 100644
--- a/arch/arm/mach-s5pv210/pm.c
+++ b/arch/arm/mach-s5pv210/pm.c
@@ -21,7 +21,6 @@
21 21
22#include <plat/cpu.h> 22#include <plat/cpu.h>
23#include <plat/pm.h> 23#include <plat/pm.h>
24#include <plat/regs-timer.h>
25 24
26#include <mach/regs-irq.h> 25#include <mach/regs-irq.h>
27#include <mach/regs-clock.h> 26#include <mach/regs-clock.h>
@@ -77,15 +76,6 @@ static struct sleep_save s5pv210_core_save[] = {
77 /* Clock ETC */ 76 /* Clock ETC */
78 SAVE_ITEM(S5P_CLK_OUT), 77 SAVE_ITEM(S5P_CLK_OUT),
79 SAVE_ITEM(S5P_MDNIE_SEL), 78 SAVE_ITEM(S5P_MDNIE_SEL),
80
81 /* PWM Register */
82 SAVE_ITEM(S3C2410_TCFG0),
83 SAVE_ITEM(S3C2410_TCFG1),
84 SAVE_ITEM(S3C64XX_TINT_CSTAT),
85 SAVE_ITEM(S3C2410_TCON),
86 SAVE_ITEM(S3C2410_TCNTB(0)),
87 SAVE_ITEM(S3C2410_TCMPB(0)),
88 SAVE_ITEM(S3C2410_TCNTO(0)),
89}; 79};
90 80
91static int s5pv210_cpu_suspend(unsigned long arg) 81static int s5pv210_cpu_suspend(unsigned long arg)
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index 5eb0caa6a7d0..1fbc39a14e25 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -20,7 +20,6 @@
20 20
21#include <linux/gpio.h> 21#include <linux/gpio.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/irqchip.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/pinctrl/machine.h> 24#include <linux/pinctrl/machine.h>
26#include <linux/platform_device.h> 25#include <linux/platform_device.h>
@@ -102,7 +101,6 @@ static const char *ape6evm_boards_compat_dt[] __initdata = {
102}; 101};
103 102
104DT_MACHINE_START(APE6EVM_DT, "ape6evm") 103DT_MACHINE_START(APE6EVM_DT, "ape6evm")
105 .init_irq = irqchip_init,
106 .init_time = shmobile_timer_init, 104 .init_time = shmobile_timer_init,
107 .init_machine = ape6evm_add_standard_devices, 105 .init_machine = ape6evm_add_standard_devices,
108 .dt_compat = ape6evm_boards_compat_dt, 106 .dt_compat = ape6evm_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 3a6ffa250fb1..4e3670a28a7c 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -678,15 +678,6 @@ static struct platform_device vcc_sdhi1 = {
678}; 678};
679 679
680/* SDHI0 */ 680/* SDHI0 */
681/*
682 * FIXME
683 *
684 * It use polling mode here, since
685 * CD (= Card Detect) pin is not connected to SDHI0_CD.
686 * We can use IRQ31 as card detect irq,
687 * but it needs chattering removal operation
688 */
689#define IRQ31 irq_pin(31)
690static struct sh_mobile_sdhi_info sdhi0_info = { 681static struct sh_mobile_sdhi_info sdhi0_info = {
691 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, 682 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
692 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, 683 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c
index 4368000e1127..15900f1f8af7 100644
--- a/arch/arm/mach-shmobile/board-kzm9d.c
+++ b/arch/arm/mach-shmobile/board-kzm9d.c
@@ -85,7 +85,7 @@ static const char *kzm9d_boards_compat_dt[] __initdata = {
85DT_MACHINE_START(KZM9D_DT, "kzm9d") 85DT_MACHINE_START(KZM9D_DT, "kzm9d")
86 .smp = smp_ops(emev2_smp_ops), 86 .smp = smp_ops(emev2_smp_ops),
87 .map_io = emev2_map_io, 87 .map_io = emev2_map_io,
88 .init_early = emev2_add_early_devices, 88 .init_early = emev2_init_delay,
89 .nr_irqs = NR_IRQS_LEGACY, 89 .nr_irqs = NR_IRQS_LEGACY,
90 .init_irq = emev2_init_irq, 90 .init_irq = emev2_init_irq,
91 .init_machine = kzm9d_add_standard_devices, 91 .init_machine = kzm9d_add_standard_devices,
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
index 44055fe8a45c..41092bb01ee5 100644
--- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
@@ -24,7 +24,6 @@
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/irq.h> 26#include <linux/irq.h>
27#include <linux/irqchip.h>
28#include <linux/input.h> 27#include <linux/input.h>
29#include <linux/of_platform.h> 28#include <linux/of_platform.h>
30#include <linux/pinctrl/machine.h> 29#include <linux/pinctrl/machine.h>
@@ -99,7 +98,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
99 .map_io = sh73a0_map_io, 98 .map_io = sh73a0_map_io,
100 .init_early = sh73a0_init_delay, 99 .init_early = sh73a0_init_delay,
101 .nr_irqs = NR_IRQS_LEGACY, 100 .nr_irqs = NR_IRQS_LEGACY,
102 .init_irq = irqchip_init,
103 .init_machine = kzm_init, 101 .init_machine = kzm_init,
104 .init_time = shmobile_timer_init, 102 .init_time = shmobile_timer_init,
105 .dt_compat = kzm9g_boards_compat_dt, 103 .dt_compat = kzm9g_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index 8d6bd5c5efb9..78d92d34665d 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -22,7 +22,6 @@
22#include <linux/gpio_keys.h> 22#include <linux/gpio_keys.h>
23#include <linux/input.h> 23#include <linux/input.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/irqchip.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
27#include <linux/leds.h> 26#include <linux/leds.h>
28#include <linux/pinctrl/machine.h> 27#include <linux/pinctrl/machine.h>
@@ -103,7 +102,6 @@ static const char *lager_boards_compat_dt[] __initdata = {
103}; 102};
104 103
105DT_MACHINE_START(LAGER_DT, "lager") 104DT_MACHINE_START(LAGER_DT, "lager")
106 .init_irq = irqchip_init,
107 .init_time = r8a7790_timer_init, 105 .init_time = r8a7790_timer_init,
108 .init_machine = lager_add_standard_devices, 106 .init_machine = lager_add_standard_devices,
109 .dt_compat = lager_boards_compat_dt, 107 .dt_compat = lager_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/clock-emev2.c b/arch/arm/mach-shmobile/clock-emev2.c
index 4710f1847bb7..56dd0cfcddc7 100644
--- a/arch/arm/mach-shmobile/clock-emev2.c
+++ b/arch/arm/mach-shmobile/clock-emev2.c
@@ -221,7 +221,7 @@ void __init emev2_clock_init(void)
221 smu_base = ioremap(EMEV2_SMU_BASE, PAGE_SIZE); 221 smu_base = ioremap(EMEV2_SMU_BASE, PAGE_SIZE);
222 BUG_ON(!smu_base); 222 BUG_ON(!smu_base);
223 223
224 /* setup STI timer to run on 37.768 kHz and deassert reset */ 224 /* setup STI timer to run on 32.768 kHz and deassert reset */
225 emev2_smu_write(0, STI_CLKSEL); 225 emev2_smu_write(0, STI_CLKSEL);
226 emev2_smu_write(1, STI_RSTCTRL); 226 emev2_smu_write(1, STI_RSTCTRL);
227 227
diff --git a/arch/arm/mach-shmobile/include/mach/dma.h b/arch/arm/mach-shmobile/include/mach/dma.h
deleted file mode 100644
index 40a8c178f10d..000000000000
--- a/arch/arm/mach-shmobile/include/mach/dma.h
+++ /dev/null
@@ -1 +0,0 @@
1/* empty */
diff --git a/arch/arm/mach-shmobile/include/mach/emev2.h b/arch/arm/mach-shmobile/include/mach/emev2.h
index ac3751705cab..3e0c0441c782 100644
--- a/arch/arm/mach-shmobile/include/mach/emev2.h
+++ b/arch/arm/mach-shmobile/include/mach/emev2.h
@@ -3,7 +3,7 @@
3 3
4extern void emev2_map_io(void); 4extern void emev2_map_io(void);
5extern void emev2_init_irq(void); 5extern void emev2_init_irq(void);
6extern void emev2_add_early_devices(void); 6extern void emev2_init_delay(void);
7extern void emev2_add_standard_devices(void); 7extern void emev2_add_standard_devices(void);
8extern void emev2_clock_init(void); 8extern void emev2_clock_init(void);
9extern void emev2_set_boot_vector(unsigned long value); 9extern void emev2_set_boot_vector(unsigned long value);
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
index a7c6d151cdd5..2866704e7afd 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
@@ -36,7 +36,6 @@ extern void r8a7778_add_vin_device(int id,
36 36
37extern void r8a7778_init_late(void); 37extern void r8a7778_init_late(void);
38extern void r8a7778_init_delay(void); 38extern void r8a7778_init_delay(void);
39extern void r8a7778_init_irq(void);
40extern void r8a7778_init_irq_dt(void); 39extern void r8a7778_init_irq_dt(void);
41extern void r8a7778_clock_init(void); 40extern void r8a7778_clock_init(void);
42extern void r8a7778_init_irq_extpin(int irlm); 41extern void r8a7778_init_irq_extpin(int irlm);
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index 1ccddd228112..e4b46930db52 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -20,7 +20,6 @@
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/irqchip.h>
24#include <linux/platform_device.h> 23#include <linux/platform_device.h>
25#include <linux/platform_data/gpio-em.h> 24#include <linux/platform_data/gpio-em.h>
26#include <linux/of_platform.h> 25#include <linux/of_platform.h>
@@ -63,102 +62,40 @@ void __init emev2_map_io(void)
63 62
64/* UART */ 63/* UART */
65static struct resource uart0_resources[] = { 64static struct resource uart0_resources[] = {
66 [0] = { 65 DEFINE_RES_MEM(0xe1020000, 0x38),
67 .start = 0xe1020000, 66 DEFINE_RES_IRQ(40),
68 .end = 0xe1020037,
69 .flags = IORESOURCE_MEM,
70 },
71 [1] = {
72 .start = 40,
73 .flags = IORESOURCE_IRQ,
74 }
75};
76
77static struct platform_device uart0_device = {
78 .name = "serial8250-em",
79 .id = 0,
80 .num_resources = ARRAY_SIZE(uart0_resources),
81 .resource = uart0_resources,
82}; 67};
83 68
84static struct resource uart1_resources[] = { 69static struct resource uart1_resources[] = {
85 [0] = { 70 DEFINE_RES_MEM(0xe1030000, 0x38),
86 .start = 0xe1030000, 71 DEFINE_RES_IRQ(41),
87 .end = 0xe1030037,
88 .flags = IORESOURCE_MEM,
89 },
90 [1] = {
91 .start = 41,
92 .flags = IORESOURCE_IRQ,
93 }
94};
95
96static struct platform_device uart1_device = {
97 .name = "serial8250-em",
98 .id = 1,
99 .num_resources = ARRAY_SIZE(uart1_resources),
100 .resource = uart1_resources,
101}; 72};
102 73
103static struct resource uart2_resources[] = { 74static struct resource uart2_resources[] = {
104 [0] = { 75 DEFINE_RES_MEM(0xe1040000, 0x38),
105 .start = 0xe1040000, 76 DEFINE_RES_IRQ(42),
106 .end = 0xe1040037,
107 .flags = IORESOURCE_MEM,
108 },
109 [1] = {
110 .start = 42,
111 .flags = IORESOURCE_IRQ,
112 }
113};
114
115static struct platform_device uart2_device = {
116 .name = "serial8250-em",
117 .id = 2,
118 .num_resources = ARRAY_SIZE(uart2_resources),
119 .resource = uart2_resources,
120}; 77};
121 78
122static struct resource uart3_resources[] = { 79static struct resource uart3_resources[] = {
123 [0] = { 80 DEFINE_RES_MEM(0xe1050000, 0x38),
124 .start = 0xe1050000, 81 DEFINE_RES_IRQ(43),
125 .end = 0xe1050037,
126 .flags = IORESOURCE_MEM,
127 },
128 [1] = {
129 .start = 43,
130 .flags = IORESOURCE_IRQ,
131 }
132}; 82};
133 83
134static struct platform_device uart3_device = { 84#define emev2_register_uart(idx) \
135 .name = "serial8250-em", 85 platform_device_register_simple("serial8250-em", idx, \
136 .id = 3, 86 uart##idx##_resources, \
137 .num_resources = ARRAY_SIZE(uart3_resources), 87 ARRAY_SIZE(uart##idx##_resources))
138 .resource = uart3_resources,
139};
140 88
141/* STI */ 89/* STI */
142static struct resource sti_resources[] = { 90static struct resource sti_resources[] = {
143 [0] = { 91 DEFINE_RES_MEM(0xe0180000, 0x54),
144 .name = "STI", 92 DEFINE_RES_IRQ(157),
145 .start = 0xe0180000,
146 .end = 0xe0180053,
147 .flags = IORESOURCE_MEM,
148 },
149 [1] = {
150 .start = 157,
151 .flags = IORESOURCE_IRQ,
152 },
153};
154
155static struct platform_device sti_device = {
156 .name = "em_sti",
157 .id = 0,
158 .resource = sti_resources,
159 .num_resources = ARRAY_SIZE(sti_resources),
160}; 93};
161 94
95#define emev2_register_sti() \
96 platform_device_register_simple("em_sti", 0, \
97 sti_resources, \
98 ARRAY_SIZE(sti_resources))
162 99
163/* GIO */ 100/* GIO */
164static struct gpio_em_config gio0_config = { 101static struct gpio_em_config gio0_config = {
@@ -168,36 +105,10 @@ static struct gpio_em_config gio0_config = {
168}; 105};
169 106
170static struct resource gio0_resources[] = { 107static struct resource gio0_resources[] = {
171 [0] = { 108 DEFINE_RES_MEM(0xe0050000, 0x2c),
172 .name = "GIO_000", 109 DEFINE_RES_MEM(0xe0050040, 0x20),
173 .start = 0xe0050000, 110 DEFINE_RES_IRQ(99),
174 .end = 0xe005002b, 111 DEFINE_RES_IRQ(100),
175 .flags = IORESOURCE_MEM,
176 },
177 [1] = {
178 .name = "GIO_000",
179 .start = 0xe0050040,
180 .end = 0xe005005f,
181 .flags = IORESOURCE_MEM,
182 },
183 [2] = {
184 .start = 99,
185 .flags = IORESOURCE_IRQ,
186 },
187 [3] = {
188 .start = 100,
189 .flags = IORESOURCE_IRQ,
190 },
191};
192
193static struct platform_device gio0_device = {
194 .name = "em_gio",
195 .id = 0,
196 .resource = gio0_resources,
197 .num_resources = ARRAY_SIZE(gio0_resources),
198 .dev = {
199 .platform_data = &gio0_config,
200 },
201}; 112};
202 113
203static struct gpio_em_config gio1_config = { 114static struct gpio_em_config gio1_config = {
@@ -207,36 +118,10 @@ static struct gpio_em_config gio1_config = {
207}; 118};
208 119
209static struct resource gio1_resources[] = { 120static struct resource gio1_resources[] = {
210 [0] = { 121 DEFINE_RES_MEM(0xe0050080, 0x2c),
211 .name = "GIO_032", 122 DEFINE_RES_MEM(0xe00500c0, 0x20),
212 .start = 0xe0050080, 123 DEFINE_RES_IRQ(101),
213 .end = 0xe00500ab, 124 DEFINE_RES_IRQ(102),
214 .flags = IORESOURCE_MEM,
215 },
216 [1] = {
217 .name = "GIO_032",
218 .start = 0xe00500c0,
219 .end = 0xe00500df,
220 .flags = IORESOURCE_MEM,
221 },
222 [2] = {
223 .start = 101,
224 .flags = IORESOURCE_IRQ,
225 },
226 [3] = {
227 .start = 102,
228 .flags = IORESOURCE_IRQ,
229 },
230};
231
232static struct platform_device gio1_device = {
233 .name = "em_gio",
234 .id = 1,
235 .resource = gio1_resources,
236 .num_resources = ARRAY_SIZE(gio1_resources),
237 .dev = {
238 .platform_data = &gio1_config,
239 },
240}; 125};
241 126
242static struct gpio_em_config gio2_config = { 127static struct gpio_em_config gio2_config = {
@@ -246,36 +131,10 @@ static struct gpio_em_config gio2_config = {
246}; 131};
247 132
248static struct resource gio2_resources[] = { 133static struct resource gio2_resources[] = {
249 [0] = { 134 DEFINE_RES_MEM(0xe0050100, 0x2c),
250 .name = "GIO_064", 135 DEFINE_RES_MEM(0xe0050140, 0x20),
251 .start = 0xe0050100, 136 DEFINE_RES_IRQ(103),
252 .end = 0xe005012b, 137 DEFINE_RES_IRQ(104),
253 .flags = IORESOURCE_MEM,
254 },
255 [1] = {
256 .name = "GIO_064",
257 .start = 0xe0050140,
258 .end = 0xe005015f,
259 .flags = IORESOURCE_MEM,
260 },
261 [2] = {
262 .start = 103,
263 .flags = IORESOURCE_IRQ,
264 },
265 [3] = {
266 .start = 104,
267 .flags = IORESOURCE_IRQ,
268 },
269};
270
271static struct platform_device gio2_device = {
272 .name = "em_gio",
273 .id = 2,
274 .resource = gio2_resources,
275 .num_resources = ARRAY_SIZE(gio2_resources),
276 .dev = {
277 .platform_data = &gio2_config,
278 },
279}; 138};
280 139
281static struct gpio_em_config gio3_config = { 140static struct gpio_em_config gio3_config = {
@@ -285,36 +144,10 @@ static struct gpio_em_config gio3_config = {
285}; 144};
286 145
287static struct resource gio3_resources[] = { 146static struct resource gio3_resources[] = {
288 [0] = { 147 DEFINE_RES_MEM(0xe0050180, 0x2c),
289 .name = "GIO_096", 148 DEFINE_RES_MEM(0xe00501c0, 0x20),
290 .start = 0xe0050180, 149 DEFINE_RES_IRQ(105),
291 .end = 0xe00501ab, 150 DEFINE_RES_IRQ(106),
292 .flags = IORESOURCE_MEM,
293 },
294 [1] = {
295 .name = "GIO_096",
296 .start = 0xe00501c0,
297 .end = 0xe00501df,
298 .flags = IORESOURCE_MEM,
299 },
300 [2] = {
301 .start = 105,
302 .flags = IORESOURCE_IRQ,
303 },
304 [3] = {
305 .start = 106,
306 .flags = IORESOURCE_IRQ,
307 },
308};
309
310static struct platform_device gio3_device = {
311 .name = "em_gio",
312 .id = 3,
313 .resource = gio3_resources,
314 .num_resources = ARRAY_SIZE(gio3_resources),
315 .dev = {
316 .platform_data = &gio3_config,
317 },
318}; 151};
319 152
320static struct gpio_em_config gio4_config = { 153static struct gpio_em_config gio4_config = {
@@ -324,102 +157,51 @@ static struct gpio_em_config gio4_config = {
324}; 157};
325 158
326static struct resource gio4_resources[] = { 159static struct resource gio4_resources[] = {
327 [0] = { 160 DEFINE_RES_MEM(0xe0050200, 0x2c),
328 .name = "GIO_128", 161 DEFINE_RES_MEM(0xe0050240, 0x20),
329 .start = 0xe0050200, 162 DEFINE_RES_IRQ(107),
330 .end = 0xe005022b, 163 DEFINE_RES_IRQ(108),
331 .flags = IORESOURCE_MEM,
332 },
333 [1] = {
334 .name = "GIO_128",
335 .start = 0xe0050240,
336 .end = 0xe005025f,
337 .flags = IORESOURCE_MEM,
338 },
339 [2] = {
340 .start = 107,
341 .flags = IORESOURCE_IRQ,
342 },
343 [3] = {
344 .start = 108,
345 .flags = IORESOURCE_IRQ,
346 },
347}; 164};
348 165
349static struct platform_device gio4_device = { 166#define emev2_register_gio(idx) \
350 .name = "em_gio", 167 platform_device_register_resndata(&platform_bus, "em_gio", \
351 .id = 4, 168 idx, gio##idx##_resources, \
352 .resource = gio4_resources, 169 ARRAY_SIZE(gio##idx##_resources), \
353 .num_resources = ARRAY_SIZE(gio4_resources), 170 &gio##idx##_config, \
354 .dev = { 171 sizeof(struct gpio_em_config))
355 .platform_data = &gio4_config,
356 },
357};
358 172
359static struct resource pmu_resources[] = { 173static struct resource pmu_resources[] = {
360 [0] = { 174 DEFINE_RES_IRQ(152),
361 .start = 152, 175 DEFINE_RES_IRQ(153),
362 .end = 152,
363 .flags = IORESOURCE_IRQ,
364 },
365 [1] = {
366 .start = 153,
367 .end = 153,
368 .flags = IORESOURCE_IRQ,
369 },
370};
371
372static struct platform_device pmu_device = {
373 .name = "arm-pmu",
374 .id = -1,
375 .num_resources = ARRAY_SIZE(pmu_resources),
376 .resource = pmu_resources,
377};
378
379static struct platform_device *emev2_early_devices[] __initdata = {
380 &uart0_device,
381 &uart1_device,
382 &uart2_device,
383 &uart3_device,
384}; 176};
385 177
386static struct platform_device *emev2_late_devices[] __initdata = { 178#define emev2_register_pmu() \
387 &sti_device, 179 platform_device_register_simple("arm-pmu", -1, \
388 &gio0_device, 180 pmu_resources, \
389 &gio1_device, 181 ARRAY_SIZE(pmu_resources))
390 &gio2_device,
391 &gio3_device,
392 &gio4_device,
393 &pmu_device,
394};
395 182
396void __init emev2_add_standard_devices(void) 183void __init emev2_add_standard_devices(void)
397{ 184{
398 emev2_clock_init(); 185 emev2_clock_init();
399 186
400 platform_add_devices(emev2_early_devices, 187 emev2_register_uart(0);
401 ARRAY_SIZE(emev2_early_devices)); 188 emev2_register_uart(1);
402 189 emev2_register_uart(2);
403 platform_add_devices(emev2_late_devices, 190 emev2_register_uart(3);
404 ARRAY_SIZE(emev2_late_devices)); 191 emev2_register_sti();
192 emev2_register_gio(0);
193 emev2_register_gio(1);
194 emev2_register_gio(2);
195 emev2_register_gio(3);
196 emev2_register_gio(4);
197 emev2_register_pmu();
405} 198}
406 199
407static void __init emev2_init_delay(void) 200void __init emev2_init_delay(void)
408{ 201{
409 shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ 202 shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */
410} 203}
411 204
412void __init emev2_add_early_devices(void)
413{
414 emev2_init_delay();
415
416 early_platform_add_devices(emev2_early_devices,
417 ARRAY_SIZE(emev2_early_devices));
418
419 /* setup early console here as well */
420 shmobile_setup_console();
421}
422
423void __init emev2_init_irq(void) 205void __init emev2_init_irq(void)
424{ 206{
425 void __iomem *gic_dist_base; 207 void __iomem *gic_dist_base;
@@ -435,15 +217,6 @@ void __init emev2_init_irq(void)
435} 217}
436 218
437#ifdef CONFIG_USE_OF 219#ifdef CONFIG_USE_OF
438static const struct of_dev_auxdata emev2_auxdata_lookup[] __initconst = {
439 { }
440};
441
442static void __init emev2_add_standard_devices_dt(void)
443{
444 of_platform_populate(NULL, of_default_bus_match_table,
445 emev2_auxdata_lookup, NULL);
446}
447 220
448static const char *emev2_boards_compat_dt[] __initdata = { 221static const char *emev2_boards_compat_dt[] __initdata = {
449 "renesas,emev2", 222 "renesas,emev2",
@@ -454,8 +227,6 @@ DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
454 .smp = smp_ops(emev2_smp_ops), 227 .smp = smp_ops(emev2_smp_ops),
455 .init_early = emev2_init_delay, 228 .init_early = emev2_init_delay,
456 .nr_irqs = NR_IRQS_LEGACY, 229 .nr_irqs = NR_IRQS_LEGACY,
457 .init_irq = irqchip_init,
458 .init_machine = emev2_add_standard_devices_dt,
459 .dt_compat = emev2_boards_compat_dt, 230 .dt_compat = emev2_boards_compat_dt,
460MACHINE_END 231MACHINE_END
461 232
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index 7f45c2edbca9..a8c4e41bf27a 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -18,7 +18,6 @@
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */ 19 */
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/irqchip.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/of_platform.h> 22#include <linux/of_platform.h>
24#include <linux/platform_data/irq-renesas-irqc.h> 23#include <linux/platform_data/irq-renesas-irqc.h>
@@ -194,7 +193,6 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = {
194}; 193};
195 194
196DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") 195DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)")
197 .init_irq = irqchip_init,
198 .init_machine = r8a73a4_add_standard_devices_dt, 196 .init_machine = r8a73a4_add_standard_devices_dt,
199 .init_time = shmobile_timer_init, 197 .init_time = shmobile_timer_init,
200 .dt_compat = r8a73a4_boards_compat_dt, 198 .dt_compat = r8a73a4_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 00c5a707238b..ac29c2ee011f 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -986,16 +986,22 @@ void __init r8a7740_add_early_devices(void)
986 986
987#ifdef CONFIG_USE_OF 987#ifdef CONFIG_USE_OF
988 988
989static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = { 989void __init r8a7740_add_early_devices_dt(void)
990 { } 990{
991}; 991 shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
992
993 early_platform_add_devices(r8a7740_early_devices,
994 ARRAY_SIZE(r8a7740_early_devices));
995
996 /* setup early console here as well */
997 shmobile_setup_console();
998}
992 999
993void __init r8a7740_add_standard_devices_dt(void) 1000void __init r8a7740_add_standard_devices_dt(void)
994{ 1001{
995 platform_add_devices(r8a7740_devices_dt, 1002 platform_add_devices(r8a7740_devices_dt,
996 ARRAY_SIZE(r8a7740_devices_dt)); 1003 ARRAY_SIZE(r8a7740_devices_dt));
997 of_platform_populate(NULL, of_default_bus_match_table, 1004 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
998 r8a7740_auxdata_lookup, NULL);
999} 1005}
1000 1006
1001void __init r8a7740_init_delay(void) 1007void __init r8a7740_init_delay(void)
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 0174f059eac3..203becfc6e31 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -53,7 +53,7 @@
53 .irqs = SCIx_IRQ_MUXED(irq), \ 53 .irqs = SCIx_IRQ_MUXED(irq), \
54} 54}
55 55
56static struct plat_sci_port scif_platform_data[] = { 56static struct plat_sci_port scif_platform_data[] __initdata = {
57 SCIF_INFO(0xffe40000, gic_iid(0x66)), 57 SCIF_INFO(0xffe40000, gic_iid(0x66)),
58 SCIF_INFO(0xffe41000, gic_iid(0x67)), 58 SCIF_INFO(0xffe41000, gic_iid(0x67)),
59 SCIF_INFO(0xffe42000, gic_iid(0x68)), 59 SCIF_INFO(0xffe42000, gic_iid(0x68)),
@@ -63,24 +63,24 @@ static struct plat_sci_port scif_platform_data[] = {
63}; 63};
64 64
65/* TMU */ 65/* TMU */
66static struct resource sh_tmu0_resources[] = { 66static struct resource sh_tmu0_resources[] __initdata = {
67 DEFINE_RES_MEM(0xffd80008, 12), 67 DEFINE_RES_MEM(0xffd80008, 12),
68 DEFINE_RES_IRQ(gic_iid(0x40)), 68 DEFINE_RES_IRQ(gic_iid(0x40)),
69}; 69};
70 70
71static struct sh_timer_config sh_tmu0_platform_data = { 71static struct sh_timer_config sh_tmu0_platform_data __initdata = {
72 .name = "TMU00", 72 .name = "TMU00",
73 .channel_offset = 0x4, 73 .channel_offset = 0x4,
74 .timer_bit = 0, 74 .timer_bit = 0,
75 .clockevent_rating = 200, 75 .clockevent_rating = 200,
76}; 76};
77 77
78static struct resource sh_tmu1_resources[] = { 78static struct resource sh_tmu1_resources[] __initdata = {
79 DEFINE_RES_MEM(0xffd80014, 12), 79 DEFINE_RES_MEM(0xffd80014, 12),
80 DEFINE_RES_IRQ(gic_iid(0x41)), 80 DEFINE_RES_IRQ(gic_iid(0x41)),
81}; 81};
82 82
83static struct sh_timer_config sh_tmu1_platform_data = { 83static struct sh_timer_config sh_tmu1_platform_data __initdata = {
84 .name = "TMU01", 84 .name = "TMU01",
85 .channel_offset = 0x10, 85 .channel_offset = 0x10,
86 .timer_bit = 1, 86 .timer_bit = 1,
@@ -189,7 +189,7 @@ USB_PLATFORM_INFO(ehci);
189USB_PLATFORM_INFO(ohci); 189USB_PLATFORM_INFO(ohci);
190 190
191/* Ether */ 191/* Ether */
192static struct resource ether_resources[] = { 192static struct resource ether_resources[] __initdata = {
193 DEFINE_RES_MEM(0xfde00000, 0x400), 193 DEFINE_RES_MEM(0xfde00000, 0x400),
194 DEFINE_RES_IRQ(gic_iid(0x89)), 194 DEFINE_RES_IRQ(gic_iid(0x89)),
195}; 195};
@@ -203,17 +203,17 @@ void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata)
203} 203}
204 204
205/* PFC/GPIO */ 205/* PFC/GPIO */
206static struct resource pfc_resources[] = { 206static struct resource pfc_resources[] __initdata = {
207 DEFINE_RES_MEM(0xfffc0000, 0x118), 207 DEFINE_RES_MEM(0xfffc0000, 0x118),
208}; 208};
209 209
210#define R8A7778_GPIO(idx) \ 210#define R8A7778_GPIO(idx) \
211static struct resource r8a7778_gpio##idx##_resources[] = { \ 211static struct resource r8a7778_gpio##idx##_resources[] __initdata = { \
212 DEFINE_RES_MEM(0xffc40000 + 0x1000 * (idx), 0x30), \ 212 DEFINE_RES_MEM(0xffc40000 + 0x1000 * (idx), 0x30), \
213 DEFINE_RES_IRQ(gic_iid(0x87)), \ 213 DEFINE_RES_IRQ(gic_iid(0x87)), \
214}; \ 214}; \
215 \ 215 \
216static struct gpio_rcar_config r8a7778_gpio##idx##_platform_data = { \ 216static struct gpio_rcar_config r8a7778_gpio##idx##_platform_data __initdata = { \
217 .gpio_base = 32 * (idx), \ 217 .gpio_base = 32 * (idx), \
218 .irq_base = GPIO_IRQ_BASE(idx), \ 218 .irq_base = GPIO_IRQ_BASE(idx), \
219 .number_of_pins = 32, \ 219 .number_of_pins = 32, \
@@ -249,7 +249,7 @@ void __init r8a7778_pinmux_init(void)
249}; 249};
250 250
251/* SDHI */ 251/* SDHI */
252static struct resource sdhi_resources[] = { 252static struct resource sdhi_resources[] __initdata = {
253 /* SDHI0 */ 253 /* SDHI0 */
254 DEFINE_RES_MEM(0xFFE4C000, 0x100), 254 DEFINE_RES_MEM(0xFFE4C000, 0x100),
255 DEFINE_RES_IRQ(gic_iid(0x77)), 255 DEFINE_RES_IRQ(gic_iid(0x77)),
@@ -399,12 +399,12 @@ void __init r8a7778_init_late(void)
399 platform_device_register_full(&ohci_info); 399 platform_device_register_full(&ohci_info);
400} 400}
401 401
402static struct renesas_intc_irqpin_config irqpin_platform_data = { 402static struct renesas_intc_irqpin_config irqpin_platform_data __initdata = {
403 .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ 403 .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */
404 .sense_bitfield_width = 2, 404 .sense_bitfield_width = 2,
405}; 405};
406 406
407static struct resource irqpin_resources[] = { 407static struct resource irqpin_resources[] __initdata = {
408 DEFINE_RES_MEM(0xfe78001c, 4), /* ICR1 */ 408 DEFINE_RES_MEM(0xfe78001c, 4), /* ICR1 */
409 DEFINE_RES_MEM(0xfe780010, 4), /* INTPRI */ 409 DEFINE_RES_MEM(0xfe780010, 4), /* INTPRI */
410 DEFINE_RES_MEM(0xfe780024, 4), /* INTREQ */ 410 DEFINE_RES_MEM(0xfe780024, 4), /* INTREQ */
@@ -442,17 +442,25 @@ void __init r8a7778_init_irq_extpin(int irlm)
442 &irqpin_platform_data, sizeof(irqpin_platform_data)); 442 &irqpin_platform_data, sizeof(irqpin_platform_data));
443} 443}
444 444
445void __init r8a7778_init_delay(void)
446{
447 shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
448}
449
450#ifdef CONFIG_USE_OF
445#define INT2SMSKCR0 0x82288 /* 0xfe782288 */ 451#define INT2SMSKCR0 0x82288 /* 0xfe782288 */
446#define INT2SMSKCR1 0x8228c /* 0xfe78228c */ 452#define INT2SMSKCR1 0x8228c /* 0xfe78228c */
447 453
448#define INT2NTSR0 0x00018 /* 0xfe700018 */ 454#define INT2NTSR0 0x00018 /* 0xfe700018 */
449#define INT2NTSR1 0x0002c /* 0xfe70002c */ 455#define INT2NTSR1 0x0002c /* 0xfe70002c */
450static void __init r8a7778_init_irq_common(void) 456void __init r8a7778_init_irq_dt(void)
451{ 457{
452 void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000); 458 void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000);
453 459
454 BUG_ON(!base); 460 BUG_ON(!base);
455 461
462 irqchip_init();
463
456 /* route all interrupts to ARM */ 464 /* route all interrupts to ARM */
457 __raw_writel(0x73ffffff, base + INT2NTSR0); 465 __raw_writel(0x73ffffff, base + INT2NTSR0);
458 __raw_writel(0xffffffff, base + INT2NTSR1); 466 __raw_writel(0xffffffff, base + INT2NTSR1);
@@ -464,43 +472,6 @@ static void __init r8a7778_init_irq_common(void)
464 iounmap(base); 472 iounmap(base);
465} 473}
466 474
467void __init r8a7778_init_irq(void)
468{
469 void __iomem *gic_dist_base;
470 void __iomem *gic_cpu_base;
471
472 gic_dist_base = ioremap_nocache(0xfe438000, PAGE_SIZE);
473 gic_cpu_base = ioremap_nocache(0xfe430000, PAGE_SIZE);
474 BUG_ON(!gic_dist_base || !gic_cpu_base);
475
476 /* use GIC to handle interrupts */
477 gic_init(0, 29, gic_dist_base, gic_cpu_base);
478
479 r8a7778_init_irq_common();
480}
481
482void __init r8a7778_init_delay(void)
483{
484 shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
485}
486
487#ifdef CONFIG_USE_OF
488void __init r8a7778_init_irq_dt(void)
489{
490 irqchip_init();
491 r8a7778_init_irq_common();
492}
493
494static const struct of_dev_auxdata r8a7778_auxdata_lookup[] __initconst = {
495 {},
496};
497
498void __init r8a7778_add_standard_devices_dt(void)
499{
500 of_platform_populate(NULL, of_default_bus_match_table,
501 r8a7778_auxdata_lookup, NULL);
502}
503
504static const char *r8a7778_compat_dt[] __initdata = { 475static const char *r8a7778_compat_dt[] __initdata = {
505 "renesas,r8a7778", 476 "renesas,r8a7778",
506 NULL, 477 NULL,
@@ -509,7 +480,6 @@ static const char *r8a7778_compat_dt[] __initdata = {
509DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") 480DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
510 .init_early = r8a7778_init_delay, 481 .init_early = r8a7778_init_delay,
511 .init_irq = r8a7778_init_irq_dt, 482 .init_irq = r8a7778_init_irq_dt,
512 .init_machine = r8a7778_add_standard_devices_dt,
513 .init_time = shmobile_timer_init, 483 .init_time = shmobile_timer_init,
514 .dt_compat = r8a7778_compat_dt, 484 .dt_compat = r8a7778_compat_dt,
515 .init_late = r8a7778_init_late, 485 .init_late = r8a7778_init_late,
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 3d8928895503..41bab625341e 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -702,10 +702,6 @@ void __init r8a7779_init_delay(void)
702 shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ 702 shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */
703} 703}
704 704
705static const struct of_dev_auxdata r8a7779_auxdata_lookup[] __initconst = {
706 {},
707};
708
709void __init r8a7779_add_standard_devices_dt(void) 705void __init r8a7779_add_standard_devices_dt(void)
710{ 706{
711 /* clocks are setup late during boot in the case of DT */ 707 /* clocks are setup late during boot in the case of DT */
@@ -713,8 +709,7 @@ void __init r8a7779_add_standard_devices_dt(void)
713 709
714 platform_add_devices(r8a7779_devices_dt, 710 platform_add_devices(r8a7779_devices_dt,
715 ARRAY_SIZE(r8a7779_devices_dt)); 711 ARRAY_SIZE(r8a7779_devices_dt));
716 of_platform_populate(NULL, of_default_bus_match_table, 712 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
717 r8a7779_auxdata_lookup, NULL);
718} 713}
719 714
720static const char *r8a7779_compat_dt[] __initdata = { 715static const char *r8a7779_compat_dt[] __initdata = {
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index 28f94752b8ff..b7e78b9a7fdf 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -19,7 +19,6 @@
19 */ 19 */
20 20
21#include <linux/irq.h> 21#include <linux/irq.h>
22#include <linux/irqchip.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/of_platform.h> 23#include <linux/of_platform.h>
25#include <linux/serial_sci.h> 24#include <linux/serial_sci.h>
@@ -177,10 +176,6 @@ void __init r8a7790_timer_init(void)
177} 176}
178 177
179#ifdef CONFIG_USE_OF 178#ifdef CONFIG_USE_OF
180void __init r8a7790_add_standard_devices_dt(void)
181{
182 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
183}
184 179
185static const char *r8a7790_boards_compat_dt[] __initdata = { 180static const char *r8a7790_boards_compat_dt[] __initdata = {
186 "renesas,r8a7790", 181 "renesas,r8a7790",
@@ -188,8 +183,6 @@ static const char *r8a7790_boards_compat_dt[] __initdata = {
188}; 183};
189 184
190DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") 185DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
191 .init_irq = irqchip_init,
192 .init_machine = r8a7790_add_standard_devices_dt,
193 .init_time = r8a7790_timer_init, 186 .init_time = r8a7790_timer_init,
194 .dt_compat = r8a7790_boards_compat_dt, 187 .dt_compat = r8a7790_boards_compat_dt,
195MACHINE_END 188MACHINE_END
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index 5502d624aca6..13e6fdbde0a5 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -1147,10 +1147,6 @@ void __init sh7372_add_early_devices_dt(void)
1147 shmobile_setup_console(); 1147 shmobile_setup_console();
1148} 1148}
1149 1149
1150static const struct of_dev_auxdata sh7372_auxdata_lookup[] __initconst = {
1151 { }
1152};
1153
1154void __init sh7372_add_standard_devices_dt(void) 1150void __init sh7372_add_standard_devices_dt(void)
1155{ 1151{
1156 /* clocks are setup late during boot in the case of DT */ 1152 /* clocks are setup late during boot in the case of DT */
@@ -1159,8 +1155,7 @@ void __init sh7372_add_standard_devices_dt(void)
1159 platform_add_devices(sh7372_early_devices, 1155 platform_add_devices(sh7372_early_devices,
1160 ARRAY_SIZE(sh7372_early_devices)); 1156 ARRAY_SIZE(sh7372_early_devices));
1161 1157
1162 of_platform_populate(NULL, of_default_bus_match_table, 1158 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
1163 sh7372_auxdata_lookup, NULL);
1164} 1159}
1165 1160
1166static const char *sh7372_boards_compat_dt[] __initdata = { 1161static const char *sh7372_boards_compat_dt[] __initdata = {
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 96e7ca1e4e11..516c2391b47a 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -22,7 +22,6 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/irqchip.h>
26#include <linux/platform_device.h> 25#include <linux/platform_device.h>
27#include <linux/of_platform.h> 26#include <linux/of_platform.h>
28#include <linux/delay.h> 27#include <linux/delay.h>
@@ -61,29 +60,16 @@ void __init sh73a0_map_io(void)
61 iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); 60 iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
62} 61}
63 62
64static struct resource sh73a0_pfc_resources[] = { 63/* PFC */
65 [0] = { 64static struct resource pfc_resources[] __initdata = {
66 .start = 0xe6050000, 65 DEFINE_RES_MEM(0xe6050000, 0x8000),
67 .end = 0xe6057fff, 66 DEFINE_RES_MEM(0xe605801c, 0x000c),
68 .flags = IORESOURCE_MEM,
69 },
70 [1] = {
71 .start = 0xe605801c,
72 .end = 0xe6058027,
73 .flags = IORESOURCE_MEM,
74 }
75};
76
77static struct platform_device sh73a0_pfc_device = {
78 .name = "pfc-sh73a0",
79 .id = -1,
80 .resource = sh73a0_pfc_resources,
81 .num_resources = ARRAY_SIZE(sh73a0_pfc_resources),
82}; 67};
83 68
84void __init sh73a0_pinmux_init(void) 69void __init sh73a0_pinmux_init(void)
85{ 70{
86 platform_device_register(&sh73a0_pfc_device); 71 platform_device_register_simple("pfc-sh73a0", -1, pfc_resources,
72 ARRAY_SIZE(pfc_resources));
87} 73}
88 74
89static struct plat_sci_port scif0_platform_data = { 75static struct plat_sci_port scif0_platform_data = {
@@ -958,10 +944,6 @@ void __init sh73a0_add_early_devices(void)
958 944
959#ifdef CONFIG_USE_OF 945#ifdef CONFIG_USE_OF
960 946
961static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = {
962 {},
963};
964
965void __init sh73a0_add_standard_devices_dt(void) 947void __init sh73a0_add_standard_devices_dt(void)
966{ 948{
967 struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, }; 949 struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, };
@@ -971,8 +953,7 @@ void __init sh73a0_add_standard_devices_dt(void)
971 953
972 platform_add_devices(sh73a0_devices_dt, 954 platform_add_devices(sh73a0_devices_dt,
973 ARRAY_SIZE(sh73a0_devices_dt)); 955 ARRAY_SIZE(sh73a0_devices_dt));
974 of_platform_populate(NULL, of_default_bus_match_table, 956 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
975 sh73a0_auxdata_lookup, NULL);
976 957
977 /* Instantiate cpufreq-cpu0 */ 958 /* Instantiate cpufreq-cpu0 */
978 platform_device_register_full(&devinfo); 959 platform_device_register_full(&devinfo);
@@ -988,7 +969,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
988 .map_io = sh73a0_map_io, 969 .map_io = sh73a0_map_io,
989 .init_early = sh73a0_init_delay, 970 .init_early = sh73a0_init_delay,
990 .nr_irqs = NR_IRQS_LEGACY, 971 .nr_irqs = NR_IRQS_LEGACY,
991 .init_irq = irqchip_init,
992 .init_machine = sh73a0_add_standard_devices_dt, 972 .init_machine = sh73a0_add_standard_devices_dt,
993 .dt_compat = sh73a0_boards_compat_dt, 973 .dt_compat = sh73a0_boards_compat_dt,
994MACHINE_END 974MACHINE_END
diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig
index 442917eedff3..df0d59afeb40 100644
--- a/arch/arm/mach-spear/Kconfig
+++ b/arch/arm/mach-spear/Kconfig
@@ -23,7 +23,7 @@ config ARCH_SPEAR13XX
23 select CPU_V7 23 select CPU_V7
24 select GPIO_SPEAR_SPICS 24 select GPIO_SPEAR_SPICS
25 select HAVE_ARM_SCU if SMP 25 select HAVE_ARM_SCU if SMP
26 select HAVE_ARM_TWD if LOCAL_TIMERS 26 select HAVE_ARM_TWD if SMP
27 select HAVE_SMP 27 select HAVE_SMP
28 select MIGHT_HAVE_CACHE_L2X0 28 select MIGHT_HAVE_CACHE_L2X0
29 select PINCTRL 29 select PINCTRL
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index ef3a8da49b2d..59925cc896fb 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -8,7 +8,7 @@ config ARCH_TEGRA
8 select COMMON_CLK 8 select COMMON_CLK
9 select GENERIC_CLOCKEVENTS 9 select GENERIC_CLOCKEVENTS
10 select HAVE_ARM_SCU if SMP 10 select HAVE_ARM_SCU if SMP
11 select HAVE_ARM_TWD if LOCAL_TIMERS 11 select HAVE_ARM_TWD if SMP
12 select HAVE_CLK 12 select HAVE_CLK
13 select HAVE_SMP 13 select HAVE_SMP
14 select MIGHT_HAVE_CACHE_L2X0 14 select MIGHT_HAVE_CACHE_L2X0
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index b19b07204aaf..99a28d628297 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -8,7 +8,7 @@ config ARCH_U8500
8 select CPU_V7 8 select CPU_V7
9 select GENERIC_CLOCKEVENTS 9 select GENERIC_CLOCKEVENTS
10 select HAVE_ARM_SCU if SMP 10 select HAVE_ARM_SCU if SMP
11 select HAVE_ARM_TWD if LOCAL_TIMERS 11 select HAVE_ARM_TWD if SMP
12 select HAVE_SMP 12 select HAVE_SMP
13 select MIGHT_HAVE_CACHE_L2X0 13 select MIGHT_HAVE_CACHE_L2X0
14 help 14 help
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index b8bbabec6310..83c8677bb181 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -10,7 +10,7 @@ config ARCH_VEXPRESS
10 select CPU_V7 10 select CPU_V7
11 select GENERIC_CLOCKEVENTS 11 select GENERIC_CLOCKEVENTS
12 select HAVE_ARM_SCU if SMP 12 select HAVE_ARM_SCU if SMP
13 select HAVE_ARM_TWD if LOCAL_TIMERS 13 select HAVE_ARM_TWD if SMP
14 select HAVE_CLK 14 select HAVE_CLK
15 select HAVE_PATA_PLATFORM 15 select HAVE_PATA_PLATFORM
16 select HAVE_SMP 16 select HAVE_SMP
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index c1d61f281e68..04f8a4a6e755 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -6,7 +6,7 @@ config ARCH_ZYNQ
6 select CPU_V7 6 select CPU_V7
7 select GENERIC_CLOCKEVENTS 7 select GENERIC_CLOCKEVENTS
8 select HAVE_ARM_SCU if SMP 8 select HAVE_ARM_SCU if SMP
9 select HAVE_ARM_TWD if LOCAL_TIMERS 9 select HAVE_ARM_TWD if SMP
10 select ICST 10 select ICST
11 select MIGHT_HAVE_CACHE_L2X0 11 select MIGHT_HAVE_CACHE_L2X0
12 select USE_OF 12 select USE_OF
diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c
index c89672bd1de2..5052c70326e4 100644
--- a/arch/arm/mach-zynq/hotplug.c
+++ b/arch/arm/mach-zynq/hotplug.c
@@ -40,44 +40,6 @@ static inline void zynq_cpu_enter_lowpower(void)
40 : "cc"); 40 : "cc");
41} 41}
42 42
43static inline void zynq_cpu_leave_lowpower(void)
44{
45 unsigned int v;
46
47 asm volatile(
48 " mrc p15, 0, %0, c1, c0, 0\n"
49 " orr %0, %0, %1\n"
50 " mcr p15, 0, %0, c1, c0, 0\n"
51 " mrc p15, 0, %0, c1, c0, 1\n"
52 " orr %0, %0, #0x40\n"
53 " mcr p15, 0, %0, c1, c0, 1\n"
54 : "=&r" (v)
55 : "Ir" (CR_C)
56 : "cc");
57}
58
59static inline void zynq_platform_do_lowpower(unsigned int cpu, int *spurious)
60{
61 /*
62 * there is no power-control hardware on this platform, so all
63 * we can do is put the core into WFI; this is safe as the calling
64 * code will have already disabled interrupts
65 */
66 for (;;) {
67 dsb();
68 wfi();
69
70 /*
71 * Getting here, means that we have come out of WFI without
72 * having been woken up - this shouldn't happen
73 *
74 * Just note it happening - when we're woken, we can report
75 * its occurrence.
76 */
77 (*spurious)++;
78 }
79}
80
81/* 43/*
82 * platform-specific code to shutdown a CPU 44 * platform-specific code to shutdown a CPU
83 * 45 *
@@ -85,20 +47,13 @@ static inline void zynq_platform_do_lowpower(unsigned int cpu, int *spurious)
85 */ 47 */
86void zynq_platform_cpu_die(unsigned int cpu) 48void zynq_platform_cpu_die(unsigned int cpu)
87{ 49{
88 int spurious = 0;
89
90 /*
91 * we're ready for shutdown now, so do it
92 */
93 zynq_cpu_enter_lowpower(); 50 zynq_cpu_enter_lowpower();
94 zynq_platform_do_lowpower(cpu, &spurious);
95 51
96 /* 52 /*
97 * bring this CPU back into the world of cache 53 * there is no power-control hardware on this platform, so all
98 * coherency, and then restore interrupts 54 * we can do is put the core into WFI; this is safe as the calling
55 * code will have already disabled interrupts
99 */ 56 */
100 zynq_cpu_leave_lowpower(); 57 for (;;)
101 58 cpu_do_idle();
102 if (spurious)
103 pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
104} 59}
diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c
index 50d008d8f87f..1836d5a34606 100644
--- a/arch/arm/mach-zynq/slcr.c
+++ b/arch/arm/mach-zynq/slcr.c
@@ -14,32 +14,21 @@
14 * 02139, USA. 14 * 02139, USA.
15 */ 15 */
16 16
17#include <linux/export.h>
18#include <linux/io.h> 17#include <linux/io.h>
19#include <linux/fs.h>
20#include <linux/interrupt.h>
21#include <linux/init.h>
22#include <linux/kernel.h>
23#include <linux/module.h>
24#include <linux/of_address.h> 18#include <linux/of_address.h>
25#include <linux/uaccess.h>
26#include <linux/platform_device.h>
27#include <linux/slab.h>
28#include <linux/string.h>
29#include <linux/clk/zynq.h> 19#include <linux/clk/zynq.h>
30#include "common.h" 20#include "common.h"
31 21
32#define SLCR_UNLOCK_MAGIC 0xDF0D 22/* register offsets */
33#define SLCR_UNLOCK 0x8 /* SCLR unlock register */ 23#define SLCR_UNLOCK_OFFSET 0x8 /* SCLR unlock register */
34
35#define SLCR_PS_RST_CTRL_OFFSET 0x200 /* PS Software Reset Control */ 24#define SLCR_PS_RST_CTRL_OFFSET 0x200 /* PS Software Reset Control */
25#define SLCR_A9_CPU_RST_CTRL_OFFSET 0x244 /* CPU Software Reset Control */
26#define SLCR_REBOOT_STATUS_OFFSET 0x258 /* PS Reboot Status */
36 27
28#define SLCR_UNLOCK_MAGIC 0xDF0D
37#define SLCR_A9_CPU_CLKSTOP 0x10 29#define SLCR_A9_CPU_CLKSTOP 0x10
38#define SLCR_A9_CPU_RST 0x1 30#define SLCR_A9_CPU_RST 0x1
39 31
40#define SLCR_A9_CPU_RST_CTRL 0x244 /* CPU Software Reset Control */
41#define SLCR_REBOOT_STATUS 0x258 /* PS Reboot Status */
42
43void __iomem *zynq_slcr_base; 32void __iomem *zynq_slcr_base;
44 33
45/** 34/**
@@ -54,15 +43,15 @@ void zynq_slcr_system_reset(void)
54 * Note that this seems to require raw i/o 43 * Note that this seems to require raw i/o
55 * functions or there's a lockup? 44 * functions or there's a lockup?
56 */ 45 */
57 writel(SLCR_UNLOCK_MAGIC, zynq_slcr_base + SLCR_UNLOCK); 46 writel(SLCR_UNLOCK_MAGIC, zynq_slcr_base + SLCR_UNLOCK_OFFSET);
58 47
59 /* 48 /*
60 * Clear 0x0F000000 bits of reboot status register to workaround 49 * Clear 0x0F000000 bits of reboot status register to workaround
61 * the FSBL not loading the bitstream after soft-reboot 50 * the FSBL not loading the bitstream after soft-reboot
62 * This is a temporary solution until we know more. 51 * This is a temporary solution until we know more.
63 */ 52 */
64 reboot = readl(zynq_slcr_base + SLCR_REBOOT_STATUS); 53 reboot = readl(zynq_slcr_base + SLCR_REBOOT_STATUS_OFFSET);
65 writel(reboot & 0xF0FFFFFF, zynq_slcr_base + SLCR_REBOOT_STATUS); 54 writel(reboot & 0xF0FFFFFF, zynq_slcr_base + SLCR_REBOOT_STATUS_OFFSET);
66 writel(1, zynq_slcr_base + SLCR_PS_RST_CTRL_OFFSET); 55 writel(1, zynq_slcr_base + SLCR_PS_RST_CTRL_OFFSET);
67} 56}
68 57
@@ -72,11 +61,11 @@ void zynq_slcr_system_reset(void)
72 */ 61 */
73void zynq_slcr_cpu_start(int cpu) 62void zynq_slcr_cpu_start(int cpu)
74{ 63{
75 /* enable CPUn */ 64 u32 reg = readl(zynq_slcr_base + SLCR_A9_CPU_RST_CTRL_OFFSET);
76 writel(SLCR_A9_CPU_CLKSTOP << cpu, 65 reg &= ~(SLCR_A9_CPU_RST << cpu);
77 zynq_slcr_base + SLCR_A9_CPU_RST_CTRL); 66 writel(reg, zynq_slcr_base + SLCR_A9_CPU_RST_CTRL_OFFSET);
78 /* enable CLK for CPUn */ 67 reg &= ~(SLCR_A9_CPU_CLKSTOP << cpu);
79 writel(0x0 << cpu, zynq_slcr_base + SLCR_A9_CPU_RST_CTRL); 68 writel(reg, zynq_slcr_base + SLCR_A9_CPU_RST_CTRL_OFFSET);
80} 69}
81 70
82/** 71/**
@@ -85,9 +74,9 @@ void zynq_slcr_cpu_start(int cpu)
85 */ 74 */
86void zynq_slcr_cpu_stop(int cpu) 75void zynq_slcr_cpu_stop(int cpu)
87{ 76{
88 /* stop CLK and reset CPUn */ 77 u32 reg = readl(zynq_slcr_base + SLCR_A9_CPU_RST_CTRL_OFFSET);
89 writel((SLCR_A9_CPU_CLKSTOP | SLCR_A9_CPU_RST) << cpu, 78 reg |= (SLCR_A9_CPU_CLKSTOP | SLCR_A9_CPU_RST) << cpu;
90 zynq_slcr_base + SLCR_A9_CPU_RST_CTRL); 79 writel(reg, zynq_slcr_base + SLCR_A9_CPU_RST_CTRL_OFFSET);
91} 80}
92 81
93/** 82/**
@@ -113,7 +102,7 @@ int __init zynq_slcr_init(void)
113 } 102 }
114 103
115 /* unlock the SLCR so that registers can be changed */ 104 /* unlock the SLCR so that registers can be changed */
116 writel(SLCR_UNLOCK_MAGIC, zynq_slcr_base + SLCR_UNLOCK); 105 writel(SLCR_UNLOCK_MAGIC, zynq_slcr_base + SLCR_UNLOCK_OFFSET);
117 106
118 pr_info("%s mapped to %p\n", np->name, zynq_slcr_base); 107 pr_info("%s mapped to %p\n", np->name, zynq_slcr_base);
119 108
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index a5b5ff6e68d2..7dfba937d8fc 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -25,7 +25,6 @@ config PLAT_S5P
25 select S5P_GPIO_DRVSTR 25 select S5P_GPIO_DRVSTR
26 select SAMSUNG_CLKSRC if !COMMON_CLK 26 select SAMSUNG_CLKSRC if !COMMON_CLK
27 select SAMSUNG_GPIOLIB_4BIT 27 select SAMSUNG_GPIOLIB_4BIT
28 select SAMSUNG_IRQ_VIC_TIMER
29 help 28 help
30 Base platform code for Samsung's S5P series SoC. 29 Base platform code for Samsung's S5P series SoC.
31 30
@@ -79,14 +78,6 @@ config SAMSUNG_ATAGS
79 78
80if SAMSUNG_ATAGS 79if SAMSUNG_ATAGS
81 80
82# timer options
83
84config SAMSUNG_HRT
85 bool
86 select SAMSUNG_DEV_PWM
87 help
88 Use the High Resolution timer support
89
90# clock options 81# clock options
91 82
92config SAMSUNG_CLOCK 83config SAMSUNG_CLOCK
@@ -106,11 +97,6 @@ config S5P_CLOCK
106 97
107# options for IRQ support 98# options for IRQ support
108 99
109config SAMSUNG_IRQ_VIC_TIMER
110 bool
111 help
112 Internal configuration to build the VIC timer interrupt code.
113
114config S5P_IRQ 100config S5P_IRQ
115 def_bool (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210) 101 def_bool (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210)
116 help 102 help
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 199bbe304d02..498c7c23e9f4 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -12,15 +12,12 @@ obj- :=
12# Objects we always build independent of SoC choice 12# Objects we always build independent of SoC choice
13 13
14obj-y += init.o cpu.o 14obj-y += init.o cpu.o
15obj-$(CONFIG_SAMSUNG_HRT) += samsung-time.o
16 15
17obj-$(CONFIG_SAMSUNG_CLOCK) += clock.o 16obj-$(CONFIG_SAMSUNG_CLOCK) += clock.o
18obj-$(CONFIG_SAMSUNG_CLOCK) += pwm-clock.o
19 17
20obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o 18obj-$(CONFIG_SAMSUNG_CLKSRC) += clock-clksrc.o
21obj-$(CONFIG_S5P_CLOCK) += s5p-clock.o 19obj-$(CONFIG_S5P_CLOCK) += s5p-clock.o
22 20
23obj-$(CONFIG_SAMSUNG_IRQ_VIC_TIMER) += irq-vic-timer.o
24obj-$(CONFIG_S5P_IRQ) += s5p-irq.o 21obj-$(CONFIG_S5P_IRQ) += s5p-irq.o
25obj-$(CONFIG_S5P_EXT_INT) += s5p-irq-eint.o 22obj-$(CONFIG_S5P_EXT_INT) += s5p-irq-eint.o
26obj-$(CONFIG_S5P_GPIO_INT) += s5p-irq-gpioint.o 23obj-$(CONFIG_S5P_GPIO_INT) += s5p-irq-gpioint.o
diff --git a/arch/arm/plat-samsung/dev-backlight.c b/arch/arm/plat-samsung/dev-backlight.c
index 5f197dcaf10c..d51f9565567c 100644
--- a/arch/arm/plat-samsung/dev-backlight.c
+++ b/arch/arm/plat-samsung/dev-backlight.c
@@ -20,13 +20,18 @@
20#include <plat/gpio-cfg.h> 20#include <plat/gpio-cfg.h>
21#include <plat/backlight.h> 21#include <plat/backlight.h>
22 22
23struct samsung_bl_drvdata {
24 struct platform_pwm_backlight_data plat_data;
25 struct samsung_bl_gpio_info *gpio_info;
26};
27
23static int samsung_bl_init(struct device *dev) 28static int samsung_bl_init(struct device *dev)
24{ 29{
25 int ret = 0; 30 int ret = 0;
26 struct platform_device *timer_dev = 31 struct platform_pwm_backlight_data *pdata = dev->platform_data;
27 container_of(dev->parent, struct platform_device, dev); 32 struct samsung_bl_drvdata *drvdata = container_of(pdata,
28 struct samsung_bl_gpio_info *bl_gpio_info = 33 struct samsung_bl_drvdata, plat_data);
29 timer_dev->dev.platform_data; 34 struct samsung_bl_gpio_info *bl_gpio_info = drvdata->gpio_info;
30 35
31 ret = gpio_request(bl_gpio_info->no, "Backlight"); 36 ret = gpio_request(bl_gpio_info->no, "Backlight");
32 if (ret) { 37 if (ret) {
@@ -42,10 +47,10 @@ static int samsung_bl_init(struct device *dev)
42 47
43static void samsung_bl_exit(struct device *dev) 48static void samsung_bl_exit(struct device *dev)
44{ 49{
45 struct platform_device *timer_dev = 50 struct platform_pwm_backlight_data *pdata = dev->platform_data;
46 container_of(dev->parent, struct platform_device, dev); 51 struct samsung_bl_drvdata *drvdata = container_of(pdata,
47 struct samsung_bl_gpio_info *bl_gpio_info = 52 struct samsung_bl_drvdata, plat_data);
48 timer_dev->dev.platform_data; 53 struct samsung_bl_gpio_info *bl_gpio_info = drvdata->gpio_info;
49 54
50 s3c_gpio_cfgpin(bl_gpio_info->no, S3C_GPIO_OUTPUT); 55 s3c_gpio_cfgpin(bl_gpio_info->no, S3C_GPIO_OUTPUT);
51 gpio_free(bl_gpio_info->no); 56 gpio_free(bl_gpio_info->no);
@@ -60,12 +65,14 @@ static void samsung_bl_exit(struct device *dev)
60 * for their specific boards 65 * for their specific boards
61 */ 66 */
62 67
63static struct platform_pwm_backlight_data samsung_dfl_bl_data __initdata = { 68static struct samsung_bl_drvdata samsung_dfl_bl_data __initdata = {
64 .max_brightness = 255, 69 .plat_data = {
65 .dft_brightness = 255, 70 .max_brightness = 255,
66 .pwm_period_ns = 78770, 71 .dft_brightness = 255,
67 .init = samsung_bl_init, 72 .pwm_period_ns = 78770,
68 .exit = samsung_bl_exit, 73 .init = samsung_bl_init,
74 .exit = samsung_bl_exit,
75 },
69}; 76};
70 77
71static struct platform_device samsung_dfl_bl_device __initdata = { 78static struct platform_device samsung_dfl_bl_device __initdata = {
@@ -82,6 +89,7 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
82{ 89{
83 int ret = 0; 90 int ret = 0;
84 struct platform_device *samsung_bl_device; 91 struct platform_device *samsung_bl_device;
92 struct samsung_bl_drvdata *samsung_bl_drvdata;
85 struct platform_pwm_backlight_data *samsung_bl_data; 93 struct platform_pwm_backlight_data *samsung_bl_data;
86 94
87 samsung_bl_device = kmemdup(&samsung_dfl_bl_device, 95 samsung_bl_device = kmemdup(&samsung_dfl_bl_device,
@@ -91,17 +99,19 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
91 return; 99 return;
92 } 100 }
93 101
94 samsung_bl_data = s3c_set_platdata(&samsung_dfl_bl_data, 102 samsung_bl_drvdata = kmemdup(&samsung_dfl_bl_data,
95 sizeof(struct platform_pwm_backlight_data), samsung_bl_device); 103 sizeof(samsung_dfl_bl_data), GFP_KERNEL);
96 if (!samsung_bl_data) { 104 if (!samsung_bl_drvdata) {
97 printk(KERN_ERR "%s: no memory for platform dev\n", __func__); 105 printk(KERN_ERR "%s: no memory for platform dev\n", __func__);
98 goto err_data; 106 goto err_data;
99 } 107 }
108 samsung_bl_device->dev.platform_data = &samsung_bl_drvdata->plat_data;
109 samsung_bl_drvdata->gpio_info = gpio_info;
110 samsung_bl_data = &samsung_bl_drvdata->plat_data;
100 111
101 /* Copy board specific data provided by user */ 112 /* Copy board specific data provided by user */
102 samsung_bl_data->pwm_id = bl_data->pwm_id; 113 samsung_bl_data->pwm_id = bl_data->pwm_id;
103 samsung_bl_device->dev.parent = 114 samsung_bl_device->dev.parent = &samsung_device_pwm.dev;
104 &s3c_device_timer[samsung_bl_data->pwm_id].dev;
105 115
106 if (bl_data->max_brightness) 116 if (bl_data->max_brightness)
107 samsung_bl_data->max_brightness = bl_data->max_brightness; 117 samsung_bl_data->max_brightness = bl_data->max_brightness;
@@ -122,17 +132,6 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
122 if (bl_data->check_fb) 132 if (bl_data->check_fb)
123 samsung_bl_data->check_fb = bl_data->check_fb; 133 samsung_bl_data->check_fb = bl_data->check_fb;
124 134
125 /* Keep the GPIO info for future use */
126 s3c_device_timer[samsung_bl_data->pwm_id].dev.platform_data = gpio_info;
127
128 /* Register the specific PWM timer dev for Backlight control */
129 ret = platform_device_register(
130 &s3c_device_timer[samsung_bl_data->pwm_id]);
131 if (ret) {
132 printk(KERN_ERR "failed to register pwm timer for backlight: %d\n", ret);
133 goto err_plat_reg1;
134 }
135
136 /* Register the Backlight dev */ 135 /* Register the Backlight dev */
137 ret = platform_device_register(samsung_bl_device); 136 ret = platform_device_register(samsung_bl_device);
138 if (ret) { 137 if (ret) {
@@ -143,8 +142,6 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
143 return; 142 return;
144 143
145err_plat_reg2: 144err_plat_reg2:
146 platform_device_unregister(&s3c_device_timer[samsung_bl_data->pwm_id]);
147err_plat_reg1:
148 kfree(samsung_bl_data); 145 kfree(samsung_bl_data);
149err_data: 146err_data:
150 kfree(samsung_bl_device); 147 kfree(samsung_bl_device);
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 0f9c3f431a5f..8ce0ac007eb9 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -58,6 +58,7 @@
58#include <plat/keypad.h> 58#include <plat/keypad.h>
59#include <linux/platform_data/mmc-s3cmci.h> 59#include <linux/platform_data/mmc-s3cmci.h>
60#include <linux/platform_data/mtd-nand-s3c2410.h> 60#include <linux/platform_data/mtd-nand-s3c2410.h>
61#include <plat/pwm-core.h>
61#include <plat/sdhci.h> 62#include <plat/sdhci.h>
62#include <linux/platform_data/touchscreen-s3c2410.h> 63#include <linux/platform_data/touchscreen-s3c2410.h>
63#include <linux/platform_data/usb-s3c2410_udc.h> 64#include <linux/platform_data/usb-s3c2410_udc.h>
@@ -1097,36 +1098,21 @@ arch_initcall(s5p_pmu_init);
1097/* PWM Timer */ 1098/* PWM Timer */
1098 1099
1099#ifdef CONFIG_SAMSUNG_DEV_PWM 1100#ifdef CONFIG_SAMSUNG_DEV_PWM
1101static struct resource samsung_pwm_resource[] = {
1102 DEFINE_RES_MEM(SAMSUNG_PA_TIMER, SZ_4K),
1103};
1100 1104
1101#define TIMER_RESOURCE_SIZE (1) 1105struct platform_device samsung_device_pwm = {
1102 1106 .name = "samsung-pwm",
1103#define TIMER_RESOURCE(_tmr, _irq) \ 1107 .id = -1,
1104 (struct resource [TIMER_RESOURCE_SIZE]) { \ 1108 .num_resources = ARRAY_SIZE(samsung_pwm_resource),
1105 [0] = { \ 1109 .resource = samsung_pwm_resource,
1106 .start = _irq, \
1107 .end = _irq, \
1108 .flags = IORESOURCE_IRQ \
1109 } \
1110 }
1111
1112#define DEFINE_S3C_TIMER(_tmr_no, _irq) \
1113 .name = "s3c24xx-pwm", \
1114 .id = _tmr_no, \
1115 .num_resources = TIMER_RESOURCE_SIZE, \
1116 .resource = TIMER_RESOURCE(_tmr_no, _irq), \
1117
1118/*
1119 * since we already have an static mapping for the timer,
1120 * we do not bother setting any IO resource for the base.
1121 */
1122
1123struct platform_device s3c_device_timer[] = {
1124 [0] = { DEFINE_S3C_TIMER(0, IRQ_TIMER0) },
1125 [1] = { DEFINE_S3C_TIMER(1, IRQ_TIMER1) },
1126 [2] = { DEFINE_S3C_TIMER(2, IRQ_TIMER2) },
1127 [3] = { DEFINE_S3C_TIMER(3, IRQ_TIMER3) },
1128 [4] = { DEFINE_S3C_TIMER(4, IRQ_TIMER4) },
1129}; 1110};
1111
1112void __init samsung_pwm_set_platdata(struct samsung_pwm_variant *pd)
1113{
1114 samsung_device_pwm.dev.platform_data = pd;
1115}
1130#endif /* CONFIG_SAMSUNG_DEV_PWM */ 1116#endif /* CONFIG_SAMSUNG_DEV_PWM */
1131 1117
1132/* RTC */ 1118/* RTC */
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h
index df45d6edc98d..63239f409807 100644
--- a/arch/arm/plat-samsung/include/plat/clock.h
+++ b/arch/arm/plat-samsung/include/plat/clock.h
@@ -145,10 +145,6 @@ extern int s3c2443_clkcon_enable_s(struct clk *clk, int enable);
145 145
146extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable); 146extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable);
147 147
148/* Init for pwm clock code */
149
150extern void s3c_pwmclk_init(void);
151
152/* Global watchdog clock used by arch_wtd_reset() callback */ 148/* Global watchdog clock used by arch_wtd_reset() callback */
153 149
154extern struct clk *s3c2410_wdtclk; 150extern struct clk *s3c2410_wdtclk;
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h
index 87d501ff3328..0dc4ac4909b0 100644
--- a/arch/arm/plat-samsung/include/plat/devs.h
+++ b/arch/arm/plat-samsung/include/plat/devs.h
@@ -134,6 +134,7 @@ extern struct platform_device exynos4_device_spdif;
134 134
135extern struct platform_device samsung_asoc_idma; 135extern struct platform_device samsung_asoc_idma;
136extern struct platform_device samsung_device_keypad; 136extern struct platform_device samsung_device_keypad;
137extern struct platform_device samsung_device_pwm;
137 138
138/* s3c2440 specific devices */ 139/* s3c2440 specific devices */
139 140
diff --git a/arch/arm/plat-samsung/include/plat/irq-vic-timer.h b/arch/arm/plat-samsung/include/plat/irq-vic-timer.h
deleted file mode 100644
index 5b9c42fd32d7..000000000000
--- a/arch/arm/plat-samsung/include/plat/irq-vic-timer.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/* arch/arm/plat-samsung/include/plat/irq-vic-timer.h
2 *
3 * Copyright (c) 2010 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for Samsung SoC IRQ VIC timer
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13extern void s3c_init_vic_timer_irq(unsigned int num, unsigned int timer_irq);
diff --git a/arch/arm/plat-samsung/include/plat/irqs.h b/arch/arm/plat-samsung/include/plat/irqs.h
index df46b776976a..039001c0ef05 100644
--- a/arch/arm/plat-samsung/include/plat/irqs.h
+++ b/arch/arm/plat-samsung/include/plat/irqs.h
@@ -44,15 +44,6 @@
44#define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x)) 44#define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x))
45#define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x)) 45#define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x))
46 46
47#define S5P_TIMER_IRQ(x) (IRQ_TIMER_BASE + (x))
48
49#define IRQ_TIMER0 S5P_TIMER_IRQ(0)
50#define IRQ_TIMER1 S5P_TIMER_IRQ(1)
51#define IRQ_TIMER2 S5P_TIMER_IRQ(2)
52#define IRQ_TIMER3 S5P_TIMER_IRQ(3)
53#define IRQ_TIMER4 S5P_TIMER_IRQ(4)
54#define IRQ_TIMER_COUNT (5)
55
56#define IRQ_EINT(x) ((x) < 16 ? ((x) + S5P_EINT_BASE1) \ 47#define IRQ_EINT(x) ((x) < 16 ? ((x) + S5P_EINT_BASE1) \
57 : ((x) - 16 + S5P_EINT_BASE2)) 48 : ((x) - 16 + S5P_EINT_BASE2))
58 49
diff --git a/arch/arm/plat-samsung/include/plat/pwm-clock.h b/arch/arm/plat-samsung/include/plat/pwm-clock.h
deleted file mode 100644
index bf6a60eb6237..000000000000
--- a/arch/arm/plat-samsung/include/plat/pwm-clock.h
+++ /dev/null
@@ -1,81 +0,0 @@
1/* linux/arch/arm/plat-samsung/include/plat/pwm-clock.h
2 *
3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Copyright 2008 Openmoko, Inc.
7 * Copyright 2008 Simtec Electronics
8 * Ben Dooks <ben@simtec.co.uk>
9 * http://armlinux.simtec.co.uk/
10 *
11 * SAMSUNG - pwm clock and timer support
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16*/
17
18#ifndef __ASM_PLAT_PWM_CLOCK_H
19#define __ASM_PLAT_PWM_CLOCK_H __FILE__
20
21/**
22 * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk
23 * @tcfg: The timer TCFG1 register bits shifted down to 0.
24 *
25 * Return true if the given configuration from TCFG1 is a TCLK instead
26 * any of the TDIV clocks.
27 */
28static inline int pwm_cfg_src_is_tclk(unsigned long tcfg)
29{
30 if (soc_is_s3c24xx())
31 return tcfg == S3C2410_TCFG1_MUX_TCLK;
32 else if (soc_is_s3c64xx() || soc_is_s5pc100())
33 return tcfg >= S3C64XX_TCFG1_MUX_TCLK;
34 else if (soc_is_s5p6440() || soc_is_s5p6450())
35 return 0;
36 else
37 return tcfg == S3C64XX_TCFG1_MUX_TCLK;
38}
39
40/**
41 * tcfg_to_divisor() - convert tcfg1 setting to a divisor
42 * @tcfg1: The tcfg1 setting, shifted down.
43 *
44 * Get the divisor value for the given tcfg1 setting. We assume the
45 * caller has already checked to see if this is not a TCLK source.
46 */
47static inline unsigned long tcfg_to_divisor(unsigned long tcfg1)
48{
49 if (soc_is_s3c24xx())
50 return 1 << (tcfg1 + 1);
51 else
52 return 1 << tcfg1;
53}
54
55/**
56 * pwm_tdiv_has_div1() - does the tdiv setting have a /1
57 *
58 * Return true if we have a /1 in the tdiv setting.
59 */
60static inline unsigned int pwm_tdiv_has_div1(void)
61{
62 if (soc_is_s3c24xx())
63 return 0;
64 else
65 return 1;
66}
67
68/**
69 * pwm_tdiv_div_bits() - calculate TCFG1 divisor value.
70 * @div: The divisor to calculate the bit information for.
71 *
72 * Turn a divisor into the necessary bit field for TCFG1.
73 */
74static inline unsigned long pwm_tdiv_div_bits(unsigned int div)
75{
76 if (soc_is_s3c24xx())
77 return ilog2(div) - 1;
78 else
79 return ilog2(div);
80}
81#endif /* __ASM_PLAT_PWM_CLOCK_H */
diff --git a/arch/arm/plat-samsung/include/plat/pwm-core.h b/arch/arm/plat-samsung/include/plat/pwm-core.h
new file mode 100644
index 000000000000..5bff1facb672
--- /dev/null
+++ b/arch/arm/plat-samsung/include/plat/pwm-core.h
@@ -0,0 +1,22 @@
1/*
2 * Copyright 2013 Tomasz Figa <tomasz.figa@gmail.com>
3 *
4 * Samsung PWM controller platform data helpers.
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_PWM_CORE_H
12#define __ASM_ARCH_PWM_CORE_H __FILE__
13
14#include <clocksource/samsung_pwm.h>
15
16#ifdef CONFIG_SAMSUNG_DEV_PWM
17extern void samsung_pwm_set_platdata(struct samsung_pwm_variant *pd);
18#else
19static inline void samsung_pwm_set_platdata(struct samsung_pwm_variant *pd) { }
20#endif
21
22#endif /* __ASM_ARCH_PWM_CORE_H */
diff --git a/arch/arm/plat-samsung/include/plat/regs-timer.h b/arch/arm/plat-samsung/include/plat/regs-timer.h
deleted file mode 100644
index d097d92f8cc7..000000000000
--- a/arch/arm/plat-samsung/include/plat/regs-timer.h
+++ /dev/null
@@ -1,124 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-timer.h
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
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 * S3C2410 Timer configuration
11*/
12
13#ifndef __ASM_ARCH_REGS_TIMER_H
14#define __ASM_ARCH_REGS_TIMER_H
15
16#define S3C_TIMERREG(x) (S3C_VA_TIMER + (x))
17#define S3C_TIMERREG2(tmr,reg) S3C_TIMERREG((reg)+0x0c+((tmr)*0x0c))
18
19#define S3C2410_TCFG0 S3C_TIMERREG(0x00)
20#define S3C2410_TCFG1 S3C_TIMERREG(0x04)
21#define S3C2410_TCON S3C_TIMERREG(0x08)
22
23#define S3C64XX_TINT_CSTAT S3C_TIMERREG(0x44)
24
25#define S3C2410_TCFG_PRESCALER0_MASK (255<<0)
26#define S3C2410_TCFG_PRESCALER1_MASK (255<<8)
27#define S3C2410_TCFG_PRESCALER1_SHIFT (8)
28#define S3C2410_TCFG_DEADZONE_MASK (255<<16)
29#define S3C2410_TCFG_DEADZONE_SHIFT (16)
30
31#define S3C2410_TCFG1_MUX4_DIV2 (0<<16)
32#define S3C2410_TCFG1_MUX4_DIV4 (1<<16)
33#define S3C2410_TCFG1_MUX4_DIV8 (2<<16)
34#define S3C2410_TCFG1_MUX4_DIV16 (3<<16)
35#define S3C2410_TCFG1_MUX4_TCLK1 (4<<16)
36#define S3C2410_TCFG1_MUX4_MASK (15<<16)
37#define S3C2410_TCFG1_MUX4_SHIFT (16)
38
39#define S3C2410_TCFG1_MUX3_DIV2 (0<<12)
40#define S3C2410_TCFG1_MUX3_DIV4 (1<<12)
41#define S3C2410_TCFG1_MUX3_DIV8 (2<<12)
42#define S3C2410_TCFG1_MUX3_DIV16 (3<<12)
43#define S3C2410_TCFG1_MUX3_TCLK1 (4<<12)
44#define S3C2410_TCFG1_MUX3_MASK (15<<12)
45
46
47#define S3C2410_TCFG1_MUX2_DIV2 (0<<8)
48#define S3C2410_TCFG1_MUX2_DIV4 (1<<8)
49#define S3C2410_TCFG1_MUX2_DIV8 (2<<8)
50#define S3C2410_TCFG1_MUX2_DIV16 (3<<8)
51#define S3C2410_TCFG1_MUX2_TCLK1 (4<<8)
52#define S3C2410_TCFG1_MUX2_MASK (15<<8)
53
54
55#define S3C2410_TCFG1_MUX1_DIV2 (0<<4)
56#define S3C2410_TCFG1_MUX1_DIV4 (1<<4)
57#define S3C2410_TCFG1_MUX1_DIV8 (2<<4)
58#define S3C2410_TCFG1_MUX1_DIV16 (3<<4)
59#define S3C2410_TCFG1_MUX1_TCLK0 (4<<4)
60#define S3C2410_TCFG1_MUX1_MASK (15<<4)
61
62#define S3C2410_TCFG1_MUX0_DIV2 (0<<0)
63#define S3C2410_TCFG1_MUX0_DIV4 (1<<0)
64#define S3C2410_TCFG1_MUX0_DIV8 (2<<0)
65#define S3C2410_TCFG1_MUX0_DIV16 (3<<0)
66#define S3C2410_TCFG1_MUX0_TCLK0 (4<<0)
67#define S3C2410_TCFG1_MUX0_MASK (15<<0)
68
69#define S3C2410_TCFG1_MUX_DIV2 (0<<0)
70#define S3C2410_TCFG1_MUX_DIV4 (1<<0)
71#define S3C2410_TCFG1_MUX_DIV8 (2<<0)
72#define S3C2410_TCFG1_MUX_DIV16 (3<<0)
73#define S3C2410_TCFG1_MUX_TCLK (4<<0)
74#define S3C2410_TCFG1_MUX_MASK (15<<0)
75
76#define S3C64XX_TCFG1_MUX_DIV1 (0<<0)
77#define S3C64XX_TCFG1_MUX_DIV2 (1<<0)
78#define S3C64XX_TCFG1_MUX_DIV4 (2<<0)
79#define S3C64XX_TCFG1_MUX_DIV8 (3<<0)
80#define S3C64XX_TCFG1_MUX_DIV16 (4<<0)
81#define S3C64XX_TCFG1_MUX_TCLK (5<<0) /* 3 sets of TCLK */
82#define S3C64XX_TCFG1_MUX_MASK (15<<0)
83
84#define S3C2410_TCFG1_SHIFT(x) ((x) * 4)
85
86/* for each timer, we have an count buffer, an compare buffer and
87 * an observation buffer
88*/
89
90/* WARNING - timer 4 has no buffer reg, and it's observation is at +4 */
91
92#define S3C2410_TCNTB(tmr) S3C_TIMERREG2(tmr, 0x00)
93#define S3C2410_TCMPB(tmr) S3C_TIMERREG2(tmr, 0x04)
94#define S3C2410_TCNTO(tmr) S3C_TIMERREG2(tmr, (((tmr) == 4) ? 0x04 : 0x08))
95
96#define S3C2410_TCON_T4RELOAD (1<<22)
97#define S3C2410_TCON_T4MANUALUPD (1<<21)
98#define S3C2410_TCON_T4START (1<<20)
99
100#define S3C2410_TCON_T3RELOAD (1<<19)
101#define S3C2410_TCON_T3INVERT (1<<18)
102#define S3C2410_TCON_T3MANUALUPD (1<<17)
103#define S3C2410_TCON_T3START (1<<16)
104
105#define S3C2410_TCON_T2RELOAD (1<<15)
106#define S3C2410_TCON_T2INVERT (1<<14)
107#define S3C2410_TCON_T2MANUALUPD (1<<13)
108#define S3C2410_TCON_T2START (1<<12)
109
110#define S3C2410_TCON_T1RELOAD (1<<11)
111#define S3C2410_TCON_T1INVERT (1<<10)
112#define S3C2410_TCON_T1MANUALUPD (1<<9)
113#define S3C2410_TCON_T1START (1<<8)
114
115#define S3C2410_TCON_T0DEADZONE (1<<4)
116#define S3C2410_TCON_T0RELOAD (1<<3)
117#define S3C2410_TCON_T0INVERT (1<<2)
118#define S3C2410_TCON_T0MANUALUPD (1<<1)
119#define S3C2410_TCON_T0START (1<<0)
120
121#endif /* __ASM_ARCH_REGS_TIMER_H */
122
123
124
diff --git a/arch/arm/plat-samsung/include/plat/samsung-time.h b/arch/arm/plat-samsung/include/plat/samsung-time.h
index 4cc99bb1f176..209464adef97 100644
--- a/arch/arm/plat-samsung/include/plat/samsung-time.h
+++ b/arch/arm/plat-samsung/include/plat/samsung-time.h
@@ -22,29 +22,6 @@ enum samsung_timer_mode {
22 SAMSUNG_PWM4, 22 SAMSUNG_PWM4,
23}; 23};
24 24
25struct samsung_timer_source {
26 unsigned int event_id;
27 unsigned int source_id;
28};
29
30/* Be able to sleep for atleast 4 seconds (usually more) */
31#define SAMSUNG_TIMER_MIN_RANGE 4
32
33#if defined(CONFIG_ARCH_S3C24XX) || defined(CONFIG_ARCH_S5PC100)
34#define TCNT_MAX 0xffff
35#define TSCALER_DIV 25
36#define TDIV 50
37#define TSIZE 16
38#else
39#define TCNT_MAX 0xffffffff
40#define TSCALER_DIV 2
41#define TDIV 2
42#define TSIZE 32
43#endif
44
45#define NON_PERIODIC 0
46#define PERIODIC 1
47
48extern void __init samsung_set_timer_source(enum samsung_timer_mode event, 25extern void __init samsung_set_timer_source(enum samsung_timer_mode event,
49 enum samsung_timer_mode source); 26 enum samsung_timer_mode source);
50 27
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
index ce1d0f785efd..bf650218b40e 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -260,44 +260,6 @@ static inline void s5pv210_default_sdhci3(void) { }
260 260
261#endif /* CONFIG_S5PV210_SETUP_SDHCI */ 261#endif /* CONFIG_S5PV210_SETUP_SDHCI */
262 262
263/* EXYNOS4 SDHCI setup */
264#ifdef CONFIG_EXYNOS4_SETUP_SDHCI
265static inline void exynos4_default_sdhci0(void)
266{
267#ifdef CONFIG_S3C_DEV_HSMMC
268 s3c_hsmmc0_def_platdata.cfg_gpio = exynos4_setup_sdhci0_cfg_gpio;
269#endif
270}
271
272static inline void exynos4_default_sdhci1(void)
273{
274#ifdef CONFIG_S3C_DEV_HSMMC1
275 s3c_hsmmc1_def_platdata.cfg_gpio = exynos4_setup_sdhci1_cfg_gpio;
276#endif
277}
278
279static inline void exynos4_default_sdhci2(void)
280{
281#ifdef CONFIG_S3C_DEV_HSMMC2
282 s3c_hsmmc2_def_platdata.cfg_gpio = exynos4_setup_sdhci2_cfg_gpio;
283#endif
284}
285
286static inline void exynos4_default_sdhci3(void)
287{
288#ifdef CONFIG_S3C_DEV_HSMMC3
289 s3c_hsmmc3_def_platdata.cfg_gpio = exynos4_setup_sdhci3_cfg_gpio;
290#endif
291}
292
293#else
294static inline void exynos4_default_sdhci0(void) { }
295static inline void exynos4_default_sdhci1(void) { }
296static inline void exynos4_default_sdhci2(void) { }
297static inline void exynos4_default_sdhci3(void) { }
298
299#endif /* CONFIG_EXYNOS4_SETUP_SDHCI */
300
301static inline void s3c_sdhci_setname(int id, char *name) 263static inline void s3c_sdhci_setname(int id, char *name)
302{ 264{
303 switch (id) { 265 switch (id) {
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c
deleted file mode 100644
index 0fceb4273824..000000000000
--- a/arch/arm/plat-samsung/irq-vic-timer.c
+++ /dev/null
@@ -1,98 +0,0 @@
1/* arch/arm/plat-samsung/irq-vic-timer.c
2 * originally part of arch/arm/plat-s3c64xx/irq.c
3 *
4 * Copyright 2008 Openmoko, Inc.
5 * Copyright 2008 Simtec Electronics
6 * Ben Dooks <ben@simtec.co.uk>
7 * http://armlinux.simtec.co.uk/
8 *
9 * S3C64XX - Interrupt handling
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#include <linux/kernel.h>
17#include <linux/interrupt.h>
18#include <linux/irq.h>
19#include <linux/irqchip/chained_irq.h>
20#include <linux/io.h>
21
22#include <mach/map.h>
23#include <mach/irqs.h>
24#include <plat/cpu.h>
25#include <plat/irq-vic-timer.h>
26#include <plat/regs-timer.h>
27
28static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc)
29{
30 struct irq_chip *chip = irq_get_chip(irq);
31 chained_irq_enter(chip, desc);
32 generic_handle_irq((int)desc->irq_data.handler_data);
33 chained_irq_exit(chip, desc);
34}
35
36/* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */
37static void s3c_irq_timer_ack(struct irq_data *d)
38{
39 struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
40 u32 mask = (1 << 5) << (d->irq - gc->irq_base);
41
42 irq_reg_writel(mask | gc->mask_cache, gc->reg_base);
43}
44
45/**
46 * s3c_init_vic_timer_irq() - initialise timer irq chanined off VIC.\
47 * @num: Number of timers to initialize
48 * @timer_irq: Base IRQ number to be used for the timers.
49 *
50 * Register the necessary IRQ chaining and support for the timer IRQs
51 * chained of the VIC.
52 */
53void __init s3c_init_vic_timer_irq(unsigned int num, unsigned int timer_irq)
54{
55 unsigned int pirq[5] = { IRQ_TIMER0_VIC, IRQ_TIMER1_VIC, IRQ_TIMER2_VIC,
56 IRQ_TIMER3_VIC, IRQ_TIMER4_VIC };
57 struct irq_chip_generic *s3c_tgc;
58 struct irq_chip_type *ct;
59 unsigned int i;
60
61#ifdef CONFIG_ARCH_EXYNOS
62 if (soc_is_exynos5250()) {
63 pirq[0] = EXYNOS5_IRQ_TIMER0_VIC;
64 pirq[1] = EXYNOS5_IRQ_TIMER1_VIC;
65 pirq[2] = EXYNOS5_IRQ_TIMER2_VIC;
66 pirq[3] = EXYNOS5_IRQ_TIMER3_VIC;
67 pirq[4] = EXYNOS5_IRQ_TIMER4_VIC;
68 } else {
69 pirq[0] = EXYNOS4_IRQ_TIMER0_VIC;
70 pirq[1] = EXYNOS4_IRQ_TIMER1_VIC;
71 pirq[2] = EXYNOS4_IRQ_TIMER2_VIC;
72 pirq[3] = EXYNOS4_IRQ_TIMER3_VIC;
73 pirq[4] = EXYNOS4_IRQ_TIMER4_VIC;
74 }
75#endif
76 s3c_tgc = irq_alloc_generic_chip("s3c-timer", 1, timer_irq,
77 S3C64XX_TINT_CSTAT, handle_level_irq);
78
79 if (!s3c_tgc) {
80 pr_err("%s: irq_alloc_generic_chip for IRQ %d failed\n",
81 __func__, timer_irq);
82 return;
83 }
84
85 ct = s3c_tgc->chip_types;
86 ct->chip.irq_mask = irq_gc_mask_clr_bit;
87 ct->chip.irq_unmask = irq_gc_mask_set_bit;
88 ct->chip.irq_ack = s3c_irq_timer_ack;
89 irq_setup_generic_chip(s3c_tgc, IRQ_MSK(num), IRQ_GC_INIT_MASK_CACHE,
90 IRQ_NOREQUEST | IRQ_NOPROBE, 0);
91 /* Clear the upper bits of the mask_cache*/
92 s3c_tgc->mask_cache &= 0x1f;
93
94 for (i = 0; i < num; i++, timer_irq++) {
95 irq_set_chained_handler(pirq[i], s3c_irq_demux_vic_timer);
96 irq_set_handler_data(pirq[i], (void *)timer_irq);
97 }
98}
diff --git a/arch/arm/plat-samsung/pwm-clock.c b/arch/arm/plat-samsung/pwm-clock.c
deleted file mode 100644
index a35ff3bcffe4..000000000000
--- a/arch/arm/plat-samsung/pwm-clock.c
+++ /dev/null
@@ -1,474 +0,0 @@
1/* linux/arch/arm/plat-s3c24xx/pwm-clock.c
2 *
3 * Copyright (c) 2007 Simtec Electronics
4 * Copyright (c) 2007, 2008 Ben Dooks
5 * Ben Dooks <ben-linux@fluff.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License.
10*/
11
12#include <linux/init.h>
13#include <linux/module.h>
14#include <linux/kernel.h>
15#include <linux/list.h>
16#include <linux/errno.h>
17#include <linux/log2.h>
18#include <linux/clk.h>
19#include <linux/err.h>
20#include <linux/io.h>
21
22#include <mach/hardware.h>
23#include <mach/map.h>
24#include <asm/irq.h>
25
26#include <plat/clock.h>
27#include <plat/cpu.h>
28
29#include <plat/regs-timer.h>
30#include <plat/pwm-clock.h>
31
32/* Each of the timers 0 through 5 go through the following
33 * clock tree, with the inputs depending on the timers.
34 *
35 * pclk ---- [ prescaler 0 ] -+---> timer 0
36 * +---> timer 1
37 *
38 * pclk ---- [ prescaler 1 ] -+---> timer 2
39 * +---> timer 3
40 * \---> timer 4
41 *
42 * Which are fed into the timers as so:
43 *
44 * prescaled 0 ---- [ div 2,4,8,16 ] ---\
45 * [mux] -> timer 0
46 * tclk 0 ------------------------------/
47 *
48 * prescaled 0 ---- [ div 2,4,8,16 ] ---\
49 * [mux] -> timer 1
50 * tclk 0 ------------------------------/
51 *
52 *
53 * prescaled 1 ---- [ div 2,4,8,16 ] ---\
54 * [mux] -> timer 2
55 * tclk 1 ------------------------------/
56 *
57 * prescaled 1 ---- [ div 2,4,8,16 ] ---\
58 * [mux] -> timer 3
59 * tclk 1 ------------------------------/
60 *
61 * prescaled 1 ---- [ div 2,4,8, 16 ] --\
62 * [mux] -> timer 4
63 * tclk 1 ------------------------------/
64 *
65 * Since the mux and the divider are tied together in the
66 * same register space, it is impossible to set the parent
67 * and the rate at the same time. To avoid this, we add an
68 * intermediate 'prescaled-and-divided' clock to select
69 * as the parent for the timer input clock called tdiv.
70 *
71 * prescaled clk --> pwm-tdiv ---\
72 * [ mux ] --> timer X
73 * tclk -------------------------/
74*/
75
76static struct clk clk_timer_scaler[];
77
78static unsigned long clk_pwm_scaler_get_rate(struct clk *clk)
79{
80 unsigned long tcfg0 = __raw_readl(S3C2410_TCFG0);
81
82 if (clk == &clk_timer_scaler[1]) {
83 tcfg0 &= S3C2410_TCFG_PRESCALER1_MASK;
84 tcfg0 >>= S3C2410_TCFG_PRESCALER1_SHIFT;
85 } else {
86 tcfg0 &= S3C2410_TCFG_PRESCALER0_MASK;
87 }
88
89 return clk_get_rate(clk->parent) / (tcfg0 + 1);
90}
91
92static unsigned long clk_pwm_scaler_round_rate(struct clk *clk,
93 unsigned long rate)
94{
95 unsigned long parent_rate = clk_get_rate(clk->parent);
96 unsigned long divisor = parent_rate / rate;
97
98 if (divisor > 256)
99 divisor = 256;
100 else if (divisor < 2)
101 divisor = 2;
102
103 return parent_rate / divisor;
104}
105
106static int clk_pwm_scaler_set_rate(struct clk *clk, unsigned long rate)
107{
108 unsigned long round = clk_pwm_scaler_round_rate(clk, rate);
109 unsigned long tcfg0;
110 unsigned long divisor;
111 unsigned long flags;
112
113 divisor = clk_get_rate(clk->parent) / round;
114 divisor--;
115
116 local_irq_save(flags);
117 tcfg0 = __raw_readl(S3C2410_TCFG0);
118
119 if (clk == &clk_timer_scaler[1]) {
120 tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK;
121 tcfg0 |= divisor << S3C2410_TCFG_PRESCALER1_SHIFT;
122 } else {
123 tcfg0 &= ~S3C2410_TCFG_PRESCALER0_MASK;
124 tcfg0 |= divisor;
125 }
126
127 __raw_writel(tcfg0, S3C2410_TCFG0);
128 local_irq_restore(flags);
129
130 return 0;
131}
132
133static struct clk_ops clk_pwm_scaler_ops = {
134 .get_rate = clk_pwm_scaler_get_rate,
135 .set_rate = clk_pwm_scaler_set_rate,
136 .round_rate = clk_pwm_scaler_round_rate,
137};
138
139static struct clk clk_timer_scaler[] = {
140 [0] = {
141 .name = "pwm-scaler0",
142 .id = -1,
143 .ops = &clk_pwm_scaler_ops,
144 },
145 [1] = {
146 .name = "pwm-scaler1",
147 .id = -1,
148 .ops = &clk_pwm_scaler_ops,
149 },
150};
151
152static struct clk clk_timer_tclk[] = {
153 [0] = {
154 .name = "pwm-tclk0",
155 .id = -1,
156 },
157 [1] = {
158 .name = "pwm-tclk1",
159 .id = -1,
160 },
161};
162
163struct pwm_tdiv_clk {
164 struct clk clk;
165 unsigned int divisor;
166};
167
168static inline struct pwm_tdiv_clk *to_tdiv(struct clk *clk)
169{
170 return container_of(clk, struct pwm_tdiv_clk, clk);
171}
172
173static unsigned long clk_pwm_tdiv_get_rate(struct clk *clk)
174{
175 unsigned long tcfg1 = __raw_readl(S3C2410_TCFG1);
176 unsigned int divisor;
177
178 tcfg1 >>= S3C2410_TCFG1_SHIFT(clk->id);
179 tcfg1 &= S3C2410_TCFG1_MUX_MASK;
180
181 if (pwm_cfg_src_is_tclk(tcfg1))
182 divisor = to_tdiv(clk)->divisor;
183 else
184 divisor = tcfg_to_divisor(tcfg1);
185
186 return clk_get_rate(clk->parent) / divisor;
187}
188
189static unsigned long clk_pwm_tdiv_round_rate(struct clk *clk,
190 unsigned long rate)
191{
192 unsigned long parent_rate;
193 unsigned long divisor;
194
195 parent_rate = clk_get_rate(clk->parent);
196 divisor = parent_rate / rate;
197
198 if (divisor <= 1 && pwm_tdiv_has_div1())
199 divisor = 1;
200 else if (divisor <= 2)
201 divisor = 2;
202 else if (divisor <= 4)
203 divisor = 4;
204 else if (divisor <= 8)
205 divisor = 8;
206 else
207 divisor = 16;
208
209 return parent_rate / divisor;
210}
211
212static unsigned long clk_pwm_tdiv_bits(struct pwm_tdiv_clk *divclk)
213{
214 return pwm_tdiv_div_bits(divclk->divisor);
215}
216
217static void clk_pwm_tdiv_update(struct pwm_tdiv_clk *divclk)
218{
219 unsigned long tcfg1 = __raw_readl(S3C2410_TCFG1);
220 unsigned long bits = clk_pwm_tdiv_bits(divclk);
221 unsigned long flags;
222 unsigned long shift = S3C2410_TCFG1_SHIFT(divclk->clk.id);
223
224 local_irq_save(flags);
225
226 tcfg1 = __raw_readl(S3C2410_TCFG1);
227 tcfg1 &= ~(S3C2410_TCFG1_MUX_MASK << shift);
228 tcfg1 |= bits << shift;
229 __raw_writel(tcfg1, S3C2410_TCFG1);
230
231 local_irq_restore(flags);
232}
233
234static int clk_pwm_tdiv_set_rate(struct clk *clk, unsigned long rate)
235{
236 struct pwm_tdiv_clk *divclk = to_tdiv(clk);
237 unsigned long tcfg1 = __raw_readl(S3C2410_TCFG1);
238 unsigned long parent_rate = clk_get_rate(clk->parent);
239 unsigned long divisor;
240
241 tcfg1 >>= S3C2410_TCFG1_SHIFT(clk->id);
242 tcfg1 &= S3C2410_TCFG1_MUX_MASK;
243
244 rate = clk_round_rate(clk, rate);
245 divisor = parent_rate / rate;
246
247 if (divisor > 16)
248 return -EINVAL;
249
250 divclk->divisor = divisor;
251
252 /* Update the current MUX settings if we are currently
253 * selected as the clock source for this clock. */
254
255 if (!pwm_cfg_src_is_tclk(tcfg1))
256 clk_pwm_tdiv_update(divclk);
257
258 return 0;
259}
260
261static struct clk_ops clk_tdiv_ops = {
262 .get_rate = clk_pwm_tdiv_get_rate,
263 .set_rate = clk_pwm_tdiv_set_rate,
264 .round_rate = clk_pwm_tdiv_round_rate,
265};
266
267static struct pwm_tdiv_clk clk_timer_tdiv[] = {
268 [0] = {
269 .clk = {
270 .name = "pwm-tdiv",
271 .devname = "s3c24xx-pwm.0",
272 .ops = &clk_tdiv_ops,
273 .parent = &clk_timer_scaler[0],
274 },
275 },
276 [1] = {
277 .clk = {
278 .name = "pwm-tdiv",
279 .devname = "s3c24xx-pwm.1",
280 .ops = &clk_tdiv_ops,
281 .parent = &clk_timer_scaler[0],
282 }
283 },
284 [2] = {
285 .clk = {
286 .name = "pwm-tdiv",
287 .devname = "s3c24xx-pwm.2",
288 .ops = &clk_tdiv_ops,
289 .parent = &clk_timer_scaler[1],
290 },
291 },
292 [3] = {
293 .clk = {
294 .name = "pwm-tdiv",
295 .devname = "s3c24xx-pwm.3",
296 .ops = &clk_tdiv_ops,
297 .parent = &clk_timer_scaler[1],
298 },
299 },
300 [4] = {
301 .clk = {
302 .name = "pwm-tdiv",
303 .devname = "s3c24xx-pwm.4",
304 .ops = &clk_tdiv_ops,
305 .parent = &clk_timer_scaler[1],
306 },
307 },
308};
309
310static int __init clk_pwm_tdiv_register(unsigned int id)
311{
312 struct pwm_tdiv_clk *divclk = &clk_timer_tdiv[id];
313 unsigned long tcfg1 = __raw_readl(S3C2410_TCFG1);
314
315 tcfg1 >>= S3C2410_TCFG1_SHIFT(id);
316 tcfg1 &= S3C2410_TCFG1_MUX_MASK;
317
318 divclk->clk.id = id;
319 divclk->divisor = tcfg_to_divisor(tcfg1);
320
321 return s3c24xx_register_clock(&divclk->clk);
322}
323
324static inline struct clk *s3c24xx_pwmclk_tclk(unsigned int id)
325{
326 return (id >= 2) ? &clk_timer_tclk[1] : &clk_timer_tclk[0];
327}
328
329static inline struct clk *s3c24xx_pwmclk_tdiv(unsigned int id)
330{
331 return &clk_timer_tdiv[id].clk;
332}
333
334static int clk_pwm_tin_set_parent(struct clk *clk, struct clk *parent)
335{
336 unsigned int id = clk->id;
337 unsigned long tcfg1;
338 unsigned long flags;
339 unsigned long bits;
340 unsigned long shift = S3C2410_TCFG1_SHIFT(id);
341
342 unsigned long mux_tclk;
343
344 if (soc_is_s3c24xx())
345 mux_tclk = S3C2410_TCFG1_MUX_TCLK;
346 else if (soc_is_s5p6440() || soc_is_s5p6450())
347 mux_tclk = 0;
348 else
349 mux_tclk = S3C64XX_TCFG1_MUX_TCLK;
350
351 if (parent == s3c24xx_pwmclk_tclk(id))
352 bits = mux_tclk << shift;
353 else if (parent == s3c24xx_pwmclk_tdiv(id))
354 bits = clk_pwm_tdiv_bits(to_tdiv(parent)) << shift;
355 else
356 return -EINVAL;
357
358 clk->parent = parent;
359
360 local_irq_save(flags);
361
362 tcfg1 = __raw_readl(S3C2410_TCFG1);
363 tcfg1 &= ~(S3C2410_TCFG1_MUX_MASK << shift);
364 __raw_writel(tcfg1 | bits, S3C2410_TCFG1);
365
366 local_irq_restore(flags);
367
368 return 0;
369}
370
371static struct clk_ops clk_tin_ops = {
372 .set_parent = clk_pwm_tin_set_parent,
373};
374
375static struct clk clk_tin[] = {
376 [0] = {
377 .name = "pwm-tin",
378 .devname = "s3c24xx-pwm.0",
379 .id = 0,
380 .ops = &clk_tin_ops,
381 },
382 [1] = {
383 .name = "pwm-tin",
384 .devname = "s3c24xx-pwm.1",
385 .id = 1,
386 .ops = &clk_tin_ops,
387 },
388 [2] = {
389 .name = "pwm-tin",
390 .devname = "s3c24xx-pwm.2",
391 .id = 2,
392 .ops = &clk_tin_ops,
393 },
394 [3] = {
395 .name = "pwm-tin",
396 .devname = "s3c24xx-pwm.3",
397 .id = 3,
398 .ops = &clk_tin_ops,
399 },
400 [4] = {
401 .name = "pwm-tin",
402 .devname = "s3c24xx-pwm.4",
403 .id = 4,
404 .ops = &clk_tin_ops,
405 },
406};
407
408static __init int clk_pwm_tin_register(struct clk *pwm)
409{
410 unsigned long tcfg1 = __raw_readl(S3C2410_TCFG1);
411 unsigned int id = pwm->id;
412
413 struct clk *parent;
414 int ret;
415
416 ret = s3c24xx_register_clock(pwm);
417 if (ret < 0)
418 return ret;
419
420 tcfg1 >>= S3C2410_TCFG1_SHIFT(id);
421 tcfg1 &= S3C2410_TCFG1_MUX_MASK;
422
423 if (pwm_cfg_src_is_tclk(tcfg1))
424 parent = s3c24xx_pwmclk_tclk(id);
425 else
426 parent = s3c24xx_pwmclk_tdiv(id);
427
428 return clk_set_parent(pwm, parent);
429}
430
431/**
432 * s3c_pwmclk_init() - initialise pwm clocks
433 *
434 * Initialise and register the clocks which provide the inputs for the
435 * pwm timer blocks.
436 *
437 * Note, this call is required by the time core, so must be called after
438 * the base clocks are added and before any of the initcalls are run.
439 */
440__init void s3c_pwmclk_init(void)
441{
442 struct clk *clk_timers;
443 unsigned int clk;
444 int ret;
445
446 clk_timers = clk_get(NULL, "timers");
447 if (IS_ERR(clk_timers)) {
448 printk(KERN_ERR "%s: no parent clock\n", __func__);
449 return;
450 }
451
452 for (clk = 0; clk < ARRAY_SIZE(clk_timer_scaler); clk++)
453 clk_timer_scaler[clk].parent = clk_timers;
454
455 s3c_register_clocks(clk_timer_scaler, ARRAY_SIZE(clk_timer_scaler));
456 s3c_register_clocks(clk_timer_tclk, ARRAY_SIZE(clk_timer_tclk));
457
458 for (clk = 0; clk < ARRAY_SIZE(clk_timer_tdiv); clk++) {
459 ret = clk_pwm_tdiv_register(clk);
460
461 if (ret < 0) {
462 printk(KERN_ERR "error adding pwm%d tdiv clock\n", clk);
463 return;
464 }
465 }
466
467 for (clk = 0; clk < ARRAY_SIZE(clk_tin); clk++) {
468 ret = clk_pwm_tin_register(&clk_tin[clk]);
469 if (ret < 0) {
470 printk(KERN_ERR "error adding pwm%d tin clock\n", clk);
471 return;
472 }
473 }
474}
diff --git a/arch/arm/plat-samsung/s5p-irq.c b/arch/arm/plat-samsung/s5p-irq.c
index ff1a76011b1e..ddfaca9c79d8 100644
--- a/arch/arm/plat-samsung/s5p-irq.c
+++ b/arch/arm/plat-samsung/s5p-irq.c
@@ -17,9 +17,7 @@
17 17
18#include <mach/irqs.h> 18#include <mach/irqs.h>
19#include <mach/map.h> 19#include <mach/map.h>
20#include <plat/regs-timer.h>
21#include <plat/cpu.h> 20#include <plat/cpu.h>
22#include <plat/irq-vic-timer.h>
23 21
24void __init s5p_init_irq(u32 *vic, u32 num_vic) 22void __init s5p_init_irq(u32 *vic, u32 num_vic)
25{ 23{
@@ -30,6 +28,4 @@ void __init s5p_init_irq(u32 *vic, u32 num_vic)
30 for (irq = 0; irq < num_vic; irq++) 28 for (irq = 0; irq < num_vic; irq++)
31 vic_init(VA_VIC(irq), VIC_BASE(irq), vic[irq], 0); 29 vic_init(VA_VIC(irq), VIC_BASE(irq), vic[irq], 0);
32#endif 30#endif
33
34 s3c_init_vic_timer_irq(5, IRQ_TIMER0);
35} 31}
diff --git a/arch/arm/plat-samsung/samsung-time.c b/arch/arm/plat-samsung/samsung-time.c
deleted file mode 100644
index 2957075ca836..000000000000
--- a/arch/arm/plat-samsung/samsung-time.c
+++ /dev/null
@@ -1,394 +0,0 @@
1/*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com/
4 *
5 * samsung - Common hr-timer support (s3c and s5p)
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#include <linux/interrupt.h>
13#include <linux/irq.h>
14#include <linux/err.h>
15#include <linux/clk.h>
16#include <linux/clockchips.h>
17#include <linux/platform_device.h>
18#include <linux/sched_clock.h>
19
20#include <asm/smp_twd.h>
21#include <asm/mach/time.h>
22#include <asm/mach/arch.h>
23#include <asm/mach/map.h>
24
25#include <mach/map.h>
26#include <plat/devs.h>
27#include <plat/regs-timer.h>
28#include <plat/samsung-time.h>
29
30static struct clk *tin_event;
31static struct clk *tin_source;
32static struct clk *tdiv_event;
33static struct clk *tdiv_source;
34static struct clk *timerclk;
35static struct samsung_timer_source timer_source;
36static unsigned long clock_count_per_tick;
37static void samsung_timer_resume(void);
38
39static void samsung_time_stop(enum samsung_timer_mode mode)
40{
41 unsigned long tcon;
42
43 tcon = __raw_readl(S3C2410_TCON);
44
45 switch (mode) {
46 case SAMSUNG_PWM0:
47 tcon &= ~S3C2410_TCON_T0START;
48 break;
49
50 case SAMSUNG_PWM1:
51 tcon &= ~S3C2410_TCON_T1START;
52 break;
53
54 case SAMSUNG_PWM2:
55 tcon &= ~S3C2410_TCON_T2START;
56 break;
57
58 case SAMSUNG_PWM3:
59 tcon &= ~S3C2410_TCON_T3START;
60 break;
61
62 case SAMSUNG_PWM4:
63 tcon &= ~S3C2410_TCON_T4START;
64 break;
65
66 default:
67 printk(KERN_ERR "Invalid Timer %d\n", mode);
68 break;
69 }
70 __raw_writel(tcon, S3C2410_TCON);
71}
72
73static void samsung_time_setup(enum samsung_timer_mode mode, unsigned long tcnt)
74{
75 unsigned long tcon;
76
77 tcon = __raw_readl(S3C2410_TCON);
78
79 tcnt--;
80
81 switch (mode) {
82 case SAMSUNG_PWM0:
83 tcon &= ~(0x0f << 0);
84 tcon |= S3C2410_TCON_T0MANUALUPD;
85 break;
86
87 case SAMSUNG_PWM1:
88 tcon &= ~(0x0f << 8);
89 tcon |= S3C2410_TCON_T1MANUALUPD;
90 break;
91
92 case SAMSUNG_PWM2:
93 tcon &= ~(0x0f << 12);
94 tcon |= S3C2410_TCON_T2MANUALUPD;
95 break;
96
97 case SAMSUNG_PWM3:
98 tcon &= ~(0x0f << 16);
99 tcon |= S3C2410_TCON_T3MANUALUPD;
100 break;
101
102 case SAMSUNG_PWM4:
103 tcon &= ~(0x07 << 20);
104 tcon |= S3C2410_TCON_T4MANUALUPD;
105 break;
106
107 default:
108 printk(KERN_ERR "Invalid Timer %d\n", mode);
109 break;
110 }
111
112 __raw_writel(tcnt, S3C2410_TCNTB(mode));
113 __raw_writel(tcnt, S3C2410_TCMPB(mode));
114 __raw_writel(tcon, S3C2410_TCON);
115}
116
117static void samsung_time_start(enum samsung_timer_mode mode, bool periodic)
118{
119 unsigned long tcon;
120
121 tcon = __raw_readl(S3C2410_TCON);
122
123 switch (mode) {
124 case SAMSUNG_PWM0:
125 tcon |= S3C2410_TCON_T0START;
126 tcon &= ~S3C2410_TCON_T0MANUALUPD;
127
128 if (periodic)
129 tcon |= S3C2410_TCON_T0RELOAD;
130 else
131 tcon &= ~S3C2410_TCON_T0RELOAD;
132 break;
133
134 case SAMSUNG_PWM1:
135 tcon |= S3C2410_TCON_T1START;
136 tcon &= ~S3C2410_TCON_T1MANUALUPD;
137
138 if (periodic)
139 tcon |= S3C2410_TCON_T1RELOAD;
140 else
141 tcon &= ~S3C2410_TCON_T1RELOAD;
142 break;
143
144 case SAMSUNG_PWM2:
145 tcon |= S3C2410_TCON_T2START;
146 tcon &= ~S3C2410_TCON_T2MANUALUPD;
147
148 if (periodic)
149 tcon |= S3C2410_TCON_T2RELOAD;
150 else
151 tcon &= ~S3C2410_TCON_T2RELOAD;
152 break;
153
154 case SAMSUNG_PWM3:
155 tcon |= S3C2410_TCON_T3START;
156 tcon &= ~S3C2410_TCON_T3MANUALUPD;
157
158 if (periodic)
159 tcon |= S3C2410_TCON_T3RELOAD;
160 else
161 tcon &= ~S3C2410_TCON_T3RELOAD;
162 break;
163
164 case SAMSUNG_PWM4:
165 tcon |= S3C2410_TCON_T4START;
166 tcon &= ~S3C2410_TCON_T4MANUALUPD;
167
168 if (periodic)
169 tcon |= S3C2410_TCON_T4RELOAD;
170 else
171 tcon &= ~S3C2410_TCON_T4RELOAD;
172 break;
173
174 default:
175 printk(KERN_ERR "Invalid Timer %d\n", mode);
176 break;
177 }
178 __raw_writel(tcon, S3C2410_TCON);
179}
180
181static int samsung_set_next_event(unsigned long cycles,
182 struct clock_event_device *evt)
183{
184 samsung_time_setup(timer_source.event_id, cycles);
185 samsung_time_start(timer_source.event_id, NON_PERIODIC);
186
187 return 0;
188}
189
190static void samsung_set_mode(enum clock_event_mode mode,
191 struct clock_event_device *evt)
192{
193 samsung_time_stop(timer_source.event_id);
194
195 switch (mode) {
196 case CLOCK_EVT_MODE_PERIODIC:
197 samsung_time_setup(timer_source.event_id, clock_count_per_tick);
198 samsung_time_start(timer_source.event_id, PERIODIC);
199 break;
200
201 case CLOCK_EVT_MODE_ONESHOT:
202 break;
203
204 case CLOCK_EVT_MODE_UNUSED:
205 case CLOCK_EVT_MODE_SHUTDOWN:
206 break;
207
208 case CLOCK_EVT_MODE_RESUME:
209 samsung_timer_resume();
210 break;
211 }
212}
213
214static void samsung_timer_resume(void)
215{
216 /* event timer restart */
217 samsung_time_setup(timer_source.event_id, clock_count_per_tick);
218 samsung_time_start(timer_source.event_id, PERIODIC);
219
220 /* source timer restart */
221 samsung_time_setup(timer_source.source_id, TCNT_MAX);
222 samsung_time_start(timer_source.source_id, PERIODIC);
223}
224
225void __init samsung_set_timer_source(enum samsung_timer_mode event,
226 enum samsung_timer_mode source)
227{
228 s3c_device_timer[event].dev.bus = &platform_bus_type;
229 s3c_device_timer[source].dev.bus = &platform_bus_type;
230
231 timer_source.event_id = event;
232 timer_source.source_id = source;
233}
234
235static struct clock_event_device time_event_device = {
236 .name = "samsung_event_timer",
237 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
238 .rating = 200,
239 .set_next_event = samsung_set_next_event,
240 .set_mode = samsung_set_mode,
241};
242
243static irqreturn_t samsung_clock_event_isr(int irq, void *dev_id)
244{
245 struct clock_event_device *evt = dev_id;
246
247 evt->event_handler(evt);
248
249 return IRQ_HANDLED;
250}
251
252static struct irqaction samsung_clock_event_irq = {
253 .name = "samsung_time_irq",
254 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
255 .handler = samsung_clock_event_isr,
256 .dev_id = &time_event_device,
257};
258
259static void __init samsung_clockevent_init(void)
260{
261 unsigned long pclk;
262 unsigned long clock_rate;
263 unsigned int irq_number;
264 struct clk *tscaler;
265
266 pclk = clk_get_rate(timerclk);
267
268 tscaler = clk_get_parent(tdiv_event);
269
270 clk_set_rate(tscaler, pclk / TSCALER_DIV);
271 clk_set_rate(tdiv_event, pclk / TDIV);
272 clk_set_parent(tin_event, tdiv_event);
273
274 clock_rate = clk_get_rate(tin_event);
275 clock_count_per_tick = clock_rate / HZ;
276
277 time_event_device.cpumask = cpumask_of(0);
278 clockevents_config_and_register(&time_event_device, clock_rate, 1, -1);
279
280 irq_number = timer_source.event_id + IRQ_TIMER0;
281 setup_irq(irq_number, &samsung_clock_event_irq);
282}
283
284static void __iomem *samsung_timer_reg(void)
285{
286 unsigned long offset = 0;
287
288 switch (timer_source.source_id) {
289 case SAMSUNG_PWM0:
290 case SAMSUNG_PWM1:
291 case SAMSUNG_PWM2:
292 case SAMSUNG_PWM3:
293 offset = (timer_source.source_id * 0x0c) + 0x14;
294 break;
295
296 case SAMSUNG_PWM4:
297 offset = 0x40;
298 break;
299
300 default:
301 printk(KERN_ERR "Invalid Timer %d\n", timer_source.source_id);
302 return NULL;
303 }
304
305 return S3C_TIMERREG(offset);
306}
307
308/*
309 * Override the global weak sched_clock symbol with this
310 * local implementation which uses the clocksource to get some
311 * better resolution when scheduling the kernel. We accept that
312 * this wraps around for now, since it is just a relative time
313 * stamp. (Inspired by U300 implementation.)
314 */
315static u32 notrace samsung_read_sched_clock(void)
316{
317 void __iomem *reg = samsung_timer_reg();
318
319 if (!reg)
320 return 0;
321
322 return ~__raw_readl(reg);
323}
324
325static void __init samsung_clocksource_init(void)
326{
327 unsigned long pclk;
328 unsigned long clock_rate;
329
330 pclk = clk_get_rate(timerclk);
331
332 clk_set_rate(tdiv_source, pclk / TDIV);
333 clk_set_parent(tin_source, tdiv_source);
334
335 clock_rate = clk_get_rate(tin_source);
336
337 samsung_time_setup(timer_source.source_id, TCNT_MAX);
338 samsung_time_start(timer_source.source_id, PERIODIC);
339
340 setup_sched_clock(samsung_read_sched_clock, TSIZE, clock_rate);
341
342 if (clocksource_mmio_init(samsung_timer_reg(), "samsung_clocksource_timer",
343 clock_rate, 250, TSIZE, clocksource_mmio_readl_down))
344 panic("samsung_clocksource_timer: can't register clocksource\n");
345}
346
347static void __init samsung_timer_resources(void)
348{
349
350 unsigned long event_id = timer_source.event_id;
351 unsigned long source_id = timer_source.source_id;
352 char devname[15];
353
354 timerclk = clk_get(NULL, "timers");
355 if (IS_ERR(timerclk))
356 panic("failed to get timers clock for timer");
357
358 clk_enable(timerclk);
359
360 sprintf(devname, "s3c24xx-pwm.%lu", event_id);
361 s3c_device_timer[event_id].id = event_id;
362 s3c_device_timer[event_id].dev.init_name = devname;
363
364 tin_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tin");
365 if (IS_ERR(tin_event))
366 panic("failed to get pwm-tin clock for event timer");
367
368 tdiv_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tdiv");
369 if (IS_ERR(tdiv_event))
370 panic("failed to get pwm-tdiv clock for event timer");
371
372 clk_enable(tin_event);
373
374 sprintf(devname, "s3c24xx-pwm.%lu", source_id);
375 s3c_device_timer[source_id].id = source_id;
376 s3c_device_timer[source_id].dev.init_name = devname;
377
378 tin_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tin");
379 if (IS_ERR(tin_source))
380 panic("failed to get pwm-tin clock for source timer");
381
382 tdiv_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tdiv");
383 if (IS_ERR(tdiv_source))
384 panic("failed to get pwm-tdiv clock for source timer");
385
386 clk_enable(tin_source);
387}
388
389void __init samsung_timer_init(void)
390{
391 samsung_timer_resources();
392 samsung_clockevent_init();
393 samsung_clocksource_init();
394}
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
index 47fe66fe61f1..3ca5957b7a34 100644
--- a/arch/x86/platform/mrst/mrst.c
+++ b/arch/x86/platform/mrst/mrst.c
@@ -20,7 +20,7 @@
20#include <linux/intel_pmic_gpio.h> 20#include <linux/intel_pmic_gpio.h>
21#include <linux/spi/spi.h> 21#include <linux/spi/spi.h>
22#include <linux/i2c.h> 22#include <linux/i2c.h>
23#include <linux/i2c/pca953x.h> 23#include <linux/platform_data/pca953x.h>
24#include <linux/gpio_keys.h> 24#include <linux/gpio_keys.h>
25#include <linux/input.h> 25#include <linux/input.h>
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>