diff options
Diffstat (limited to 'arch')
145 files changed, 11223 insertions, 3565 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b64e465ac49c..f401b92a99f5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -831,7 +831,7 @@ config ARCH_OMAP | |||
831 | select GENERIC_CLOCKEVENTS | 831 | select GENERIC_CLOCKEVENTS |
832 | select ARCH_HAS_HOLES_MEMORYMODEL | 832 | select ARCH_HAS_HOLES_MEMORYMODEL |
833 | help | 833 | help |
834 | Support for TI's OMAP platform (OMAP1 and OMAP2). | 834 | Support for TI's OMAP platform (OMAP1/2/3/4). |
835 | 835 | ||
836 | config PLAT_SPEAR | 836 | config PLAT_SPEAR |
837 | bool "ST SPEAr" | 837 | bool "ST SPEAr" |
diff --git a/arch/arm/configs/n8x0_defconfig b/arch/arm/configs/n8x0_defconfig deleted file mode 100644 index 56aebb69411d..000000000000 --- a/arch/arm/configs/n8x0_defconfig +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | ||
4 | CONFIG_BLK_DEV_INITRD=y | ||
5 | CONFIG_MODULES=y | ||
6 | CONFIG_MODULE_UNLOAD=y | ||
7 | # CONFIG_LBDAF is not set | ||
8 | # CONFIG_BLK_DEV_BSG is not set | ||
9 | # CONFIG_IOSCHED_DEADLINE is not set | ||
10 | CONFIG_ARCH_OMAP=y | ||
11 | CONFIG_ARCH_OMAP2=y | ||
12 | CONFIG_OMAP_RESET_CLOCKS=y | ||
13 | # CONFIG_OMAP_MUX is not set | ||
14 | # CONFIG_OMAP_MCBSP is not set | ||
15 | CONFIG_OMAP_MBOX_FWK=y | ||
16 | CONFIG_OMAP_32K_TIMER=y | ||
17 | CONFIG_ARCH_OMAP2420=y | ||
18 | CONFIG_MACH_NOKIA_N8X0=y | ||
19 | CONFIG_AEABI=y | ||
20 | CONFIG_LEDS=y | ||
21 | CONFIG_ZBOOT_ROM_TEXT=0x10C08000 | ||
22 | CONFIG_ZBOOT_ROM_BSS=0x10200000 | ||
23 | CONFIG_CMDLINE="root=/dev/mmcblk0p2 console=ttyS2,115200n8 debug earlyprintk rootwait" | ||
24 | CONFIG_FPE_NWFPE=y | ||
25 | CONFIG_VFP=y | ||
26 | CONFIG_PM=y | ||
27 | CONFIG_PM_RUNTIME=y | ||
28 | CONFIG_NET=y | ||
29 | CONFIG_UNIX=y | ||
30 | CONFIG_INET=y | ||
31 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
32 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
33 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
34 | # CONFIG_INET_LRO is not set | ||
35 | # CONFIG_IPV6 is not set | ||
36 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
37 | CONFIG_MTD=y | ||
38 | CONFIG_MTD_CMDLINE_PARTS=y | ||
39 | CONFIG_MTD_ONENAND=y | ||
40 | CONFIG_MTD_ONENAND_OMAP2=y | ||
41 | CONFIG_MTD_ONENAND_OTP=y | ||
42 | CONFIG_BLK_DEV_RAM=y | ||
43 | # CONFIG_MISC_DEVICES is not set | ||
44 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
45 | # CONFIG_INPUT_KEYBOARD is not set | ||
46 | # CONFIG_INPUT_MOUSE is not set | ||
47 | CONFIG_SERIAL_8250=y | ||
48 | CONFIG_SERIAL_8250_CONSOLE=y | ||
49 | # CONFIG_LEGACY_PTYS is not set | ||
50 | # CONFIG_HW_RANDOM is not set | ||
51 | CONFIG_I2C=y | ||
52 | # CONFIG_I2C_COMPAT is not set | ||
53 | # CONFIG_I2C_HELPER_AUTO is not set | ||
54 | CONFIG_I2C_OMAP=y | ||
55 | CONFIG_SPI=y | ||
56 | CONFIG_SPI_OMAP24XX=y | ||
57 | # CONFIG_HWMON is not set | ||
58 | CONFIG_MENELAUS=y | ||
59 | CONFIG_REGULATOR=y | ||
60 | # CONFIG_VGA_CONSOLE is not set | ||
61 | # CONFIG_HID_SUPPORT is not set | ||
62 | CONFIG_USB=y | ||
63 | CONFIG_USB_DEBUG=y | ||
64 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y | ||
65 | CONFIG_USB_DEVICEFS=y | ||
66 | CONFIG_USB_SUSPEND=y | ||
67 | # CONFIG_USB_OTG_WHITELIST is not set | ||
68 | CONFIG_USB_MUSB_HDRC=y | ||
69 | CONFIG_USB_MUSB_OTG=y | ||
70 | CONFIG_USB_GADGET_MUSB_HDRC=y | ||
71 | # CONFIG_MUSB_PIO_ONLY is not set | ||
72 | CONFIG_USB_MUSB_DEBUG=y | ||
73 | CONFIG_USB_GADGET=y | ||
74 | CONFIG_USB_GADGET_DEBUG=y | ||
75 | CONFIG_USB_GADGET_DEBUG_FILES=y | ||
76 | CONFIG_USB_ETH=m | ||
77 | CONFIG_USB_ETH_EEM=y | ||
78 | CONFIG_MMC=y | ||
79 | CONFIG_MMC_OMAP=y | ||
80 | CONFIG_EXT3_FS=y | ||
81 | CONFIG_INOTIFY=y | ||
82 | CONFIG_VFAT_FS=y | ||
83 | CONFIG_TMPFS=y | ||
84 | CONFIG_JFFS2_FS=y | ||
85 | CONFIG_JFFS2_SUMMARY=y | ||
86 | CONFIG_JFFS2_COMPRESSION_OPTIONS=y | ||
87 | CONFIG_JFFS2_LZO=y | ||
88 | CONFIG_PRINTK_TIME=y | ||
89 | CONFIG_DEBUG_KERNEL=y | ||
90 | CONFIG_DEBUG_INFO=y | ||
91 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
92 | CONFIG_DEBUG_USER=y | ||
93 | CONFIG_DEBUG_ERRORS=y | ||
94 | CONFIG_CRC_CCITT=y | ||
diff --git a/arch/arm/configs/omap3_defconfig b/arch/arm/configs/omap2plus_defconfig index 5db9a6be2054..ccedde1371c3 100644 --- a/arch/arm/configs/omap3_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
@@ -53,18 +53,18 @@ CONFIG_MACH_SBC3530=y | |||
53 | CONFIG_MACH_OMAP_3630SDP=y | 53 | CONFIG_MACH_OMAP_3630SDP=y |
54 | CONFIG_MACH_OMAP_4430SDP=y | 54 | CONFIG_MACH_OMAP_4430SDP=y |
55 | CONFIG_ARM_THUMBEE=y | 55 | CONFIG_ARM_THUMBEE=y |
56 | CONFIG_ARM_L1_CACHE_SHIFT=5 | ||
57 | CONFIG_ARM_ERRATA_411920=y | ||
56 | CONFIG_NO_HZ=y | 58 | CONFIG_NO_HZ=y |
57 | CONFIG_HIGH_RES_TIMERS=y | 59 | CONFIG_HIGH_RES_TIMERS=y |
60 | CONFIG_SMP=y | ||
61 | # CONFIG_LOCAL_TIMERS is not set | ||
58 | CONFIG_AEABI=y | 62 | CONFIG_AEABI=y |
59 | CONFIG_LEDS=y | 63 | CONFIG_LEDS=y |
60 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 64 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
61 | CONFIG_ZBOOT_ROM_BSS=0x0 | 65 | CONFIG_ZBOOT_ROM_BSS=0x0 |
62 | CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyS2,115200" | 66 | CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" |
63 | CONFIG_KEXEC=y | 67 | CONFIG_KEXEC=y |
64 | CONFIG_CPU_FREQ=y | ||
65 | CONFIG_CPU_FREQ_STAT_DETAILS=y | ||
66 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | ||
67 | CONFIG_CPU_FREQ_GOV_ONDEMAND=y | ||
68 | CONFIG_FPE_NWFPE=y | 68 | CONFIG_FPE_NWFPE=y |
69 | CONFIG_VFP=y | 69 | CONFIG_VFP=y |
70 | CONFIG_NEON=y | 70 | CONFIG_NEON=y |
@@ -87,23 +87,23 @@ CONFIG_IP_PNP_RARP=y | |||
87 | # CONFIG_INET_LRO is not set | 87 | # CONFIG_INET_LRO is not set |
88 | # CONFIG_IPV6 is not set | 88 | # CONFIG_IPV6 is not set |
89 | CONFIG_NETFILTER=y | 89 | CONFIG_NETFILTER=y |
90 | CONFIG_BT=y | 90 | CONFIG_BT=m |
91 | CONFIG_BT_L2CAP=y | 91 | CONFIG_BT_L2CAP=m |
92 | CONFIG_BT_SCO=y | 92 | CONFIG_BT_SCO=m |
93 | CONFIG_BT_RFCOMM=y | 93 | CONFIG_BT_RFCOMM=y |
94 | CONFIG_BT_RFCOMM_TTY=y | 94 | CONFIG_BT_RFCOMM_TTY=y |
95 | CONFIG_BT_BNEP=y | 95 | CONFIG_BT_BNEP=m |
96 | CONFIG_BT_BNEP_MC_FILTER=y | 96 | CONFIG_BT_BNEP_MC_FILTER=y |
97 | CONFIG_BT_BNEP_PROTO_FILTER=y | 97 | CONFIG_BT_BNEP_PROTO_FILTER=y |
98 | CONFIG_BT_HIDP=y | 98 | CONFIG_BT_HIDP=m |
99 | CONFIG_BT_HCIUART=y | 99 | CONFIG_BT_HCIUART=m |
100 | CONFIG_BT_HCIUART_H4=y | 100 | CONFIG_BT_HCIUART_H4=y |
101 | CONFIG_BT_HCIUART_BCSP=y | 101 | CONFIG_BT_HCIUART_BCSP=y |
102 | CONFIG_BT_HCIUART_LL=y | 102 | CONFIG_BT_HCIUART_LL=y |
103 | CONFIG_BT_HCIBCM203X=y | 103 | CONFIG_BT_HCIBCM203X=m |
104 | CONFIG_BT_HCIBPA10X=y | 104 | CONFIG_BT_HCIBPA10X=m |
105 | CONFIG_CFG80211=y | 105 | CONFIG_CFG80211=m |
106 | CONFIG_MAC80211=y | 106 | CONFIG_MAC80211=m |
107 | CONFIG_MAC80211_RC_PID=y | 107 | CONFIG_MAC80211_RC_PID=y |
108 | CONFIG_MAC80211_RC_DEFAULT_PID=y | 108 | CONFIG_MAC80211_RC_DEFAULT_PID=y |
109 | CONFIG_MAC80211_LEDS=y | 109 | CONFIG_MAC80211_LEDS=y |
@@ -137,9 +137,11 @@ CONFIG_SMSC_PHY=y | |||
137 | CONFIG_NET_ETHERNET=y | 137 | CONFIG_NET_ETHERNET=y |
138 | CONFIG_SMC91X=y | 138 | CONFIG_SMC91X=y |
139 | CONFIG_SMSC911X=y | 139 | CONFIG_SMSC911X=y |
140 | CONFIG_LIBERTAS=y | 140 | CONFIG_KS8851=y |
141 | CONFIG_LIBERTAS_USB=y | 141 | CONFIG_KS8851_MLL=y |
142 | CONFIG_LIBERTAS_SDIO=y | 142 | CONFIG_LIBERTAS=m |
143 | CONFIG_LIBERTAS_USB=m | ||
144 | CONFIG_LIBERTAS_SDIO=m | ||
143 | CONFIG_LIBERTAS_DEBUG=y | 145 | CONFIG_LIBERTAS_DEBUG=y |
144 | CONFIG_USB_USBNET=y | 146 | CONFIG_USB_USBNET=y |
145 | CONFIG_USB_ALI_M5632=y | 147 | CONFIG_USB_ALI_M5632=y |
@@ -201,8 +203,8 @@ CONFIG_FONTS=y | |||
201 | CONFIG_FONT_8x8=y | 203 | CONFIG_FONT_8x8=y |
202 | CONFIG_FONT_8x16=y | 204 | CONFIG_FONT_8x16=y |
203 | CONFIG_LOGO=y | 205 | CONFIG_LOGO=y |
204 | CONFIG_SOUND=y | 206 | CONFIG_SOUND=m |
205 | CONFIG_SND=y | 207 | CONFIG_SND=m |
206 | CONFIG_SND_MIXER_OSS=y | 208 | CONFIG_SND_MIXER_OSS=y |
207 | CONFIG_SND_PCM_OSS=y | 209 | CONFIG_SND_PCM_OSS=y |
208 | CONFIG_SND_VERBOSE_PRINTK=y | 210 | CONFIG_SND_VERBOSE_PRINTK=y |
@@ -218,9 +220,9 @@ CONFIG_USB_DEVICEFS=y | |||
218 | CONFIG_USB_SUSPEND=y | 220 | CONFIG_USB_SUSPEND=y |
219 | # CONFIG_USB_OTG_WHITELIST is not set | 221 | # CONFIG_USB_OTG_WHITELIST is not set |
220 | CONFIG_USB_MON=y | 222 | CONFIG_USB_MON=y |
221 | CONFIG_USB_MUSB_HDRC=y | 223 | # CONFIG_USB_MUSB_HDRC is not set |
222 | CONFIG_USB_MUSB_OTG=y | 224 | # CONFIG_USB_MUSB_OTG is not set |
223 | CONFIG_USB_GADGET_MUSB_HDRC=y | 225 | # CONFIG_USB_GADGET_MUSB_HDRC is not set |
224 | CONFIG_USB_MUSB_DEBUG=y | 226 | CONFIG_USB_MUSB_DEBUG=y |
225 | CONFIG_USB_WDM=y | 227 | CONFIG_USB_WDM=y |
226 | CONFIG_USB_STORAGE=y | 228 | CONFIG_USB_STORAGE=y |
@@ -276,12 +278,11 @@ CONFIG_DEBUG_KERNEL=y | |||
276 | CONFIG_SCHEDSTATS=y | 278 | CONFIG_SCHEDSTATS=y |
277 | CONFIG_TIMER_STATS=y | 279 | CONFIG_TIMER_STATS=y |
278 | CONFIG_PROVE_LOCKING=y | 280 | CONFIG_PROVE_LOCKING=y |
279 | CONFIG_LOCK_STAT=y | 281 | # CONFIG_LOCK_STAT is not set |
280 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | 282 | CONFIG_DEBUG_SPINLOCK_SLEEP=y |
281 | # CONFIG_DEBUG_BUGVERBOSE is not set | 283 | # CONFIG_DEBUG_BUGVERBOSE is not set |
282 | CONFIG_DEBUG_INFO=y | 284 | CONFIG_DEBUG_INFO=y |
283 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 285 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
284 | CONFIG_DEBUG_LL=y | ||
285 | CONFIG_SECURITY=y | 286 | CONFIG_SECURITY=y |
286 | CONFIG_CRYPTO_MICHAEL_MIC=y | 287 | CONFIG_CRYPTO_MICHAEL_MIC=y |
287 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 288 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
diff --git a/arch/arm/configs/omap_4430sdp_defconfig b/arch/arm/configs/omap_4430sdp_defconfig deleted file mode 100644 index 14c1e18c648f..000000000000 --- a/arch/arm/configs/omap_4430sdp_defconfig +++ /dev/null | |||
@@ -1,125 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_BSD_PROCESS_ACCT=y | ||
4 | CONFIG_LOG_BUF_SHIFT=14 | ||
5 | CONFIG_BLK_DEV_INITRD=y | ||
6 | CONFIG_EMBEDDED=y | ||
7 | # CONFIG_SYSCTL_SYSCALL is not set | ||
8 | # CONFIG_ELF_CORE is not set | ||
9 | CONFIG_MODULES=y | ||
10 | CONFIG_MODULE_UNLOAD=y | ||
11 | CONFIG_MODVERSIONS=y | ||
12 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
13 | # CONFIG_BLK_DEV_BSG is not set | ||
14 | CONFIG_ARCH_OMAP=y | ||
15 | CONFIG_ARCH_OMAP4=y | ||
16 | # CONFIG_ARCH_OMAP2PLUS_TYPICAL is not set | ||
17 | # CONFIG_ARCH_OMAP2 is not set | ||
18 | # CONFIG_ARCH_OMAP3 is not set | ||
19 | # CONFIG_OMAP_MUX is not set | ||
20 | CONFIG_OMAP_32K_TIMER=y | ||
21 | CONFIG_OMAP_DM_TIMER=y | ||
22 | CONFIG_MACH_OMAP_4430SDP=y | ||
23 | # CONFIG_ARM_THUMB is not set | ||
24 | CONFIG_PL310_ERRATA_588369=y | ||
25 | CONFIG_SMP=y | ||
26 | CONFIG_NR_CPUS=2 | ||
27 | # CONFIG_LOCAL_TIMERS is not set | ||
28 | CONFIG_PREEMPT=y | ||
29 | CONFIG_AEABI=y | ||
30 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
31 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
32 | CONFIG_CMDLINE="root=/dev/ram0 rw mem=128M console=ttyS2,115200n8 initrd=0x81600000,20M ramdisk_size=20480" | ||
33 | CONFIG_VFP=y | ||
34 | CONFIG_NEON=y | ||
35 | CONFIG_BINFMT_MISC=y | ||
36 | CONFIG_NET=y | ||
37 | CONFIG_PACKET=y | ||
38 | CONFIG_INET=y | ||
39 | CONFIG_IP_PNP=y | ||
40 | CONFIG_IP_PNP_DHCP=y | ||
41 | CONFIG_IP_PNP_BOOTP=y | ||
42 | CONFIG_IP_PNP_RARP=y | ||
43 | # CONFIG_IPV6 is not set | ||
44 | # CONFIG_WIRELESS is not set | ||
45 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
46 | # CONFIG_FW_LOADER is not set | ||
47 | CONFIG_BLK_DEV_LOOP=y | ||
48 | CONFIG_BLK_DEV_RAM=y | ||
49 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
50 | # CONFIG_MISC_DEVICES is not set | ||
51 | CONFIG_NETDEVICES=y | ||
52 | CONFIG_NET_ETHERNET=y | ||
53 | CONFIG_KS8851=y | ||
54 | # CONFIG_NETDEV_1000 is not set | ||
55 | # CONFIG_NETDEV_10000 is not set | ||
56 | # CONFIG_WLAN is not set | ||
57 | # CONFIG_INPUT_MOUSEDEV is not set | ||
58 | CONFIG_INPUT_EVDEV=y | ||
59 | # CONFIG_INPUT_KEYBOARD is not set | ||
60 | # CONFIG_INPUT_MOUSE is not set | ||
61 | # CONFIG_SERIO is not set | ||
62 | CONFIG_SERIAL_8250=y | ||
63 | CONFIG_SERIAL_8250_CONSOLE=y | ||
64 | CONFIG_SERIAL_8250_NR_UARTS=32 | ||
65 | CONFIG_SERIAL_8250_EXTENDED=y | ||
66 | CONFIG_SERIAL_8250_MANY_PORTS=y | ||
67 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
68 | CONFIG_SERIAL_8250_DETECT_IRQ=y | ||
69 | CONFIG_SERIAL_8250_RSA=y | ||
70 | # CONFIG_LEGACY_PTYS is not set | ||
71 | CONFIG_HW_RANDOM=y | ||
72 | CONFIG_I2C=y | ||
73 | CONFIG_I2C_CHARDEV=y | ||
74 | CONFIG_I2C_OMAP=y | ||
75 | CONFIG_SPI=y | ||
76 | CONFIG_SPI_OMAP24XX=y | ||
77 | # CONFIG_HWMON is not set | ||
78 | CONFIG_WATCHDOG=y | ||
79 | CONFIG_OMAP_WATCHDOG=y | ||
80 | CONFIG_TWL4030_CORE=y | ||
81 | CONFIG_REGULATOR=y | ||
82 | CONFIG_REGULATOR_TWL4030=y | ||
83 | # CONFIG_VGA_CONSOLE is not set | ||
84 | # CONFIG_HID_SUPPORT is not set | ||
85 | # CONFIG_USB_SUPPORT is not set | ||
86 | CONFIG_MMC=y | ||
87 | CONFIG_MMC_OMAP_HS=y | ||
88 | CONFIG_RTC_CLASS=y | ||
89 | CONFIG_RTC_DRV_TWL4030=y | ||
90 | CONFIG_EXT2_FS=y | ||
91 | CONFIG_EXT3_FS=y | ||
92 | # CONFIG_EXT3_FS_XATTR is not set | ||
93 | CONFIG_INOTIFY=y | ||
94 | CONFIG_QUOTA=y | ||
95 | CONFIG_QFMT_V2=y | ||
96 | CONFIG_MSDOS_FS=y | ||
97 | CONFIG_VFAT_FS=y | ||
98 | CONFIG_TMPFS=y | ||
99 | CONFIG_NFS_FS=y | ||
100 | CONFIG_NFS_V3=y | ||
101 | CONFIG_NFS_V3_ACL=y | ||
102 | CONFIG_NFS_V4=y | ||
103 | CONFIG_ROOT_NFS=y | ||
104 | CONFIG_PARTITION_ADVANCED=y | ||
105 | CONFIG_NLS_CODEPAGE_437=y | ||
106 | CONFIG_NLS_ISO8859_1=y | ||
107 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
108 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
109 | CONFIG_MAGIC_SYSRQ=y | ||
110 | CONFIG_DEBUG_KERNEL=y | ||
111 | # CONFIG_DETECT_SOFTLOCKUP is not set | ||
112 | CONFIG_DETECT_HUNG_TASK=y | ||
113 | # CONFIG_SCHED_DEBUG is not set | ||
114 | # CONFIG_DEBUG_PREEMPT is not set | ||
115 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
116 | CONFIG_DEBUG_INFO=y | ||
117 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
118 | # CONFIG_FTRACE is not set | ||
119 | # CONFIG_ARM_UNWIND is not set | ||
120 | CONFIG_CRYPTO_ECB=m | ||
121 | CONFIG_CRYPTO_PCBC=m | ||
122 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
123 | CONFIG_CRC_CCITT=y | ||
124 | CONFIG_CRC_T10DIF=y | ||
125 | CONFIG_LIBCRC32C=y | ||
diff --git a/arch/arm/configs/omap_generic_2420_defconfig b/arch/arm/configs/omap_generic_2420_defconfig deleted file mode 100644 index ac08e51180dd..000000000000 --- a/arch/arm/configs/omap_generic_2420_defconfig +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | ||
4 | CONFIG_BLK_DEV_INITRD=y | ||
5 | CONFIG_MODULES=y | ||
6 | CONFIG_MODULE_UNLOAD=y | ||
7 | # CONFIG_BLK_DEV_BSG is not set | ||
8 | CONFIG_ARCH_OMAP=y | ||
9 | CONFIG_ARCH_OMAP2=y | ||
10 | # CONFIG_OMAP_MUX is not set | ||
11 | CONFIG_MACH_OMAP_GENERIC=y | ||
12 | CONFIG_ARCH_OMAP2420=y | ||
13 | CONFIG_LEDS=y | ||
14 | CONFIG_ZBOOT_ROM_TEXT=0x10C08000 | ||
15 | CONFIG_ZBOOT_ROM_BSS=0x10200000 | ||
16 | CONFIG_FPE_NWFPE=y | ||
17 | CONFIG_BLK_DEV_RAM=y | ||
18 | CONFIG_INPUT_EVDEV=y | ||
19 | # CONFIG_INPUT_KEYBOARD is not set | ||
20 | # CONFIG_INPUT_MOUSE is not set | ||
21 | CONFIG_SERIAL_8250=y | ||
22 | CONFIG_SERIAL_8250_CONSOLE=y | ||
23 | # CONFIG_LEGACY_PTYS is not set | ||
24 | CONFIG_WATCHDOG=y | ||
25 | CONFIG_WATCHDOG_NOWAYOUT=y | ||
26 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
27 | # CONFIG_VGA_CONSOLE is not set | ||
28 | CONFIG_EXT2_FS=y | ||
29 | CONFIG_EXT2_FS_XATTR=y | ||
30 | CONFIG_INOTIFY=y | ||
31 | CONFIG_ROMFS_FS=y | ||
32 | CONFIG_DEBUG_KERNEL=y | ||
33 | CONFIG_DEBUG_INFO=y | ||
34 | CONFIG_DEBUG_USER=y | ||
35 | CONFIG_DEBUG_ERRORS=y | ||
36 | CONFIG_DEBUG_LL=y | ||
37 | CONFIG_CRC_CCITT=y | ||
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index facfaeb1ae5c..9a304d854e33 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile | |||
@@ -12,7 +12,7 @@ obj-$(CONFIG_OMAP_MPU_TIMER) += time.o | |||
12 | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o | 12 | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o |
13 | 13 | ||
14 | # Power Management | 14 | # Power Management |
15 | obj-$(CONFIG_PM) += pm.o sleep.o | 15 | obj-$(CONFIG_PM) += pm.o sleep.o pm_bus.o |
16 | 16 | ||
17 | # DSP | 17 | # DSP |
18 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o | 18 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o |
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 73c86392fcd3..1d4163b9f0b7 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -16,9 +16,12 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/input.h> | 17 | #include <linux/input.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/leds.h> | ||
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/serial_8250.h> | 21 | #include <linux/serial_8250.h> |
21 | 22 | ||
23 | #include <media/soc_camera.h> | ||
24 | |||
22 | #include <asm/serial.h> | 25 | #include <asm/serial.h> |
23 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
24 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
@@ -32,6 +35,7 @@ | |||
32 | #include <plat/usb.h> | 35 | #include <plat/usb.h> |
33 | #include <plat/board.h> | 36 | #include <plat/board.h> |
34 | #include <plat/common.h> | 37 | #include <plat/common.h> |
38 | #include <mach/camera.h> | ||
35 | 39 | ||
36 | #include <mach/ams-delta-fiq.h> | 40 | #include <mach/ams-delta-fiq.h> |
37 | 41 | ||
@@ -213,10 +217,56 @@ static struct platform_device ams_delta_led_device = { | |||
213 | .id = -1 | 217 | .id = -1 |
214 | }; | 218 | }; |
215 | 219 | ||
220 | static struct i2c_board_info ams_delta_camera_board_info[] = { | ||
221 | { | ||
222 | I2C_BOARD_INFO("ov6650", 0x60), | ||
223 | }, | ||
224 | }; | ||
225 | |||
226 | #ifdef CONFIG_LEDS_TRIGGERS | ||
227 | DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger); | ||
228 | |||
229 | static int ams_delta_camera_power(struct device *dev, int power) | ||
230 | { | ||
231 | /* | ||
232 | * turn on camera LED | ||
233 | */ | ||
234 | if (power) | ||
235 | led_trigger_event(ams_delta_camera_led_trigger, LED_FULL); | ||
236 | else | ||
237 | led_trigger_event(ams_delta_camera_led_trigger, LED_OFF); | ||
238 | return 0; | ||
239 | } | ||
240 | #else | ||
241 | #define ams_delta_camera_power NULL | ||
242 | #endif | ||
243 | |||
244 | static struct soc_camera_link __initdata ams_delta_iclink = { | ||
245 | .bus_id = 0, /* OMAP1 SoC camera bus */ | ||
246 | .i2c_adapter_id = 1, | ||
247 | .board_info = &ams_delta_camera_board_info[0], | ||
248 | .module_name = "ov6650", | ||
249 | .power = ams_delta_camera_power, | ||
250 | }; | ||
251 | |||
252 | static struct platform_device ams_delta_camera_device = { | ||
253 | .name = "soc-camera-pdrv", | ||
254 | .id = 0, | ||
255 | .dev = { | ||
256 | .platform_data = &ams_delta_iclink, | ||
257 | }, | ||
258 | }; | ||
259 | |||
260 | static struct omap1_cam_platform_data ams_delta_camera_platform_data = { | ||
261 | .camexclk_khz = 12000, /* default 12MHz clock, no extra DPLL */ | ||
262 | .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ | ||
263 | }; | ||
264 | |||
216 | static struct platform_device *ams_delta_devices[] __initdata = { | 265 | static struct platform_device *ams_delta_devices[] __initdata = { |
217 | &ams_delta_kp_device, | 266 | &ams_delta_kp_device, |
218 | &ams_delta_lcd_device, | 267 | &ams_delta_lcd_device, |
219 | &ams_delta_led_device, | 268 | &ams_delta_led_device, |
269 | &ams_delta_camera_device, | ||
220 | }; | 270 | }; |
221 | 271 | ||
222 | static void __init ams_delta_init(void) | 272 | static void __init ams_delta_init(void) |
@@ -225,6 +275,20 @@ static void __init ams_delta_init(void) | |||
225 | omap_cfg_reg(UART1_TX); | 275 | omap_cfg_reg(UART1_TX); |
226 | omap_cfg_reg(UART1_RTS); | 276 | omap_cfg_reg(UART1_RTS); |
227 | 277 | ||
278 | /* parallel camera interface */ | ||
279 | omap_cfg_reg(H19_1610_CAM_EXCLK); | ||
280 | omap_cfg_reg(J15_1610_CAM_LCLK); | ||
281 | omap_cfg_reg(L18_1610_CAM_VS); | ||
282 | omap_cfg_reg(L15_1610_CAM_HS); | ||
283 | omap_cfg_reg(L19_1610_CAM_D0); | ||
284 | omap_cfg_reg(K14_1610_CAM_D1); | ||
285 | omap_cfg_reg(K15_1610_CAM_D2); | ||
286 | omap_cfg_reg(K19_1610_CAM_D3); | ||
287 | omap_cfg_reg(K18_1610_CAM_D4); | ||
288 | omap_cfg_reg(J14_1610_CAM_D5); | ||
289 | omap_cfg_reg(J19_1610_CAM_D6); | ||
290 | omap_cfg_reg(J18_1610_CAM_D7); | ||
291 | |||
228 | iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); | 292 | iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc)); |
229 | 293 | ||
230 | omap_board_config = ams_delta_config; | 294 | omap_board_config = ams_delta_config; |
@@ -236,6 +300,11 @@ static void __init ams_delta_init(void) | |||
236 | ams_delta_latch2_write(~0, 0); | 300 | ams_delta_latch2_write(~0, 0); |
237 | 301 | ||
238 | omap1_usb_init(&ams_delta_usb_config); | 302 | omap1_usb_init(&ams_delta_usb_config); |
303 | omap1_set_camera_info(&ams_delta_camera_platform_data); | ||
304 | #ifdef CONFIG_LEDS_TRIGGERS | ||
305 | led_trigger_register_simple("ams_delta_camera", | ||
306 | &ams_delta_camera_led_trigger); | ||
307 | #endif | ||
239 | platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); | 308 | platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); |
240 | 309 | ||
241 | #ifdef CONFIG_AMS_DELTA_FIQ | 310 | #ifdef CONFIG_AMS_DELTA_FIQ |
diff --git a/arch/arm/mach-omap1/board-h2-mmc.c b/arch/arm/mach-omap1/board-h2-mmc.c index b30c4990744d..f2fc43d8382b 100644 --- a/arch/arm/mach-omap1/board-h2-mmc.c +++ b/arch/arm/mach-omap1/board-h2-mmc.c | |||
@@ -58,8 +58,7 @@ static struct omap_mmc_platform_data mmc1_data = { | |||
58 | .dma_mask = 0xffffffff, | 58 | .dma_mask = 0xffffffff, |
59 | .slots[0] = { | 59 | .slots[0] = { |
60 | .set_power = mmc_set_power, | 60 | .set_power = mmc_set_power, |
61 | .ocr_mask = MMC_VDD_28_29 | MMC_VDD_30_31 | | 61 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
62 | MMC_VDD_32_33 | MMC_VDD_33_34, | ||
63 | .name = "mmcblk", | 62 | .name = "mmcblk", |
64 | }, | 63 | }, |
65 | }; | 64 | }; |
diff --git a/arch/arm/mach-omap1/board-h3-mmc.c b/arch/arm/mach-omap1/board-h3-mmc.c index 54b0f063e263..2098525e7cc5 100644 --- a/arch/arm/mach-omap1/board-h3-mmc.c +++ b/arch/arm/mach-omap1/board-h3-mmc.c | |||
@@ -40,8 +40,7 @@ static struct omap_mmc_platform_data mmc1_data = { | |||
40 | .dma_mask = 0xffffffff, | 40 | .dma_mask = 0xffffffff, |
41 | .slots[0] = { | 41 | .slots[0] = { |
42 | .set_power = mmc_set_power, | 42 | .set_power = mmc_set_power, |
43 | .ocr_mask = MMC_VDD_28_29 | MMC_VDD_30_31 | | 43 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
44 | MMC_VDD_32_33 | MMC_VDD_33_34, | ||
45 | .name = "mmcblk", | 44 | .name = "mmcblk", |
46 | }, | 45 | }, |
47 | }; | 46 | }; |
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 86afb2952225..071af3e47789 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c | |||
@@ -30,6 +30,13 @@ | |||
30 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
32 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
33 | #include <linux/gpio_keys.h> | ||
34 | #include <linux/i2c.h> | ||
35 | #include <linux/i2c-gpio.h> | ||
36 | #include <linux/htcpld.h> | ||
37 | #include <linux/leds.h> | ||
38 | #include <linux/spi/spi.h> | ||
39 | #include <linux/spi/ads7846.h> | ||
33 | 40 | ||
34 | #include <asm/mach-types.h> | 41 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 42 | #include <asm/mach/arch.h> |
@@ -39,6 +46,7 @@ | |||
39 | #include <plat/board.h> | 46 | #include <plat/board.h> |
40 | #include <plat/keypad.h> | 47 | #include <plat/keypad.h> |
41 | #include <plat/usb.h> | 48 | #include <plat/usb.h> |
49 | #include <plat/mmc.h> | ||
42 | 50 | ||
43 | #include <mach/irqs.h> | 51 | #include <mach/irqs.h> |
44 | 52 | ||
@@ -52,13 +60,123 @@ | |||
52 | #define OMAP_LCDC_CTRL_LCD_EN (1 << 0) | 60 | #define OMAP_LCDC_CTRL_LCD_EN (1 << 0) |
53 | #define OMAP_LCDC_STAT_DONE (1 << 0) | 61 | #define OMAP_LCDC_STAT_DONE (1 << 0) |
54 | 62 | ||
55 | static struct omap_lcd_config htcherald_lcd_config __initdata = { | 63 | /* GPIO definitions for the power button and keyboard slide switch */ |
56 | .ctrl_name = "internal", | 64 | #define HTCHERALD_GPIO_POWER 139 |
57 | }; | 65 | #define HTCHERALD_GPIO_SLIDE 174 |
66 | #define HTCHERALD_GIRQ_BTNS 141 | ||
58 | 67 | ||
59 | static struct omap_board_config_kernel htcherald_config[] __initdata = { | 68 | /* GPIO definitions for the touchscreen */ |
60 | { OMAP_TAG_LCD, &htcherald_lcd_config }, | 69 | #define HTCHERALD_GPIO_TS 76 |
61 | }; | 70 | |
71 | /* HTCPLD definitions */ | ||
72 | |||
73 | /* | ||
74 | * CPLD Logic | ||
75 | * | ||
76 | * Chip 3 - 0x03 | ||
77 | * | ||
78 | * Function 7 6 5 4 3 2 1 0 | ||
79 | * ------------------------------------ | ||
80 | * DPAD light x x x x x x x 1 | ||
81 | * SoundDev x x x x 1 x x x | ||
82 | * Screen white 1 x x x x x x x | ||
83 | * MMC power on x x x x x 1 x x | ||
84 | * Happy times (n) 0 x x x x 1 x x | ||
85 | * | ||
86 | * Chip 4 - 0x04 | ||
87 | * | ||
88 | * Function 7 6 5 4 3 2 1 0 | ||
89 | * ------------------------------------ | ||
90 | * Keyboard light x x x x x x x 1 | ||
91 | * LCD Bright (4) x x x x x 1 1 x | ||
92 | * LCD Bright (3) x x x x x 0 1 x | ||
93 | * LCD Bright (2) x x x x x 1 0 x | ||
94 | * LCD Bright (1) x x x x x 0 0 x | ||
95 | * LCD Off x x x x 0 x x x | ||
96 | * LCD image (fb) 1 x x x x x x x | ||
97 | * LCD image (white) 0 x x x x x x x | ||
98 | * Caps lock LED x x 1 x x x x x | ||
99 | * | ||
100 | * Chip 5 - 0x05 | ||
101 | * | ||
102 | * Function 7 6 5 4 3 2 1 0 | ||
103 | * ------------------------------------ | ||
104 | * Red (solid) x x x x x 1 x x | ||
105 | * Red (flash) x x x x x x 1 x | ||
106 | * Green (GSM flash) x x x x 1 x x x | ||
107 | * Green (GSM solid) x x x 1 x x x x | ||
108 | * Green (wifi flash) x x 1 x x x x x | ||
109 | * Blue (bt flash) x 1 x x x x x x | ||
110 | * DPAD Int Enable 1 x x x x x x 0 | ||
111 | * | ||
112 | * (Combinations of the above can be made for different colors.) | ||
113 | * The direction pad interrupt enable must be set each time the | ||
114 | * interrupt is handled. | ||
115 | * | ||
116 | * Chip 6 - 0x06 | ||
117 | * | ||
118 | * Function 7 6 5 4 3 2 1 0 | ||
119 | * ------------------------------------ | ||
120 | * Vibrator x x x x 1 x x x | ||
121 | * Alt LED x x x 1 x x x x | ||
122 | * Screen white 1 x x x x x x x | ||
123 | * Screen white x x 1 x x x x x | ||
124 | * Screen white x 0 x x x x x x | ||
125 | * Enable kbd dpad x x x x x x 0 x | ||
126 | * Happy Times 0 1 0 x x x 0 x | ||
127 | */ | ||
128 | |||
129 | /* | ||
130 | * HTCPLD GPIO lines start 16 after OMAP_MAX_GPIO_LINES to account | ||
131 | * for the 16 MPUIO lines. | ||
132 | */ | ||
133 | #define HTCPLD_GPIO_START_OFFSET (OMAP_MAX_GPIO_LINES + 16) | ||
134 | #define HTCPLD_IRQ(chip, offset) (OMAP_IRQ_END + 8 * (chip) + (offset)) | ||
135 | #define HTCPLD_BASE(chip, offset) \ | ||
136 | (HTCPLD_GPIO_START_OFFSET + 8 * (chip) + (offset)) | ||
137 | |||
138 | #define HTCPLD_GPIO_LED_DPAD HTCPLD_BASE(0, 0) | ||
139 | #define HTCPLD_GPIO_LED_KBD HTCPLD_BASE(1, 0) | ||
140 | #define HTCPLD_GPIO_LED_CAPS HTCPLD_BASE(1, 5) | ||
141 | #define HTCPLD_GPIO_LED_RED_FLASH HTCPLD_BASE(2, 1) | ||
142 | #define HTCPLD_GPIO_LED_RED_SOLID HTCPLD_BASE(2, 2) | ||
143 | #define HTCPLD_GPIO_LED_GREEN_FLASH HTCPLD_BASE(2, 3) | ||
144 | #define HTCPLD_GPIO_LED_GREEN_SOLID HTCPLD_BASE(2, 4) | ||
145 | #define HTCPLD_GPIO_LED_WIFI HTCPLD_BASE(2, 5) | ||
146 | #define HTCPLD_GPIO_LED_BT HTCPLD_BASE(2, 6) | ||
147 | #define HTCPLD_GPIO_LED_VIBRATE HTCPLD_BASE(3, 3) | ||
148 | #define HTCPLD_GPIO_LED_ALT HTCPLD_BASE(3, 4) | ||
149 | |||
150 | #define HTCPLD_GPIO_RIGHT_KBD HTCPLD_BASE(6, 7) | ||
151 | #define HTCPLD_GPIO_UP_KBD HTCPLD_BASE(6, 6) | ||
152 | #define HTCPLD_GPIO_LEFT_KBD HTCPLD_BASE(6, 5) | ||
153 | #define HTCPLD_GPIO_DOWN_KBD HTCPLD_BASE(6, 4) | ||
154 | |||
155 | #define HTCPLD_GPIO_RIGHT_DPAD HTCPLD_BASE(7, 7) | ||
156 | #define HTCPLD_GPIO_UP_DPAD HTCPLD_BASE(7, 6) | ||
157 | #define HTCPLD_GPIO_LEFT_DPAD HTCPLD_BASE(7, 5) | ||
158 | #define HTCPLD_GPIO_DOWN_DPAD HTCPLD_BASE(7, 4) | ||
159 | #define HTCPLD_GPIO_ENTER_DPAD HTCPLD_BASE(7, 3) | ||
160 | |||
161 | /* | ||
162 | * The htcpld chip requires a gpio write to a specific line | ||
163 | * to re-enable interrupts after one has occurred. | ||
164 | */ | ||
165 | #define HTCPLD_GPIO_INT_RESET_HI HTCPLD_BASE(2, 7) | ||
166 | #define HTCPLD_GPIO_INT_RESET_LO HTCPLD_BASE(2, 0) | ||
167 | |||
168 | /* Chip 5 */ | ||
169 | #define HTCPLD_IRQ_RIGHT_KBD HTCPLD_IRQ(0, 7) | ||
170 | #define HTCPLD_IRQ_UP_KBD HTCPLD_IRQ(0, 6) | ||
171 | #define HTCPLD_IRQ_LEFT_KBD HTCPLD_IRQ(0, 5) | ||
172 | #define HTCPLD_IRQ_DOWN_KBD HTCPLD_IRQ(0, 4) | ||
173 | |||
174 | /* Chip 6 */ | ||
175 | #define HTCPLD_IRQ_RIGHT_DPAD HTCPLD_IRQ(1, 7) | ||
176 | #define HTCPLD_IRQ_UP_DPAD HTCPLD_IRQ(1, 6) | ||
177 | #define HTCPLD_IRQ_LEFT_DPAD HTCPLD_IRQ(1, 5) | ||
178 | #define HTCPLD_IRQ_DOWN_DPAD HTCPLD_IRQ(1, 4) | ||
179 | #define HTCPLD_IRQ_ENTER_DPAD HTCPLD_IRQ(1, 3) | ||
62 | 180 | ||
63 | /* Keyboard definition */ | 181 | /* Keyboard definition */ |
64 | 182 | ||
@@ -140,6 +258,129 @@ static struct platform_device kp_device = { | |||
140 | .resource = kp_resources, | 258 | .resource = kp_resources, |
141 | }; | 259 | }; |
142 | 260 | ||
261 | /* GPIO buttons for keyboard slide and power button */ | ||
262 | static struct gpio_keys_button herald_gpio_keys_table[] = { | ||
263 | {BTN_0, HTCHERALD_GPIO_POWER, 1, "POWER", EV_KEY, 1, 20}, | ||
264 | {SW_LID, HTCHERALD_GPIO_SLIDE, 0, "SLIDE", EV_SW, 1, 20}, | ||
265 | |||
266 | {KEY_LEFT, HTCPLD_GPIO_LEFT_KBD, 1, "LEFT", EV_KEY, 1, 20}, | ||
267 | {KEY_RIGHT, HTCPLD_GPIO_RIGHT_KBD, 1, "RIGHT", EV_KEY, 1, 20}, | ||
268 | {KEY_UP, HTCPLD_GPIO_UP_KBD, 1, "UP", EV_KEY, 1, 20}, | ||
269 | {KEY_DOWN, HTCPLD_GPIO_DOWN_KBD, 1, "DOWN", EV_KEY, 1, 20}, | ||
270 | |||
271 | {KEY_LEFT, HTCPLD_GPIO_LEFT_DPAD, 1, "DLEFT", EV_KEY, 1, 20}, | ||
272 | {KEY_RIGHT, HTCPLD_GPIO_RIGHT_DPAD, 1, "DRIGHT", EV_KEY, 1, 20}, | ||
273 | {KEY_UP, HTCPLD_GPIO_UP_DPAD, 1, "DUP", EV_KEY, 1, 20}, | ||
274 | {KEY_DOWN, HTCPLD_GPIO_DOWN_DPAD, 1, "DDOWN", EV_KEY, 1, 20}, | ||
275 | {KEY_ENTER, HTCPLD_GPIO_ENTER_DPAD, 1, "DENTER", EV_KEY, 1, 20}, | ||
276 | }; | ||
277 | |||
278 | static struct gpio_keys_platform_data herald_gpio_keys_data = { | ||
279 | .buttons = herald_gpio_keys_table, | ||
280 | .nbuttons = ARRAY_SIZE(herald_gpio_keys_table), | ||
281 | .rep = 1, | ||
282 | }; | ||
283 | |||
284 | static struct platform_device herald_gpiokeys_device = { | ||
285 | .name = "gpio-keys", | ||
286 | .id = -1, | ||
287 | .dev = { | ||
288 | .platform_data = &herald_gpio_keys_data, | ||
289 | }, | ||
290 | }; | ||
291 | |||
292 | /* LEDs for the Herald. These connect to the HTCPLD GPIO device. */ | ||
293 | static struct gpio_led gpio_leds[] = { | ||
294 | {"dpad", NULL, HTCPLD_GPIO_LED_DPAD, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
295 | {"kbd", NULL, HTCPLD_GPIO_LED_KBD, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
296 | {"vibrate", NULL, HTCPLD_GPIO_LED_VIBRATE, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
297 | {"green_solid", NULL, HTCPLD_GPIO_LED_GREEN_SOLID, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
298 | {"green_flash", NULL, HTCPLD_GPIO_LED_GREEN_FLASH, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
299 | {"red_solid", "mmc0", HTCPLD_GPIO_LED_RED_SOLID, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
300 | {"red_flash", NULL, HTCPLD_GPIO_LED_RED_FLASH, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
301 | {"wifi", NULL, HTCPLD_GPIO_LED_WIFI, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
302 | {"bt", NULL, HTCPLD_GPIO_LED_BT, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
303 | {"caps", NULL, HTCPLD_GPIO_LED_CAPS, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
304 | {"alt", NULL, HTCPLD_GPIO_LED_ALT, 0, 0, LEDS_GPIO_DEFSTATE_OFF}, | ||
305 | }; | ||
306 | |||
307 | static struct gpio_led_platform_data gpio_leds_data = { | ||
308 | .leds = gpio_leds, | ||
309 | .num_leds = ARRAY_SIZE(gpio_leds), | ||
310 | }; | ||
311 | |||
312 | static struct platform_device gpio_leds_device = { | ||
313 | .name = "leds-gpio", | ||
314 | .id = 0, | ||
315 | .dev = { | ||
316 | .platform_data = &gpio_leds_data, | ||
317 | }, | ||
318 | }; | ||
319 | |||
320 | /* HTC PLD chips */ | ||
321 | |||
322 | static struct resource htcpld_resources[] = { | ||
323 | [0] = { | ||
324 | .start = OMAP_GPIO_IRQ(HTCHERALD_GIRQ_BTNS), | ||
325 | .end = OMAP_GPIO_IRQ(HTCHERALD_GIRQ_BTNS), | ||
326 | .flags = IORESOURCE_IRQ, | ||
327 | }, | ||
328 | }; | ||
329 | |||
330 | struct htcpld_chip_platform_data htcpld_chips[] = { | ||
331 | [0] = { | ||
332 | .addr = 0x03, | ||
333 | .reset = 0x04, | ||
334 | .num_gpios = 8, | ||
335 | .gpio_out_base = HTCPLD_BASE(0, 0), | ||
336 | .gpio_in_base = HTCPLD_BASE(4, 0), | ||
337 | }, | ||
338 | [1] = { | ||
339 | .addr = 0x04, | ||
340 | .reset = 0x8e, | ||
341 | .num_gpios = 8, | ||
342 | .gpio_out_base = HTCPLD_BASE(1, 0), | ||
343 | .gpio_in_base = HTCPLD_BASE(5, 0), | ||
344 | }, | ||
345 | [2] = { | ||
346 | .addr = 0x05, | ||
347 | .reset = 0x80, | ||
348 | .num_gpios = 8, | ||
349 | .gpio_out_base = HTCPLD_BASE(2, 0), | ||
350 | .gpio_in_base = HTCPLD_BASE(6, 0), | ||
351 | .irq_base = HTCPLD_IRQ(0, 0), | ||
352 | .num_irqs = 8, | ||
353 | }, | ||
354 | [3] = { | ||
355 | .addr = 0x06, | ||
356 | .reset = 0x40, | ||
357 | .num_gpios = 8, | ||
358 | .gpio_out_base = HTCPLD_BASE(3, 0), | ||
359 | .gpio_in_base = HTCPLD_BASE(7, 0), | ||
360 | .irq_base = HTCPLD_IRQ(1, 0), | ||
361 | .num_irqs = 8, | ||
362 | }, | ||
363 | }; | ||
364 | |||
365 | struct htcpld_core_platform_data htcpld_pfdata = { | ||
366 | .int_reset_gpio_hi = HTCPLD_GPIO_INT_RESET_HI, | ||
367 | .int_reset_gpio_lo = HTCPLD_GPIO_INT_RESET_LO, | ||
368 | .i2c_adapter_id = 1, | ||
369 | |||
370 | .chip = htcpld_chips, | ||
371 | .num_chip = ARRAY_SIZE(htcpld_chips), | ||
372 | }; | ||
373 | |||
374 | static struct platform_device htcpld_device = { | ||
375 | .name = "i2c-htcpld", | ||
376 | .id = -1, | ||
377 | .resource = htcpld_resources, | ||
378 | .num_resources = ARRAY_SIZE(htcpld_resources), | ||
379 | .dev = { | ||
380 | .platform_data = &htcpld_pfdata, | ||
381 | }, | ||
382 | }; | ||
383 | |||
143 | /* USB Device */ | 384 | /* USB Device */ |
144 | static struct omap_usb_config htcherald_usb_config __initdata = { | 385 | static struct omap_usb_config htcherald_usb_config __initdata = { |
145 | .otg = 0, | 386 | .otg = 0, |
@@ -150,14 +391,71 @@ static struct omap_usb_config htcherald_usb_config __initdata = { | |||
150 | }; | 391 | }; |
151 | 392 | ||
152 | /* LCD Device resources */ | 393 | /* LCD Device resources */ |
394 | static struct omap_lcd_config htcherald_lcd_config __initdata = { | ||
395 | .ctrl_name = "internal", | ||
396 | }; | ||
397 | |||
398 | static struct omap_board_config_kernel htcherald_config[] __initdata = { | ||
399 | { OMAP_TAG_LCD, &htcherald_lcd_config }, | ||
400 | }; | ||
401 | |||
153 | static struct platform_device lcd_device = { | 402 | static struct platform_device lcd_device = { |
154 | .name = "lcd_htcherald", | 403 | .name = "lcd_htcherald", |
155 | .id = -1, | 404 | .id = -1, |
156 | }; | 405 | }; |
157 | 406 | ||
407 | /* MMC Card */ | ||
408 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | ||
409 | static struct omap_mmc_platform_data htc_mmc1_data = { | ||
410 | .nr_slots = 1, | ||
411 | .switch_slot = NULL, | ||
412 | .slots[0] = { | ||
413 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | ||
414 | .name = "mmcblk", | ||
415 | .nomux = 1, | ||
416 | .wires = 4, | ||
417 | .switch_pin = -1, | ||
418 | }, | ||
419 | }; | ||
420 | |||
421 | static struct omap_mmc_platform_data *htc_mmc_data[1]; | ||
422 | #endif | ||
423 | |||
424 | |||
425 | /* Platform devices for the Herald */ | ||
158 | static struct platform_device *devices[] __initdata = { | 426 | static struct platform_device *devices[] __initdata = { |
159 | &kp_device, | 427 | &kp_device, |
160 | &lcd_device, | 428 | &lcd_device, |
429 | &htcpld_device, | ||
430 | &gpio_leds_device, | ||
431 | &herald_gpiokeys_device, | ||
432 | }; | ||
433 | |||
434 | /* | ||
435 | * Touchscreen | ||
436 | */ | ||
437 | static const struct ads7846_platform_data htcherald_ts_platform_data = { | ||
438 | .model = 7846, | ||
439 | .keep_vref_on = 1, | ||
440 | .x_plate_ohms = 496, | ||
441 | .gpio_pendown = HTCHERALD_GPIO_TS, | ||
442 | .pressure_max = 100000, | ||
443 | .pressure_min = 5000, | ||
444 | .x_min = 528, | ||
445 | .x_max = 3760, | ||
446 | .y_min = 624, | ||
447 | .y_max = 3760, | ||
448 | }; | ||
449 | |||
450 | static struct spi_board_info __initdata htcherald_spi_board_info[] = { | ||
451 | { | ||
452 | .modalias = "ads7846", | ||
453 | .platform_data = &htcherald_ts_platform_data, | ||
454 | .irq = OMAP_GPIO_IRQ(HTCHERALD_GPIO_TS), | ||
455 | .max_speed_hz = 2500000, | ||
456 | .bus_num = 2, | ||
457 | .chip_select = 1, | ||
458 | } | ||
161 | }; | 459 | }; |
162 | 460 | ||
163 | /* | 461 | /* |
@@ -278,6 +576,7 @@ static void __init htcherald_init(void) | |||
278 | { | 576 | { |
279 | printk(KERN_INFO "HTC Herald init.\n"); | 577 | printk(KERN_INFO "HTC Herald init.\n"); |
280 | 578 | ||
579 | /* Do board initialization before we register all the devices */ | ||
281 | omap_gpio_init(); | 580 | omap_gpio_init(); |
282 | 581 | ||
283 | omap_board_config = htcherald_config; | 582 | omap_board_config = htcherald_config; |
@@ -288,6 +587,16 @@ static void __init htcherald_init(void) | |||
288 | 587 | ||
289 | htcherald_usb_enable(); | 588 | htcherald_usb_enable(); |
290 | omap1_usb_init(&htcherald_usb_config); | 589 | omap1_usb_init(&htcherald_usb_config); |
590 | |||
591 | spi_register_board_info(htcherald_spi_board_info, | ||
592 | ARRAY_SIZE(htcherald_spi_board_info)); | ||
593 | |||
594 | omap_register_i2c_bus(1, 100, NULL, 0); | ||
595 | |||
596 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | ||
597 | htc_mmc_data[0] = &htc_mmc1_data; | ||
598 | omap1_init_mmc(htc_mmc_data, 1); | ||
599 | #endif | ||
291 | } | 600 | } |
292 | 601 | ||
293 | static void __init htcherald_init_irq(void) | 602 | static void __init htcherald_init_irq(void) |
diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c b/arch/arm/mach-omap1/board-sx1-mmc.c index 5b33ae8141bc..e8ddd86e3fda 100644 --- a/arch/arm/mach-omap1/board-sx1-mmc.c +++ b/arch/arm/mach-omap1/board-sx1-mmc.c | |||
@@ -44,8 +44,7 @@ static struct omap_mmc_platform_data mmc1_data = { | |||
44 | .nr_slots = 1, | 44 | .nr_slots = 1, |
45 | .slots[0] = { | 45 | .slots[0] = { |
46 | .set_power = mmc_set_power, | 46 | .set_power = mmc_set_power, |
47 | .ocr_mask = MMC_VDD_28_29 | MMC_VDD_30_31 | | 47 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
48 | MMC_VDD_32_33 | MMC_VDD_33_34, | ||
49 | .name = "mmcblk", | 48 | .name = "mmcblk", |
50 | }, | 49 | }, |
51 | }; | 50 | }; |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index b583121b04b9..ea0d80a89da7 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/dma-mapping.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
@@ -192,6 +193,48 @@ static inline void omap_init_spi100k(void) | |||
192 | } | 193 | } |
193 | #endif | 194 | #endif |
194 | 195 | ||
196 | |||
197 | #define OMAP1_CAMERA_BASE 0xfffb6800 | ||
198 | #define OMAP1_CAMERA_IOSIZE 0x1c | ||
199 | |||
200 | static struct resource omap1_camera_resources[] = { | ||
201 | [0] = { | ||
202 | .start = OMAP1_CAMERA_BASE, | ||
203 | .end = OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1, | ||
204 | .flags = IORESOURCE_MEM, | ||
205 | }, | ||
206 | [1] = { | ||
207 | .start = INT_CAMERA, | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32); | ||
213 | |||
214 | static struct platform_device omap1_camera_device = { | ||
215 | .name = "omap1-camera", | ||
216 | .id = 0, /* This is used to put cameras on this interface */ | ||
217 | .dev = { | ||
218 | .dma_mask = &omap1_camera_dma_mask, | ||
219 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
220 | }, | ||
221 | .num_resources = ARRAY_SIZE(omap1_camera_resources), | ||
222 | .resource = omap1_camera_resources, | ||
223 | }; | ||
224 | |||
225 | void __init omap1_camera_init(void *info) | ||
226 | { | ||
227 | struct platform_device *dev = &omap1_camera_device; | ||
228 | int ret; | ||
229 | |||
230 | dev->dev.platform_data = info; | ||
231 | |||
232 | ret = platform_device_register(dev); | ||
233 | if (ret) | ||
234 | dev_err(&dev->dev, "unable to register device: %d\n", ret); | ||
235 | } | ||
236 | |||
237 | |||
195 | /*-------------------------------------------------------------------------*/ | 238 | /*-------------------------------------------------------------------------*/ |
196 | 239 | ||
197 | static inline void omap_init_sti(void) {} | 240 | static inline void omap_init_sti(void) {} |
@@ -258,3 +301,30 @@ static int __init omap1_init_devices(void) | |||
258 | } | 301 | } |
259 | arch_initcall(omap1_init_devices); | 302 | arch_initcall(omap1_init_devices); |
260 | 303 | ||
304 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) | ||
305 | |||
306 | static struct resource wdt_resources[] = { | ||
307 | { | ||
308 | .start = 0xfffeb000, | ||
309 | .end = 0xfffeb07F, | ||
310 | .flags = IORESOURCE_MEM, | ||
311 | }, | ||
312 | }; | ||
313 | |||
314 | static struct platform_device omap_wdt_device = { | ||
315 | .name = "omap_wdt", | ||
316 | .id = -1, | ||
317 | .num_resources = ARRAY_SIZE(wdt_resources), | ||
318 | .resource = wdt_resources, | ||
319 | }; | ||
320 | |||
321 | static int __init omap_init_wdt(void) | ||
322 | { | ||
323 | if (!cpu_is_omap16xx()) | ||
324 | return; | ||
325 | |||
326 | platform_device_register(&omap_wdt_device); | ||
327 | return 0; | ||
328 | } | ||
329 | subsys_initcall(omap_init_wdt); | ||
330 | #endif | ||
diff --git a/arch/arm/mach-omap1/include/mach/camera.h b/arch/arm/mach-omap1/include/mach/camera.h new file mode 100644 index 000000000000..fd54b452eb22 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/camera.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef __ASM_ARCH_CAMERA_H_ | ||
2 | #define __ASM_ARCH_CAMERA_H_ | ||
3 | |||
4 | void omap1_camera_init(void *); | ||
5 | |||
6 | static inline void omap1_set_camera_info(struct omap1_cam_platform_data *info) | ||
7 | { | ||
8 | omap1_camera_init(info); | ||
9 | } | ||
10 | |||
11 | #endif /* __ASM_ARCH_CAMERA_H_ */ | ||
diff --git a/arch/arm/mach-omap1/pm_bus.c b/arch/arm/mach-omap1/pm_bus.c new file mode 100644 index 000000000000..8b66392be745 --- /dev/null +++ b/arch/arm/mach-omap1/pm_bus.c | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * Runtime PM support code for OMAP1 | ||
3 | * | ||
4 | * Author: Kevin Hilman, Deep Root Systems, LLC | ||
5 | * | ||
6 | * Copyright (C) 2010 Texas Instruments, Inc. | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/pm_runtime.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/mutex.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/err.h> | ||
20 | |||
21 | #include <plat/omap_device.h> | ||
22 | #include <plat/omap-pm.h> | ||
23 | |||
24 | #ifdef CONFIG_PM_RUNTIME | ||
25 | static int omap1_pm_runtime_suspend(struct device *dev) | ||
26 | { | ||
27 | struct clk *iclk, *fclk; | ||
28 | int ret = 0; | ||
29 | |||
30 | dev_dbg(dev, "%s\n", __func__); | ||
31 | |||
32 | ret = pm_generic_runtime_suspend(dev); | ||
33 | |||
34 | fclk = clk_get(dev, "fck"); | ||
35 | if (!IS_ERR(fclk)) { | ||
36 | clk_disable(fclk); | ||
37 | clk_put(fclk); | ||
38 | } | ||
39 | |||
40 | iclk = clk_get(dev, "ick"); | ||
41 | if (!IS_ERR(iclk)) { | ||
42 | clk_disable(iclk); | ||
43 | clk_put(iclk); | ||
44 | } | ||
45 | |||
46 | return 0; | ||
47 | }; | ||
48 | |||
49 | static int omap1_pm_runtime_resume(struct device *dev) | ||
50 | { | ||
51 | int ret = 0; | ||
52 | struct clk *iclk, *fclk; | ||
53 | |||
54 | dev_dbg(dev, "%s\n", __func__); | ||
55 | |||
56 | iclk = clk_get(dev, "ick"); | ||
57 | if (!IS_ERR(iclk)) { | ||
58 | clk_enable(iclk); | ||
59 | clk_put(iclk); | ||
60 | } | ||
61 | |||
62 | fclk = clk_get(dev, "fck"); | ||
63 | if (!IS_ERR(fclk)) { | ||
64 | clk_enable(fclk); | ||
65 | clk_put(fclk); | ||
66 | } | ||
67 | |||
68 | return pm_generic_runtime_resume(dev); | ||
69 | }; | ||
70 | |||
71 | static int __init omap1_pm_runtime_init(void) | ||
72 | { | ||
73 | const struct dev_pm_ops *pm; | ||
74 | struct dev_pm_ops *omap_pm; | ||
75 | |||
76 | pm = platform_bus_get_pm_ops(); | ||
77 | if (!pm) { | ||
78 | pr_err("%s: unable to get dev_pm_ops from platform_bus\n", | ||
79 | __func__); | ||
80 | return -ENODEV; | ||
81 | } | ||
82 | |||
83 | omap_pm = kmemdup(pm, sizeof(struct dev_pm_ops), GFP_KERNEL); | ||
84 | if (!omap_pm) { | ||
85 | pr_err("%s: unable to alloc memory for new dev_pm_ops\n", | ||
86 | __func__); | ||
87 | return -ENOMEM; | ||
88 | } | ||
89 | |||
90 | omap_pm->runtime_suspend = omap1_pm_runtime_suspend; | ||
91 | omap_pm->runtime_resume = omap1_pm_runtime_resume; | ||
92 | |||
93 | platform_bus_set_pm_ops(omap_pm); | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | core_initcall(omap1_pm_runtime_init); | ||
98 | #endif /* CONFIG_PM_RUNTIME */ | ||
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index b48bacf0a7aa..ab784bfde908 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -11,9 +11,8 @@ config ARCH_OMAP2PLUS_TYPICAL | |||
11 | select PM_RUNTIME | 11 | select PM_RUNTIME |
12 | select VFP | 12 | select VFP |
13 | select NEON if ARCH_OMAP3 || ARCH_OMAP4 | 13 | select NEON if ARCH_OMAP3 || ARCH_OMAP4 |
14 | select SERIAL_8250 | 14 | select SERIAL_OMAP |
15 | select SERIAL_CORE_CONSOLE | 15 | select SERIAL_OMAP_CONSOLE |
16 | select SERIAL_8250_CONSOLE | ||
17 | select I2C | 16 | select I2C |
18 | select I2C_OMAP | 17 | select I2C_OMAP |
19 | select MFD | 18 | select MFD |
@@ -35,7 +34,7 @@ config ARCH_OMAP3 | |||
35 | default y | 34 | default y |
36 | select CPU_V7 | 35 | select CPU_V7 |
37 | select USB_ARCH_HAS_EHCI | 36 | select USB_ARCH_HAS_EHCI |
38 | select ARM_L1_CACHE_SHIFT_6 | 37 | select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4 |
39 | 38 | ||
40 | config ARCH_OMAP4 | 39 | config ARCH_OMAP4 |
41 | bool "TI OMAP4" | 40 | bool "TI OMAP4" |
@@ -43,6 +42,8 @@ config ARCH_OMAP4 | |||
43 | depends on ARCH_OMAP2PLUS | 42 | depends on ARCH_OMAP2PLUS |
44 | select CPU_V7 | 43 | select CPU_V7 |
45 | select ARM_GIC | 44 | select ARM_GIC |
45 | select PL310_ERRATA_588369 | ||
46 | select ARM_ERRATA_720789 | ||
46 | 47 | ||
47 | comment "OMAP Core Type" | 48 | comment "OMAP Core Type" |
48 | depends on ARCH_OMAP2 | 49 | depends on ARCH_OMAP2 |
@@ -99,20 +100,20 @@ config MACH_OMAP2_TUSB6010 | |||
99 | 100 | ||
100 | config MACH_OMAP_H4 | 101 | config MACH_OMAP_H4 |
101 | bool "OMAP 2420 H4 board" | 102 | bool "OMAP 2420 H4 board" |
102 | depends on ARCH_OMAP2 | 103 | depends on ARCH_OMAP2420 |
103 | default y | 104 | default y |
104 | select OMAP_PACKAGE_ZAF | 105 | select OMAP_PACKAGE_ZAF |
105 | select OMAP_DEBUG_DEVICES | 106 | select OMAP_DEBUG_DEVICES |
106 | 107 | ||
107 | config MACH_OMAP_APOLLON | 108 | config MACH_OMAP_APOLLON |
108 | bool "OMAP 2420 Apollon board" | 109 | bool "OMAP 2420 Apollon board" |
109 | depends on ARCH_OMAP2 | 110 | depends on ARCH_OMAP2420 |
110 | default y | 111 | default y |
111 | select OMAP_PACKAGE_ZAC | 112 | select OMAP_PACKAGE_ZAC |
112 | 113 | ||
113 | config MACH_OMAP_2430SDP | 114 | config MACH_OMAP_2430SDP |
114 | bool "OMAP 2430 SDP board" | 115 | bool "OMAP 2430 SDP board" |
115 | depends on ARCH_OMAP2 | 116 | depends on ARCH_OMAP2430 |
116 | default y | 117 | default y |
117 | select OMAP_PACKAGE_ZAC | 118 | select OMAP_PACKAGE_ZAC |
118 | 119 | ||
@@ -135,6 +136,26 @@ config MACH_OMAP_LDP | |||
135 | default y | 136 | default y |
136 | select OMAP_PACKAGE_CBB | 137 | select OMAP_PACKAGE_CBB |
137 | 138 | ||
139 | config MACH_OMAP3530_LV_SOM | ||
140 | bool "OMAP3 Logic 3530 LV SOM board" | ||
141 | depends on ARCH_OMAP3 | ||
142 | select OMAP_PACKAGE_CBB | ||
143 | default y | ||
144 | help | ||
145 | Support for the LogicPD OMAP3530 SOM Development kit | ||
146 | for full description please see the products webpage at | ||
147 | http://www.logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap35x-development-kit | ||
148 | |||
149 | config MACH_OMAP3_TORPEDO | ||
150 | bool "OMAP3 Logic 35x Torpedo board" | ||
151 | depends on ARCH_OMAP3 | ||
152 | select OMAP_PACKAGE_CBB | ||
153 | default y | ||
154 | help | ||
155 | Support for the LogicPD OMAP35x Torpedo Development kit | ||
156 | for full description please see the products webpage at | ||
157 | http://www.logicpd.com/products/development-kits/zoom-omap35x-torpedo-development-kit | ||
158 | |||
138 | config MACH_OVERO | 159 | config MACH_OVERO |
139 | bool "Gumstix Overo board" | 160 | bool "Gumstix Overo board" |
140 | depends on ARCH_OMAP3 | 161 | depends on ARCH_OMAP3 |
@@ -200,12 +221,18 @@ config MACH_OMAP_ZOOM2 | |||
200 | depends on ARCH_OMAP3 | 221 | depends on ARCH_OMAP3 |
201 | default y | 222 | default y |
202 | select OMAP_PACKAGE_CBB | 223 | select OMAP_PACKAGE_CBB |
224 | select SERIAL_8250 | ||
225 | select SERIAL_CORE_CONSOLE | ||
226 | select SERIAL_8250_CONSOLE | ||
203 | 227 | ||
204 | config MACH_OMAP_ZOOM3 | 228 | config MACH_OMAP_ZOOM3 |
205 | bool "OMAP3630 Zoom3 board" | 229 | bool "OMAP3630 Zoom3 board" |
206 | depends on ARCH_OMAP3 | 230 | depends on ARCH_OMAP3 |
207 | default y | 231 | default y |
208 | select OMAP_PACKAGE_CBP | 232 | select OMAP_PACKAGE_CBP |
233 | select SERIAL_8250 | ||
234 | select SERIAL_CORE_CONSOLE | ||
235 | select SERIAL_8250_CONSOLE | ||
209 | 236 | ||
210 | config MACH_CM_T35 | 237 | config MACH_CM_T35 |
211 | bool "CompuLab CM-T35 module" | 238 | bool "CompuLab CM-T35 module" |
@@ -214,12 +241,25 @@ config MACH_CM_T35 | |||
214 | select OMAP_PACKAGE_CUS | 241 | select OMAP_PACKAGE_CUS |
215 | select OMAP_MUX | 242 | select OMAP_MUX |
216 | 243 | ||
244 | config MACH_CM_T3517 | ||
245 | bool "CompuLab CM-T3517 module" | ||
246 | depends on ARCH_OMAP3 | ||
247 | default y | ||
248 | select OMAP_PACKAGE_CBB | ||
249 | select OMAP_MUX | ||
250 | |||
217 | config MACH_IGEP0020 | 251 | config MACH_IGEP0020 |
218 | bool "IGEP v2 board" | 252 | bool "IGEP v2 board" |
219 | depends on ARCH_OMAP3 | 253 | depends on ARCH_OMAP3 |
220 | default y | 254 | default y |
221 | select OMAP_PACKAGE_CBB | 255 | select OMAP_PACKAGE_CBB |
222 | 256 | ||
257 | config MACH_IGEP0030 | ||
258 | bool "IGEP OMAP3 module" | ||
259 | depends on ARCH_OMAP3 | ||
260 | default y | ||
261 | select OMAP_PACKAGE_CBB | ||
262 | |||
223 | config MACH_SBC3530 | 263 | config MACH_SBC3530 |
224 | bool "OMAP3 SBC STALKER board" | 264 | bool "OMAP3 SBC STALKER board" |
225 | depends on ARCH_OMAP3 | 265 | depends on ARCH_OMAP3 |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 88d3a1e920f5..7352412e4917 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -3,9 +3,10 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o | 6 | obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o \ |
7 | common.o | ||
7 | 8 | ||
8 | omap-2-3-common = irq.o sdrc.o | 9 | omap-2-3-common = irq.o sdrc.o prm2xxx_3xxx.o |
9 | hwmod-common = omap_hwmod.o \ | 10 | hwmod-common = omap_hwmod.o \ |
10 | omap_hwmod_common_data.o | 11 | omap_hwmod_common_data.o |
11 | prcm-common = prcm.o powerdomain.o | 12 | prcm-common = prcm.o powerdomain.o |
@@ -15,7 +16,7 @@ clock-common = clock.o clock_common_data.o \ | |||
15 | 16 | ||
16 | obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(prcm-common) $(hwmod-common) | 17 | obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(prcm-common) $(hwmod-common) |
17 | obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(prcm-common) $(hwmod-common) | 18 | obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(prcm-common) $(hwmod-common) |
18 | obj-$(CONFIG_ARCH_OMAP4) += $(prcm-common) $(hwmod-common) | 19 | obj-$(CONFIG_ARCH_OMAP4) += $(prcm-common) prm44xx.o $(hwmod-common) |
19 | 20 | ||
20 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o | 21 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o |
21 | 22 | ||
@@ -49,14 +50,18 @@ obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o | |||
49 | # Power Management | 50 | # Power Management |
50 | ifeq ($(CONFIG_PM),y) | 51 | ifeq ($(CONFIG_PM),y) |
51 | obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o | 52 | obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o |
52 | obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o | 53 | obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o pm_bus.o |
53 | obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o cpuidle34xx.o | 54 | obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o cpuidle34xx.o pm_bus.o |
54 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o | 55 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o pm_bus.o |
55 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o | 56 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o |
56 | 57 | ||
57 | AFLAGS_sleep24xx.o :=-Wa,-march=armv6 | 58 | AFLAGS_sleep24xx.o :=-Wa,-march=armv6 |
58 | AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a | 59 | AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a |
59 | 60 | ||
61 | ifeq ($(CONFIG_PM_VERBOSE),y) | ||
62 | CFLAGS_pm_bus.o += -DDEBUG | ||
63 | endif | ||
64 | |||
60 | endif | 65 | endif |
61 | 66 | ||
62 | # PRCM | 67 | # PRCM |
@@ -87,6 +92,7 @@ obj-$(CONFIG_ARCH_OMAP2430) += opp2430_data.o | |||
87 | obj-$(CONFIG_ARCH_OMAP2420) += omap_hwmod_2420_data.o | 92 | obj-$(CONFIG_ARCH_OMAP2420) += omap_hwmod_2420_data.o |
88 | obj-$(CONFIG_ARCH_OMAP2430) += omap_hwmod_2430_data.o | 93 | obj-$(CONFIG_ARCH_OMAP2430) += omap_hwmod_2430_data.o |
89 | obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o | 94 | obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o |
95 | obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o | ||
90 | 96 | ||
91 | # EMU peripherals | 97 | # EMU peripherals |
92 | obj-$(CONFIG_OMAP3_EMU) += emu.o | 98 | obj-$(CONFIG_OMAP3_EMU) += emu.o |
@@ -115,6 +121,10 @@ obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o \ | |||
115 | obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o \ | 121 | obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o \ |
116 | board-flash.o \ | 122 | board-flash.o \ |
117 | hsmmc.o | 123 | hsmmc.o |
124 | obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o \ | ||
125 | hsmmc.o | ||
126 | obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o \ | ||
127 | hsmmc.o | ||
118 | obj-$(CONFIG_MACH_OVERO) += board-overo.o \ | 128 | obj-$(CONFIG_MACH_OVERO) += board-overo.o \ |
119 | hsmmc.o | 129 | hsmmc.o |
120 | obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o \ | 130 | obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o \ |
@@ -146,8 +156,11 @@ obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \ | |||
146 | hsmmc.o | 156 | hsmmc.o |
147 | obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \ | 157 | obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \ |
148 | hsmmc.o | 158 | hsmmc.o |
159 | obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o | ||
149 | obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ | 160 | obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ |
150 | hsmmc.o | 161 | hsmmc.o |
162 | obj-$(CONFIG_MACH_IGEP0030) += board-igep0030.o \ | ||
163 | hsmmc.o | ||
151 | obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ | 164 | obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ |
152 | hsmmc.o | 165 | hsmmc.o |
153 | obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \ | 166 | obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \ |
@@ -174,3 +187,6 @@ obj-y += $(nand-m) $(nand-y) | |||
174 | 187 | ||
175 | smc91x-$(CONFIG_SMC91X) := gpmc-smc91x.o | 188 | smc91x-$(CONFIG_SMC91X) := gpmc-smc91x.o |
176 | obj-y += $(smc91x-m) $(smc91x-y) | 189 | obj-y += $(smc91x-m) $(smc91x-y) |
190 | |||
191 | smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o | ||
192 | obj-y += $(smsc911x-m) $(smsc911x-y) | ||
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index b857ce484510..b527f8d187ad 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | #include <linux/mtd/physmap.h> | 21 | #include <linux/mtd/physmap.h> |
22 | #include <linux/mmc/host.h> | ||
22 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
23 | #include <linux/i2c/twl.h> | 24 | #include <linux/i2c/twl.h> |
24 | #include <linux/err.h> | 25 | #include <linux/err.h> |
@@ -190,7 +191,7 @@ static int __init omap2430_i2c_init(void) | |||
190 | static struct omap2_hsmmc_info mmc[] __initdata = { | 191 | static struct omap2_hsmmc_info mmc[] __initdata = { |
191 | { | 192 | { |
192 | .mmc = 1, | 193 | .mmc = 1, |
193 | .wires = 4, | 194 | .caps = MMC_CAP_4_BIT_DATA, |
194 | .gpio_cd = -EINVAL, | 195 | .gpio_cd = -EINVAL, |
195 | .gpio_wp = -EINVAL, | 196 | .gpio_wp = -EINVAL, |
196 | .ext_clock = 1, | 197 | .ext_clock = 1, |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index a5b095cf2adc..4e3742c512b8 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/regulator/machine.h> | 24 | #include <linux/regulator/machine.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
27 | #include <linux/mmc/host.h> | ||
27 | 28 | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
@@ -38,15 +39,14 @@ | |||
38 | #include <plat/gpmc.h> | 39 | #include <plat/gpmc.h> |
39 | #include <plat/display.h> | 40 | #include <plat/display.h> |
40 | 41 | ||
41 | #include <plat/control.h> | ||
42 | #include <plat/gpmc-smc91x.h> | 42 | #include <plat/gpmc-smc91x.h> |
43 | 43 | ||
44 | #include <mach/board-flash.h> | 44 | #include "board-flash.h" |
45 | |||
46 | #include "mux.h" | 45 | #include "mux.h" |
47 | #include "sdram-qimonda-hyb18m512160af-6.h" | 46 | #include "sdram-qimonda-hyb18m512160af-6.h" |
48 | #include "hsmmc.h" | 47 | #include "hsmmc.h" |
49 | #include "pm.h" | 48 | #include "pm.h" |
49 | #include "control.h" | ||
50 | 50 | ||
51 | #define CONFIG_DISABLE_HFCLK 1 | 51 | #define CONFIG_DISABLE_HFCLK 1 |
52 | 52 | ||
@@ -76,7 +76,7 @@ static struct cpuidle_params omap3_cpuidle_params_table[] = { | |||
76 | {1, 10000, 30000, 300000}, | 76 | {1, 10000, 30000, 300000}, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static int board_keymap[] = { | 79 | static uint32_t board_keymap[] = { |
80 | KEY(0, 0, KEY_LEFT), | 80 | KEY(0, 0, KEY_LEFT), |
81 | KEY(0, 1, KEY_RIGHT), | 81 | KEY(0, 1, KEY_RIGHT), |
82 | KEY(0, 2, KEY_A), | 82 | KEY(0, 2, KEY_A), |
@@ -353,12 +353,12 @@ static struct omap2_hsmmc_info mmc[] = { | |||
353 | /* 8 bits (default) requires S6.3 == ON, | 353 | /* 8 bits (default) requires S6.3 == ON, |
354 | * so the SIM card isn't used; else 4 bits. | 354 | * so the SIM card isn't used; else 4 bits. |
355 | */ | 355 | */ |
356 | .wires = 8, | 356 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
357 | .gpio_wp = 4, | 357 | .gpio_wp = 4, |
358 | }, | 358 | }, |
359 | { | 359 | { |
360 | .mmc = 2, | 360 | .mmc = 2, |
361 | .wires = 8, | 361 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
362 | .gpio_wp = 7, | 362 | .gpio_wp = 7, |
363 | }, | 363 | }, |
364 | {} /* Terminator */ | 364 | {} /* Terminator */ |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index fd27ac0860b0..bbcf580fa097 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -21,8 +21,8 @@ | |||
21 | #include <plat/usb.h> | 21 | #include <plat/usb.h> |
22 | 22 | ||
23 | #include <mach/board-zoom.h> | 23 | #include <mach/board-zoom.h> |
24 | #include <mach/board-flash.h> | ||
25 | 24 | ||
25 | #include "board-flash.h" | ||
26 | #include "mux.h" | 26 | #include "mux.h" |
27 | #include "sdram-hynix-h8mbx00u0mer-0em.h" | 27 | #include "sdram-hynix-h8mbx00u0mer-0em.h" |
28 | 28 | ||
@@ -208,7 +208,6 @@ static struct flash_partitions sdp_flash_partitions[] = { | |||
208 | static void __init omap_sdp_init(void) | 208 | static void __init omap_sdp_init(void) |
209 | { | 209 | { |
210 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); | 210 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); |
211 | omap_serial_init(); | ||
212 | zoom_peripherals_init(); | 211 | zoom_peripherals_init(); |
213 | board_smc91x_init(); | 212 | board_smc91x_init(); |
214 | board_flash_init(sdp_flash_partitions, chip_sel_sdp); | 213 | board_flash_init(sdp_flash_partitions, chip_sel_sdp); |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 0b6a65f3a10a..69a4ae971e41 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/usb/otg.h> | 20 | #include <linux/usb/otg.h> |
21 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/i2c/twl.h> | 22 | #include <linux/i2c/twl.h> |
23 | #include <linux/gpio_keys.h> | ||
23 | #include <linux/regulator/machine.h> | 24 | #include <linux/regulator/machine.h> |
24 | #include <linux/leds.h> | 25 | #include <linux/leds.h> |
25 | 26 | ||
@@ -31,15 +32,18 @@ | |||
31 | 32 | ||
32 | #include <plat/board.h> | 33 | #include <plat/board.h> |
33 | #include <plat/common.h> | 34 | #include <plat/common.h> |
34 | #include <plat/control.h> | ||
35 | #include <plat/timer-gp.h> | ||
36 | #include <plat/usb.h> | 35 | #include <plat/usb.h> |
37 | #include <plat/mmc.h> | 36 | #include <plat/mmc.h> |
37 | |||
38 | #include "hsmmc.h" | 38 | #include "hsmmc.h" |
39 | #include "timer-gp.h" | ||
40 | #include "control.h" | ||
39 | 41 | ||
40 | #define ETH_KS8851_IRQ 34 | 42 | #define ETH_KS8851_IRQ 34 |
41 | #define ETH_KS8851_POWER_ON 48 | 43 | #define ETH_KS8851_POWER_ON 48 |
42 | #define ETH_KS8851_QUART 138 | 44 | #define ETH_KS8851_QUART 138 |
45 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 | ||
46 | #define OMAP4_SFH7741_ENABLE_GPIO 188 | ||
43 | 47 | ||
44 | static struct gpio_led sdp4430_gpio_leds[] = { | 48 | static struct gpio_led sdp4430_gpio_leds[] = { |
45 | { | 49 | { |
@@ -77,11 +81,47 @@ static struct gpio_led sdp4430_gpio_leds[] = { | |||
77 | 81 | ||
78 | }; | 82 | }; |
79 | 83 | ||
84 | static struct gpio_keys_button sdp4430_gpio_keys[] = { | ||
85 | { | ||
86 | .desc = "Proximity Sensor", | ||
87 | .type = EV_SW, | ||
88 | .code = SW_FRONT_PROXIMITY, | ||
89 | .gpio = OMAP4_SFH7741_SENSOR_OUTPUT_GPIO, | ||
90 | .active_low = 0, | ||
91 | } | ||
92 | }; | ||
93 | |||
80 | static struct gpio_led_platform_data sdp4430_led_data = { | 94 | static struct gpio_led_platform_data sdp4430_led_data = { |
81 | .leds = sdp4430_gpio_leds, | 95 | .leds = sdp4430_gpio_leds, |
82 | .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), | 96 | .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), |
83 | }; | 97 | }; |
84 | 98 | ||
99 | static int omap_prox_activate(struct device *dev) | ||
100 | { | ||
101 | gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1); | ||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | static void omap_prox_deactivate(struct device *dev) | ||
106 | { | ||
107 | gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 0); | ||
108 | } | ||
109 | |||
110 | static struct gpio_keys_platform_data sdp4430_gpio_keys_data = { | ||
111 | .buttons = sdp4430_gpio_keys, | ||
112 | .nbuttons = ARRAY_SIZE(sdp4430_gpio_keys), | ||
113 | .enable = omap_prox_activate, | ||
114 | .disable = omap_prox_deactivate, | ||
115 | }; | ||
116 | |||
117 | static struct platform_device sdp4430_gpio_keys_device = { | ||
118 | .name = "gpio-keys", | ||
119 | .id = -1, | ||
120 | .dev = { | ||
121 | .platform_data = &sdp4430_gpio_keys_data, | ||
122 | }, | ||
123 | }; | ||
124 | |||
85 | static struct platform_device sdp4430_leds_gpio = { | 125 | static struct platform_device sdp4430_leds_gpio = { |
86 | .name = "leds-gpio", | 126 | .name = "leds-gpio", |
87 | .id = -1, | 127 | .id = -1, |
@@ -161,6 +201,7 @@ static struct platform_device sdp4430_lcd_device = { | |||
161 | 201 | ||
162 | static struct platform_device *sdp4430_devices[] __initdata = { | 202 | static struct platform_device *sdp4430_devices[] __initdata = { |
163 | &sdp4430_lcd_device, | 203 | &sdp4430_lcd_device, |
204 | &sdp4430_gpio_keys_device, | ||
164 | &sdp4430_leds_gpio, | 205 | &sdp4430_leds_gpio, |
165 | }; | 206 | }; |
166 | 207 | ||
@@ -193,15 +234,16 @@ static struct omap_musb_board_data musb_board_data = { | |||
193 | static struct omap2_hsmmc_info mmc[] = { | 234 | static struct omap2_hsmmc_info mmc[] = { |
194 | { | 235 | { |
195 | .mmc = 1, | 236 | .mmc = 1, |
196 | .wires = 8, | 237 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
197 | .gpio_wp = -EINVAL, | 238 | .gpio_wp = -EINVAL, |
198 | }, | 239 | }, |
199 | { | 240 | { |
200 | .mmc = 2, | 241 | .mmc = 2, |
201 | .wires = 8, | 242 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
202 | .gpio_cd = -EINVAL, | 243 | .gpio_cd = -EINVAL, |
203 | .gpio_wp = -EINVAL, | 244 | .gpio_wp = -EINVAL, |
204 | .nonremovable = true, | 245 | .nonremovable = true, |
246 | .ocr_mask = MMC_VDD_29_30, | ||
205 | }, | 247 | }, |
206 | {} /* Terminator */ | 248 | {} /* Terminator */ |
207 | }; | 249 | }; |
@@ -235,8 +277,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev) | |||
235 | 277 | ||
236 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) | 278 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) |
237 | { | 279 | { |
238 | struct omap_mmc_platform_data *pdata = dev->platform_data; | 280 | struct omap_mmc_platform_data *pdata; |
239 | 281 | ||
282 | /* dev can be null if CONFIG_MMC_OMAP_HS is not set */ | ||
283 | if (!dev) { | ||
284 | pr_err("Failed %s\n", __func__); | ||
285 | return; | ||
286 | } | ||
287 | pdata = dev->platform_data; | ||
240 | pdata->init = omap4_twl6030_hsmmc_late_init; | 288 | pdata->init = omap4_twl6030_hsmmc_late_init; |
241 | } | 289 | } |
242 | 290 | ||
@@ -412,6 +460,11 @@ static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { | |||
412 | I2C_BOARD_INFO("tmp105", 0x48), | 460 | I2C_BOARD_INFO("tmp105", 0x48), |
413 | }, | 461 | }, |
414 | }; | 462 | }; |
463 | static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = { | ||
464 | { | ||
465 | I2C_BOARD_INFO("hmc5843", 0x1e), | ||
466 | }, | ||
467 | }; | ||
415 | static int __init omap4_i2c_init(void) | 468 | static int __init omap4_i2c_init(void) |
416 | { | 469 | { |
417 | /* | 470 | /* |
@@ -423,14 +476,36 @@ static int __init omap4_i2c_init(void) | |||
423 | omap_register_i2c_bus(2, 400, NULL, 0); | 476 | omap_register_i2c_bus(2, 400, NULL, 0); |
424 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, | 477 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, |
425 | ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); | 478 | ARRAY_SIZE(sdp4430_i2c_3_boardinfo)); |
426 | omap_register_i2c_bus(4, 400, NULL, 0); | 479 | omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo, |
480 | ARRAY_SIZE(sdp4430_i2c_4_boardinfo)); | ||
427 | return 0; | 481 | return 0; |
428 | } | 482 | } |
483 | |||
484 | static void __init omap_sfh7741prox_init(void) | ||
485 | { | ||
486 | int error; | ||
487 | |||
488 | error = gpio_request(OMAP4_SFH7741_ENABLE_GPIO, "sfh7741"); | ||
489 | if (error < 0) { | ||
490 | pr_err("%s:failed to request GPIO %d, error %d\n", | ||
491 | __func__, OMAP4_SFH7741_ENABLE_GPIO, error); | ||
492 | return; | ||
493 | } | ||
494 | |||
495 | error = gpio_direction_output(OMAP4_SFH7741_ENABLE_GPIO , 0); | ||
496 | if (error < 0) { | ||
497 | pr_err("%s: GPIO configuration failed: GPIO %d,error %d\n", | ||
498 | __func__, OMAP4_SFH7741_ENABLE_GPIO, error); | ||
499 | gpio_free(OMAP4_SFH7741_ENABLE_GPIO); | ||
500 | } | ||
501 | } | ||
502 | |||
429 | static void __init omap_4430sdp_init(void) | 503 | static void __init omap_4430sdp_init(void) |
430 | { | 504 | { |
431 | int status; | 505 | int status; |
432 | 506 | ||
433 | omap4_i2c_init(); | 507 | omap4_i2c_init(); |
508 | omap_sfh7741prox_init(); | ||
434 | platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); | 509 | platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); |
435 | omap_serial_init(); | 510 | omap_serial_init(); |
436 | omap4_twl6030_hsmmc_init(mmc); | 511 | omap4_twl6030_hsmmc_init(mmc); |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index e1f8dda62799..07399505312b 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -33,11 +33,11 @@ | |||
33 | 33 | ||
34 | #include <plat/board.h> | 34 | #include <plat/board.h> |
35 | #include <plat/common.h> | 35 | #include <plat/common.h> |
36 | #include <plat/control.h> | ||
37 | #include <plat/usb.h> | 36 | #include <plat/usb.h> |
38 | #include <plat/display.h> | 37 | #include <plat/display.h> |
39 | 38 | ||
40 | #include "mux.h" | 39 | #include "mux.h" |
40 | #include "control.h" | ||
41 | 41 | ||
42 | #define AM35XX_EVM_MDIO_FREQUENCY (1000000) | 42 | #define AM35XX_EVM_MDIO_FREQUENCY (1000000) |
43 | 43 | ||
@@ -125,7 +125,7 @@ static void am3517_disable_ethernet_int(void) | |||
125 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | 125 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); |
126 | } | 126 | } |
127 | 127 | ||
128 | void am3517_evm_ethernet_init(struct emac_platform_data *pdata) | 128 | static void am3517_evm_ethernet_init(struct emac_platform_data *pdata) |
129 | { | 129 | { |
130 | unsigned int regval; | 130 | unsigned int regval; |
131 | 131 | ||
@@ -160,7 +160,6 @@ void am3517_evm_ethernet_init(struct emac_platform_data *pdata) | |||
160 | static struct i2c_board_info __initdata am3517evm_i2c1_boardinfo[] = { | 160 | static struct i2c_board_info __initdata am3517evm_i2c1_boardinfo[] = { |
161 | { | 161 | { |
162 | I2C_BOARD_INFO("s35390a", 0x30), | 162 | I2C_BOARD_INFO("s35390a", 0x30), |
163 | .type = "s35390a", | ||
164 | }, | 163 | }, |
165 | }; | 164 | }; |
166 | 165 | ||
@@ -368,7 +367,7 @@ static struct omap_dss_board_info am3517_evm_dss_data = { | |||
368 | .default_device = &am3517_evm_lcd_device, | 367 | .default_device = &am3517_evm_lcd_device, |
369 | }; | 368 | }; |
370 | 369 | ||
371 | struct platform_device am3517_evm_dss_device = { | 370 | static struct platform_device am3517_evm_dss_device = { |
372 | .name = "omapdss", | 371 | .name = "omapdss", |
373 | .id = -1, | 372 | .id = -1, |
374 | .dev = { | 373 | .dev = { |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 68f07f5f441a..2c6db1aaeb29 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -39,9 +39,9 @@ | |||
39 | #include <plat/board.h> | 39 | #include <plat/board.h> |
40 | #include <plat/common.h> | 40 | #include <plat/common.h> |
41 | #include <plat/gpmc.h> | 41 | #include <plat/gpmc.h> |
42 | #include <plat/control.h> | ||
43 | 42 | ||
44 | #include "mux.h" | 43 | #include "mux.h" |
44 | #include "control.h" | ||
45 | 45 | ||
46 | /* LED & Switch macros */ | 46 | /* LED & Switch macros */ |
47 | #define LED0_GPIO13 13 | 47 | #define LED0_GPIO13 13 |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 934d9380c372..63f764e2af3f 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/i2c/at24.h> | 31 | #include <linux/i2c/at24.h> |
32 | #include <linux/i2c/twl.h> | 32 | #include <linux/i2c/twl.h> |
33 | #include <linux/regulator/machine.h> | 33 | #include <linux/regulator/machine.h> |
34 | #include <linux/mmc/host.h> | ||
34 | 35 | ||
35 | #include <linux/spi/spi.h> | 36 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/tdo24m.h> | 37 | #include <linux/spi/tdo24m.h> |
@@ -237,8 +238,6 @@ static inline void cm_t35_init_nand(void) {} | |||
237 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 238 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
238 | #include <linux/spi/ads7846.h> | 239 | #include <linux/spi/ads7846.h> |
239 | 240 | ||
240 | #include <plat/mcspi.h> | ||
241 | |||
242 | static struct omap2_mcspi_device_config ads7846_mcspi_config = { | 241 | static struct omap2_mcspi_device_config ads7846_mcspi_config = { |
243 | .turbo_mode = 0, | 242 | .turbo_mode = 0, |
244 | .single_channel = 1, /* 0: slave, 1: master */ | 243 | .single_channel = 1, /* 0: slave, 1: master */ |
@@ -558,7 +557,7 @@ static struct twl4030_usb_data cm_t35_usb_data = { | |||
558 | .usb_mode = T2_USB_MODE_ULPI, | 557 | .usb_mode = T2_USB_MODE_ULPI, |
559 | }; | 558 | }; |
560 | 559 | ||
561 | static int cm_t35_keymap[] = { | 560 | static uint32_t cm_t35_keymap[] = { |
562 | KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT), | 561 | KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT), |
563 | KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN), | 562 | KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN), |
564 | KEY(2, 0, KEY_RIGHT), KEY(2, 1, KEY_C), KEY(2, 2, KEY_D), | 563 | KEY(2, 0, KEY_RIGHT), KEY(2, 1, KEY_C), KEY(2, 2, KEY_D), |
@@ -579,14 +578,14 @@ static struct twl4030_keypad_data cm_t35_kp_data = { | |||
579 | static struct omap2_hsmmc_info mmc[] = { | 578 | static struct omap2_hsmmc_info mmc[] = { |
580 | { | 579 | { |
581 | .mmc = 1, | 580 | .mmc = 1, |
582 | .wires = 4, | 581 | .caps = MMC_CAP_4_BIT_DATA, |
583 | .gpio_cd = -EINVAL, | 582 | .gpio_cd = -EINVAL, |
584 | .gpio_wp = -EINVAL, | 583 | .gpio_wp = -EINVAL, |
585 | 584 | ||
586 | }, | 585 | }, |
587 | { | 586 | { |
588 | .mmc = 2, | 587 | .mmc = 2, |
589 | .wires = 4, | 588 | .caps = MMC_CAP_4_BIT_DATA, |
590 | .transceiver = 1, | 589 | .transceiver = 1, |
591 | .gpio_cd = -EINVAL, | 590 | .gpio_cd = -EINVAL, |
592 | .gpio_wp = -EINVAL, | 591 | .gpio_wp = -EINVAL, |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c new file mode 100644 index 000000000000..1dd303e9a267 --- /dev/null +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -0,0 +1,292 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/board-cm-t3517.c | ||
3 | * | ||
4 | * Support for the CompuLab CM-T3517 modules | ||
5 | * | ||
6 | * Copyright (C) 2010 CompuLab, Ltd. | ||
7 | * Author: Igor Grinberg <grinberg@compulab.co.il> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * version 2 as published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
21 | * 02110-1301 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include <linux/kernel.h> | ||
26 | #include <linux/init.h> | ||
27 | #include <linux/platform_device.h> | ||
28 | #include <linux/delay.h> | ||
29 | #include <linux/gpio.h> | ||
30 | #include <linux/leds.h> | ||
31 | #include <linux/rtc-v3020.h> | ||
32 | #include <linux/mtd/mtd.h> | ||
33 | #include <linux/mtd/nand.h> | ||
34 | #include <linux/mtd/partitions.h> | ||
35 | #include <linux/can/platform/ti_hecc.h> | ||
36 | |||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/mach/arch.h> | ||
39 | #include <asm/mach/map.h> | ||
40 | |||
41 | #include <plat/board.h> | ||
42 | #include <plat/common.h> | ||
43 | #include <plat/usb.h> | ||
44 | #include <plat/nand.h> | ||
45 | #include <plat/gpmc.h> | ||
46 | |||
47 | #include <mach/am35xx.h> | ||
48 | |||
49 | #include "mux.h" | ||
50 | #include "control.h" | ||
51 | |||
52 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | ||
53 | static struct gpio_led cm_t3517_leds[] = { | ||
54 | [0] = { | ||
55 | .gpio = 186, | ||
56 | .name = "cm-t3517:green", | ||
57 | .default_trigger = "heartbeat", | ||
58 | .active_low = 0, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | static struct gpio_led_platform_data cm_t3517_led_pdata = { | ||
63 | .num_leds = ARRAY_SIZE(cm_t3517_leds), | ||
64 | .leds = cm_t3517_leds, | ||
65 | }; | ||
66 | |||
67 | static struct platform_device cm_t3517_led_device = { | ||
68 | .name = "leds-gpio", | ||
69 | .id = -1, | ||
70 | .dev = { | ||
71 | .platform_data = &cm_t3517_led_pdata, | ||
72 | }, | ||
73 | }; | ||
74 | |||
75 | static void __init cm_t3517_init_leds(void) | ||
76 | { | ||
77 | platform_device_register(&cm_t3517_led_device); | ||
78 | } | ||
79 | #else | ||
80 | static inline void cm_t3517_init_leds(void) {} | ||
81 | #endif | ||
82 | |||
83 | #if defined(CONFIG_CAN_TI_HECC) || defined(CONFIG_CAN_TI_HECC_MODULE) | ||
84 | static struct resource cm_t3517_hecc_resources[] = { | ||
85 | { | ||
86 | .start = AM35XX_IPSS_HECC_BASE, | ||
87 | .end = AM35XX_IPSS_HECC_BASE + SZ_16K - 1, | ||
88 | .flags = IORESOURCE_MEM, | ||
89 | }, | ||
90 | { | ||
91 | .start = INT_35XX_HECC0_IRQ, | ||
92 | .end = INT_35XX_HECC0_IRQ, | ||
93 | .flags = IORESOURCE_IRQ, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct ti_hecc_platform_data cm_t3517_hecc_pdata = { | ||
98 | .scc_hecc_offset = AM35XX_HECC_SCC_HECC_OFFSET, | ||
99 | .scc_ram_offset = AM35XX_HECC_SCC_RAM_OFFSET, | ||
100 | .hecc_ram_offset = AM35XX_HECC_RAM_OFFSET, | ||
101 | .mbx_offset = AM35XX_HECC_MBOX_OFFSET, | ||
102 | .int_line = AM35XX_HECC_INT_LINE, | ||
103 | .version = AM35XX_HECC_VERSION, | ||
104 | }; | ||
105 | |||
106 | static struct platform_device cm_t3517_hecc_device = { | ||
107 | .name = "ti_hecc", | ||
108 | .id = 1, | ||
109 | .num_resources = ARRAY_SIZE(cm_t3517_hecc_resources), | ||
110 | .resource = cm_t3517_hecc_resources, | ||
111 | .dev = { | ||
112 | .platform_data = &cm_t3517_hecc_pdata, | ||
113 | }, | ||
114 | }; | ||
115 | |||
116 | static void cm_t3517_init_hecc(void) | ||
117 | { | ||
118 | platform_device_register(&cm_t3517_hecc_device); | ||
119 | } | ||
120 | #else | ||
121 | static inline void cm_t3517_init_hecc(void) {} | ||
122 | #endif | ||
123 | |||
124 | #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) | ||
125 | #define RTC_IO_GPIO (153) | ||
126 | #define RTC_WR_GPIO (154) | ||
127 | #define RTC_RD_GPIO (160) | ||
128 | #define RTC_CS_GPIO (163) | ||
129 | |||
130 | struct v3020_platform_data cm_t3517_v3020_pdata = { | ||
131 | .use_gpio = 1, | ||
132 | .gpio_cs = RTC_CS_GPIO, | ||
133 | .gpio_wr = RTC_WR_GPIO, | ||
134 | .gpio_rd = RTC_RD_GPIO, | ||
135 | .gpio_io = RTC_IO_GPIO, | ||
136 | }; | ||
137 | |||
138 | static struct platform_device cm_t3517_rtc_device = { | ||
139 | .name = "v3020", | ||
140 | .id = -1, | ||
141 | .dev = { | ||
142 | .platform_data = &cm_t3517_v3020_pdata, | ||
143 | } | ||
144 | }; | ||
145 | |||
146 | static void __init cm_t3517_init_rtc(void) | ||
147 | { | ||
148 | platform_device_register(&cm_t3517_rtc_device); | ||
149 | } | ||
150 | #else | ||
151 | static inline void cm_t3517_init_rtc(void) {} | ||
152 | #endif | ||
153 | |||
154 | #if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_EHCI_HCD_MODULE) | ||
155 | #define HSUSB1_RESET_GPIO (146) | ||
156 | #define HSUSB2_RESET_GPIO (147) | ||
157 | #define USB_HUB_RESET_GPIO (152) | ||
158 | |||
159 | static struct ehci_hcd_omap_platform_data cm_t3517_ehci_pdata __initdata = { | ||
160 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | ||
161 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | ||
162 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
163 | |||
164 | .phy_reset = true, | ||
165 | .reset_gpio_port[0] = HSUSB1_RESET_GPIO, | ||
166 | .reset_gpio_port[1] = HSUSB2_RESET_GPIO, | ||
167 | .reset_gpio_port[2] = -EINVAL, | ||
168 | }; | ||
169 | |||
170 | static int cm_t3517_init_usbh(void) | ||
171 | { | ||
172 | int err; | ||
173 | |||
174 | err = gpio_request(USB_HUB_RESET_GPIO, "usb hub rst"); | ||
175 | if (err) { | ||
176 | pr_err("CM-T3517: usb hub rst gpio request failed: %d\n", err); | ||
177 | } else { | ||
178 | gpio_direction_output(USB_HUB_RESET_GPIO, 0); | ||
179 | udelay(10); | ||
180 | gpio_set_value(USB_HUB_RESET_GPIO, 1); | ||
181 | msleep(1); | ||
182 | } | ||
183 | |||
184 | usb_ehci_init(&cm_t3517_ehci_pdata); | ||
185 | |||
186 | return 0; | ||
187 | } | ||
188 | #else | ||
189 | static inline int cm_t3517_init_usbh(void) | ||
190 | { | ||
191 | return 0; | ||
192 | } | ||
193 | #endif | ||
194 | |||
195 | #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) | ||
196 | #define NAND_BLOCK_SIZE SZ_128K | ||
197 | |||
198 | static struct mtd_partition cm_t3517_nand_partitions[] = { | ||
199 | { | ||
200 | .name = "xloader", | ||
201 | .offset = 0, /* Offset = 0x00000 */ | ||
202 | .size = 4 * NAND_BLOCK_SIZE, | ||
203 | .mask_flags = MTD_WRITEABLE | ||
204 | }, | ||
205 | { | ||
206 | .name = "uboot", | ||
207 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ | ||
208 | .size = 15 * NAND_BLOCK_SIZE, | ||
209 | }, | ||
210 | { | ||
211 | .name = "uboot environment", | ||
212 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */ | ||
213 | .size = 2 * NAND_BLOCK_SIZE, | ||
214 | }, | ||
215 | { | ||
216 | .name = "linux", | ||
217 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ | ||
218 | .size = 32 * NAND_BLOCK_SIZE, | ||
219 | }, | ||
220 | { | ||
221 | .name = "rootfs", | ||
222 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */ | ||
223 | .size = MTDPART_SIZ_FULL, | ||
224 | }, | ||
225 | }; | ||
226 | |||
227 | static struct omap_nand_platform_data cm_t3517_nand_data = { | ||
228 | .parts = cm_t3517_nand_partitions, | ||
229 | .nr_parts = ARRAY_SIZE(cm_t3517_nand_partitions), | ||
230 | .dma_channel = -1, /* disable DMA in OMAP NAND driver */ | ||
231 | .cs = 0, | ||
232 | }; | ||
233 | |||
234 | static void __init cm_t3517_init_nand(void) | ||
235 | { | ||
236 | if (gpmc_nand_init(&cm_t3517_nand_data) < 0) | ||
237 | pr_err("CM-T3517: NAND initialization failed\n"); | ||
238 | } | ||
239 | #else | ||
240 | static inline void cm_t3517_init_nand(void) {} | ||
241 | #endif | ||
242 | |||
243 | static struct omap_board_config_kernel cm_t3517_config[] __initdata = { | ||
244 | }; | ||
245 | |||
246 | static void __init cm_t3517_init_irq(void) | ||
247 | { | ||
248 | omap_board_config = cm_t3517_config; | ||
249 | omap_board_config_size = ARRAY_SIZE(cm_t3517_config); | ||
250 | |||
251 | omap2_init_common_hw(NULL, NULL); | ||
252 | omap_init_irq(); | ||
253 | omap_gpio_init(); | ||
254 | } | ||
255 | |||
256 | static struct omap_board_mux board_mux[] __initdata = { | ||
257 | /* GPIO186 - Green LED */ | ||
258 | OMAP3_MUX(SYS_CLKOUT2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
259 | /* RTC GPIOs: IO, WR#, RD#, CS# */ | ||
260 | OMAP3_MUX(MCBSP4_DR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
261 | OMAP3_MUX(MCBSP4_DX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
262 | OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
263 | OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
264 | /* HSUSB1 RESET */ | ||
265 | OMAP3_MUX(UART2_TX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
266 | /* HSUSB2 RESET */ | ||
267 | OMAP3_MUX(UART2_RX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
268 | /* CM-T3517 USB HUB nRESET */ | ||
269 | OMAP3_MUX(MCBSP4_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
270 | |||
271 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
272 | }; | ||
273 | |||
274 | static void __init cm_t3517_init(void) | ||
275 | { | ||
276 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
277 | omap_serial_init(); | ||
278 | cm_t3517_init_leds(); | ||
279 | cm_t3517_init_nand(); | ||
280 | cm_t3517_init_rtc(); | ||
281 | cm_t3517_init_usbh(); | ||
282 | cm_t3517_init_hecc(); | ||
283 | } | ||
284 | |||
285 | MACHINE_START(CM_T3517, "Compulab CM-T3517") | ||
286 | .boot_params = 0x80000100, | ||
287 | .map_io = omap3_map_io, | ||
288 | .reserve = omap_reserve, | ||
289 | .init_irq = cm_t3517_init_irq, | ||
290 | .init_machine = cm_t3517_init, | ||
291 | .timer = &omap_timer, | ||
292 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 2205c20a4cdb..067f4379c87f 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/mtd/mtd.h> | 28 | #include <linux/mtd/mtd.h> |
29 | #include <linux/mtd/partitions.h> | 29 | #include <linux/mtd/partitions.h> |
30 | #include <linux/mtd/nand.h> | 30 | #include <linux/mtd/nand.h> |
31 | #include <linux/mmc/host.h> | ||
31 | 32 | ||
32 | #include <linux/regulator/machine.h> | 33 | #include <linux/regulator/machine.h> |
33 | #include <linux/i2c/twl.h> | 34 | #include <linux/i2c/twl.h> |
@@ -44,7 +45,6 @@ | |||
44 | #include <plat/gpmc.h> | 45 | #include <plat/gpmc.h> |
45 | #include <plat/nand.h> | 46 | #include <plat/nand.h> |
46 | #include <plat/usb.h> | 47 | #include <plat/usb.h> |
47 | #include <plat/timer-gp.h> | ||
48 | #include <plat/display.h> | 48 | #include <plat/display.h> |
49 | 49 | ||
50 | #include <plat/mcspi.h> | 50 | #include <plat/mcspi.h> |
@@ -58,6 +58,7 @@ | |||
58 | 58 | ||
59 | #include "mux.h" | 59 | #include "mux.h" |
60 | #include "hsmmc.h" | 60 | #include "hsmmc.h" |
61 | #include "timer-gp.h" | ||
61 | 62 | ||
62 | #define NAND_BLOCK_SIZE SZ_128K | 63 | #define NAND_BLOCK_SIZE SZ_128K |
63 | 64 | ||
@@ -105,7 +106,7 @@ static struct omap_nand_platform_data devkit8000_nand_data = { | |||
105 | static struct omap2_hsmmc_info mmc[] = { | 106 | static struct omap2_hsmmc_info mmc[] = { |
106 | { | 107 | { |
107 | .mmc = 1, | 108 | .mmc = 1, |
108 | .wires = 8, | 109 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
109 | .gpio_wp = 29, | 110 | .gpio_wp = 29, |
110 | }, | 111 | }, |
111 | {} /* Terminator */ | 112 | {} /* Terminator */ |
@@ -198,7 +199,7 @@ static struct platform_device devkit8000_dss_device = { | |||
198 | static struct regulator_consumer_supply devkit8000_vdda_dac_supply = | 199 | static struct regulator_consumer_supply devkit8000_vdda_dac_supply = |
199 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); | 200 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
200 | 201 | ||
201 | static int board_keymap[] = { | 202 | static uint32_t board_keymap[] = { |
202 | KEY(0, 0, KEY_1), | 203 | KEY(0, 0, KEY_1), |
203 | KEY(1, 0, KEY_2), | 204 | KEY(1, 0, KEY_2), |
204 | KEY(2, 0, KEY_3), | 205 | KEY(2, 0, KEY_3), |
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index ac834aa7abf6..fd38c05bb47f 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c | |||
@@ -21,7 +21,8 @@ | |||
21 | #include <plat/nand.h> | 21 | #include <plat/nand.h> |
22 | #include <plat/onenand.h> | 22 | #include <plat/onenand.h> |
23 | #include <plat/tc.h> | 23 | #include <plat/tc.h> |
24 | #include <mach/board-flash.h> | 24 | |
25 | #include "board-flash.h" | ||
25 | 26 | ||
26 | #define REG_FPGA_REV 0x10 | 27 | #define REG_FPGA_REV 0x10 |
27 | #define REG_FPGA_DIP_SWITCH_INPUT2 0x60 | 28 | #define REG_FPGA_DIP_SWITCH_INPUT2 0x60 |
diff --git a/arch/arm/mach-omap2/include/mach/board-flash.h b/arch/arm/mach-omap2/board-flash.h index b2242ae2bb6f..69befe00dd2f 100644 --- a/arch/arm/mach-omap2/include/mach/board-flash.h +++ b/arch/arm/mach-omap2/board-flash.h | |||
@@ -26,3 +26,5 @@ struct flash_partitions { | |||
26 | 26 | ||
27 | extern void board_flash_init(struct flash_partitions [], | 27 | extern void board_flash_init(struct flash_partitions [], |
28 | char chip_sel[][GPMC_CS_NUM]); | 28 | char chip_sel[][GPMC_CS_NUM]); |
29 | extern void board_nand_init(struct mtd_partition *nand_parts, | ||
30 | u8 nr_parts, u8 cs); | ||
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 69064b1c6a75..b1c2c9a11c38 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -48,10 +48,22 @@ static void __init omap_generic_init(void) | |||
48 | 48 | ||
49 | static void __init omap_generic_map_io(void) | 49 | static void __init omap_generic_map_io(void) |
50 | { | 50 | { |
51 | omap2_set_globals_242x(); /* should be 242x, 243x, or 343x */ | 51 | if (cpu_is_omap242x()) { |
52 | omap242x_map_common_io(); | 52 | omap2_set_globals_242x(); |
53 | omap242x_map_common_io(); | ||
54 | } else if (cpu_is_omap243x()) { | ||
55 | omap2_set_globals_243x(); | ||
56 | omap243x_map_common_io(); | ||
57 | } else if (cpu_is_omap34xx()) { | ||
58 | omap2_set_globals_3xxx(); | ||
59 | omap34xx_map_common_io(); | ||
60 | } else if (cpu_is_omap44xx()) { | ||
61 | omap2_set_globals_443x(); | ||
62 | omap44xx_map_common_io(); | ||
63 | } | ||
53 | } | 64 | } |
54 | 65 | ||
66 | /* XXX This machine entry name should be updated */ | ||
55 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") | 67 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") |
56 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ | 68 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ |
57 | .boot_params = 0x80000100, | 69 | .boot_params = 0x80000100, |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index cc39fc866524..929993b4bf26 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
33 | 33 | ||
34 | #include <plat/control.h> | ||
35 | #include <mach/gpio.h> | 34 | #include <mach/gpio.h> |
36 | #include <plat/usb.h> | 35 | #include <plat/usb.h> |
37 | #include <plat/board.h> | 36 | #include <plat/board.h> |
@@ -42,6 +41,7 @@ | |||
42 | #include <plat/gpmc.h> | 41 | #include <plat/gpmc.h> |
43 | 42 | ||
44 | #include "mux.h" | 43 | #include "mux.h" |
44 | #include "control.h" | ||
45 | 45 | ||
46 | #define H4_FLASH_CS 0 | 46 | #define H4_FLASH_CS 0 |
47 | #define H4_SMC91X_CS 1 | 47 | #define H4_SMC91X_CS 1 |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index b62a68ba069b..5e035a58b809 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/regulator/machine.h> | 21 | #include <linux/regulator/machine.h> |
22 | #include <linux/i2c/twl.h> | 22 | #include <linux/i2c/twl.h> |
23 | #include <linux/mmc/host.h> | ||
23 | 24 | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
@@ -38,12 +39,61 @@ | |||
38 | #define IGEP2_SMSC911X_CS 5 | 39 | #define IGEP2_SMSC911X_CS 5 |
39 | #define IGEP2_SMSC911X_GPIO 176 | 40 | #define IGEP2_SMSC911X_GPIO 176 |
40 | #define IGEP2_GPIO_USBH_NRESET 24 | 41 | #define IGEP2_GPIO_USBH_NRESET 24 |
41 | #define IGEP2_GPIO_LED0_GREEN 26 | 42 | #define IGEP2_GPIO_LED0_GREEN 26 |
42 | #define IGEP2_GPIO_LED0_RED 27 | 43 | #define IGEP2_GPIO_LED0_RED 27 |
43 | #define IGEP2_GPIO_LED1_RED 28 | 44 | #define IGEP2_GPIO_LED1_RED 28 |
44 | #define IGEP2_GPIO_DVI_PUP 170 | 45 | #define IGEP2_GPIO_DVI_PUP 170 |
45 | #define IGEP2_GPIO_WIFI_NPD 94 | 46 | |
46 | #define IGEP2_GPIO_WIFI_NRESET 95 | 47 | #define IGEP2_RB_GPIO_WIFI_NPD 94 |
48 | #define IGEP2_RB_GPIO_WIFI_NRESET 95 | ||
49 | #define IGEP2_RB_GPIO_BT_NRESET 137 | ||
50 | #define IGEP2_RC_GPIO_WIFI_NPD 138 | ||
51 | #define IGEP2_RC_GPIO_WIFI_NRESET 139 | ||
52 | #define IGEP2_RC_GPIO_BT_NRESET 137 | ||
53 | |||
54 | /* | ||
55 | * IGEP2 Hardware Revision Table | ||
56 | * | ||
57 | * -------------------------------------------------------------------------- | ||
58 | * | Id. | Hw Rev. | HW0 (28) | WIFI_NPD | WIFI_NRESET | BT_NRESET | | ||
59 | * -------------------------------------------------------------------------- | ||
60 | * | 0 | B | high | gpio94 | gpio95 | - | | ||
61 | * | 0 | B/C (B-compatible) | high | gpio94 | gpio95 | gpio137 | | ||
62 | * | 1 | C | low | gpio138 | gpio139 | gpio137 | | ||
63 | * -------------------------------------------------------------------------- | ||
64 | */ | ||
65 | |||
66 | #define IGEP2_BOARD_HWREV_B 0 | ||
67 | #define IGEP2_BOARD_HWREV_C 1 | ||
68 | |||
69 | static u8 hwrev; | ||
70 | |||
71 | static void __init igep2_get_revision(void) | ||
72 | { | ||
73 | u8 ret; | ||
74 | |||
75 | omap_mux_init_gpio(IGEP2_GPIO_LED1_RED, OMAP_PIN_INPUT); | ||
76 | |||
77 | if ((gpio_request(IGEP2_GPIO_LED1_RED, "GPIO_HW0_REV") == 0) && | ||
78 | (gpio_direction_input(IGEP2_GPIO_LED1_RED) == 0)) { | ||
79 | ret = gpio_get_value(IGEP2_GPIO_LED1_RED); | ||
80 | if (ret == 0) { | ||
81 | pr_info("IGEP2: Hardware Revision C (B-NON compatible)\n"); | ||
82 | hwrev = IGEP2_BOARD_HWREV_C; | ||
83 | } else if (ret == 1) { | ||
84 | pr_info("IGEP2: Hardware Revision B/C (B compatible)\n"); | ||
85 | hwrev = IGEP2_BOARD_HWREV_B; | ||
86 | } else { | ||
87 | pr_err("IGEP2: Unknown Hardware Revision\n"); | ||
88 | hwrev = -1; | ||
89 | } | ||
90 | } else { | ||
91 | pr_warning("IGEP2: Could not obtain gpio GPIO_HW0_REV\n"); | ||
92 | pr_err("IGEP2: Unknown Hardware Revision\n"); | ||
93 | } | ||
94 | |||
95 | gpio_free(IGEP2_GPIO_LED1_RED); | ||
96 | } | ||
47 | 97 | ||
48 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | 98 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ |
49 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) | 99 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) |
@@ -107,7 +157,7 @@ static struct platform_device igep2_onenand_device = { | |||
107 | }, | 157 | }, |
108 | }; | 158 | }; |
109 | 159 | ||
110 | void __init igep2_flash_init(void) | 160 | static void __init igep2_flash_init(void) |
111 | { | 161 | { |
112 | u8 cs = 0; | 162 | u8 cs = 0; |
113 | u8 onenandcs = GPMC_CS_NUM + 1; | 163 | u8 onenandcs = GPMC_CS_NUM + 1; |
@@ -141,7 +191,7 @@ void __init igep2_flash_init(void) | |||
141 | } | 191 | } |
142 | 192 | ||
143 | #else | 193 | #else |
144 | void __init igep2_flash_init(void) {} | 194 | static void __init igep2_flash_init(void) {} |
145 | #endif | 195 | #endif |
146 | 196 | ||
147 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | 197 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) |
@@ -211,10 +261,6 @@ static struct regulator_consumer_supply igep2_vmmc1_supply = { | |||
211 | .supply = "vmmc", | 261 | .supply = "vmmc", |
212 | }; | 262 | }; |
213 | 263 | ||
214 | static struct regulator_consumer_supply igep2_vmmc2_supply = { | ||
215 | .supply = "vmmc", | ||
216 | }; | ||
217 | |||
218 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | 264 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
219 | static struct regulator_init_data igep2_vmmc1 = { | 265 | static struct regulator_init_data igep2_vmmc1 = { |
220 | .constraints = { | 266 | .constraints = { |
@@ -230,37 +276,95 @@ static struct regulator_init_data igep2_vmmc1 = { | |||
230 | .consumer_supplies = &igep2_vmmc1_supply, | 276 | .consumer_supplies = &igep2_vmmc1_supply, |
231 | }; | 277 | }; |
232 | 278 | ||
233 | /* VMMC2 for OMAP VDD_MMC2 (i/o) and MMC2 WIFI */ | ||
234 | static struct regulator_init_data igep2_vmmc2 = { | ||
235 | .constraints = { | ||
236 | .min_uV = 1850000, | ||
237 | .max_uV = 3150000, | ||
238 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
239 | | REGULATOR_MODE_STANDBY, | ||
240 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
241 | | REGULATOR_CHANGE_MODE | ||
242 | | REGULATOR_CHANGE_STATUS, | ||
243 | }, | ||
244 | .num_consumer_supplies = 1, | ||
245 | .consumer_supplies = &igep2_vmmc2_supply, | ||
246 | }; | ||
247 | |||
248 | static struct omap2_hsmmc_info mmc[] = { | 279 | static struct omap2_hsmmc_info mmc[] = { |
249 | { | 280 | { |
250 | .mmc = 1, | 281 | .mmc = 1, |
251 | .wires = 4, | 282 | .caps = MMC_CAP_4_BIT_DATA, |
252 | .gpio_cd = -EINVAL, | 283 | .gpio_cd = -EINVAL, |
253 | .gpio_wp = -EINVAL, | 284 | .gpio_wp = -EINVAL, |
254 | }, | 285 | }, |
286 | #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE) | ||
255 | { | 287 | { |
256 | .mmc = 2, | 288 | .mmc = 2, |
257 | .wires = 4, | 289 | .caps = MMC_CAP_4_BIT_DATA, |
258 | .gpio_cd = -EINVAL, | 290 | .gpio_cd = -EINVAL, |
259 | .gpio_wp = -EINVAL, | 291 | .gpio_wp = -EINVAL, |
260 | }, | 292 | }, |
293 | #endif | ||
261 | {} /* Terminator */ | 294 | {} /* Terminator */ |
262 | }; | 295 | }; |
263 | 296 | ||
297 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | ||
298 | #include <linux/leds.h> | ||
299 | |||
300 | static struct gpio_led igep2_gpio_leds[] = { | ||
301 | [0] = { | ||
302 | .name = "gpio-led:red:d0", | ||
303 | .gpio = IGEP2_GPIO_LED0_RED, | ||
304 | .default_trigger = "default-off" | ||
305 | }, | ||
306 | [1] = { | ||
307 | .name = "gpio-led:green:d0", | ||
308 | .gpio = IGEP2_GPIO_LED0_GREEN, | ||
309 | .default_trigger = "default-off", | ||
310 | }, | ||
311 | [2] = { | ||
312 | .name = "gpio-led:red:d1", | ||
313 | .gpio = IGEP2_GPIO_LED1_RED, | ||
314 | .default_trigger = "default-off", | ||
315 | }, | ||
316 | [3] = { | ||
317 | .name = "gpio-led:green:d1", | ||
318 | .default_trigger = "heartbeat", | ||
319 | .gpio = -EINVAL, /* gets replaced */ | ||
320 | }, | ||
321 | }; | ||
322 | |||
323 | static struct gpio_led_platform_data igep2_led_pdata = { | ||
324 | .leds = igep2_gpio_leds, | ||
325 | .num_leds = ARRAY_SIZE(igep2_gpio_leds), | ||
326 | }; | ||
327 | |||
328 | static struct platform_device igep2_led_device = { | ||
329 | .name = "leds-gpio", | ||
330 | .id = -1, | ||
331 | .dev = { | ||
332 | .platform_data = &igep2_led_pdata, | ||
333 | }, | ||
334 | }; | ||
335 | |||
336 | static void __init igep2_leds_init(void) | ||
337 | { | ||
338 | platform_device_register(&igep2_led_device); | ||
339 | } | ||
340 | |||
341 | #else | ||
342 | static inline void igep2_leds_init(void) | ||
343 | { | ||
344 | if ((gpio_request(IGEP2_GPIO_LED0_RED, "gpio-led:red:d0") == 0) && | ||
345 | (gpio_direction_output(IGEP2_GPIO_LED0_RED, 1) == 0)) { | ||
346 | gpio_export(IGEP2_GPIO_LED0_RED, 0); | ||
347 | gpio_set_value(IGEP2_GPIO_LED0_RED, 0); | ||
348 | } else | ||
349 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_RED\n"); | ||
350 | |||
351 | if ((gpio_request(IGEP2_GPIO_LED0_GREEN, "gpio-led:green:d0") == 0) && | ||
352 | (gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 1) == 0)) { | ||
353 | gpio_export(IGEP2_GPIO_LED0_GREEN, 0); | ||
354 | gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0); | ||
355 | } else | ||
356 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n"); | ||
357 | |||
358 | if ((gpio_request(IGEP2_GPIO_LED1_RED, "gpio-led:red:d1") == 0) && | ||
359 | (gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) { | ||
360 | gpio_export(IGEP2_GPIO_LED1_RED, 0); | ||
361 | gpio_set_value(IGEP2_GPIO_LED1_RED, 0); | ||
362 | } else | ||
363 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_RED\n"); | ||
364 | |||
365 | } | ||
366 | #endif | ||
367 | |||
264 | static int igep2_twl_gpio_setup(struct device *dev, | 368 | static int igep2_twl_gpio_setup(struct device *dev, |
265 | unsigned gpio, unsigned ngpio) | 369 | unsigned gpio, unsigned ngpio) |
266 | { | 370 | { |
@@ -268,20 +372,48 @@ static int igep2_twl_gpio_setup(struct device *dev, | |||
268 | mmc[0].gpio_cd = gpio + 0; | 372 | mmc[0].gpio_cd = gpio + 0; |
269 | omap2_hsmmc_init(mmc); | 373 | omap2_hsmmc_init(mmc); |
270 | 374 | ||
271 | /* link regulators to MMC adapters ... we "know" the | 375 | /* |
376 | * link regulators to MMC adapters ... we "know" the | ||
272 | * regulators will be set up only *after* we return. | 377 | * regulators will be set up only *after* we return. |
273 | */ | 378 | */ |
274 | igep2_vmmc1_supply.dev = mmc[0].dev; | 379 | igep2_vmmc1_supply.dev = mmc[0].dev; |
275 | igep2_vmmc2_supply.dev = mmc[1].dev; | 380 | |
381 | /* | ||
382 | * REVISIT: need ehci-omap hooks for external VBUS | ||
383 | * power switch and overcurrent detect | ||
384 | */ | ||
385 | if ((gpio_request(gpio + 1, "GPIO_EHCI_NOC") < 0) || | ||
386 | (gpio_direction_input(gpio + 1) < 0)) | ||
387 | pr_err("IGEP2: Could not obtain gpio for EHCI NOC"); | ||
388 | |||
389 | /* | ||
390 | * TWL4030_GPIO_MAX + 0 == ledA, GPIO_USBH_CPEN | ||
391 | * (out, active low) | ||
392 | */ | ||
393 | if ((gpio_request(gpio + TWL4030_GPIO_MAX, "GPIO_USBH_CPEN") < 0) || | ||
394 | (gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0) < 0)) | ||
395 | pr_err("IGEP2: Could not obtain gpio for USBH_CPEN"); | ||
396 | |||
397 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ | ||
398 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) | ||
399 | if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) | ||
400 | && (gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 1) == 0)) { | ||
401 | gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0); | ||
402 | gpio_set_value(gpio + TWL4030_GPIO_MAX + 1, 0); | ||
403 | } else | ||
404 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n"); | ||
405 | #else | ||
406 | igep2_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1; | ||
407 | #endif | ||
276 | 408 | ||
277 | return 0; | 409 | return 0; |
278 | }; | 410 | }; |
279 | 411 | ||
280 | static struct twl4030_gpio_platform_data igep2_gpio_data = { | 412 | static struct twl4030_gpio_platform_data igep2_twl4030_gpio_pdata = { |
281 | .gpio_base = OMAP_MAX_GPIO_LINES, | 413 | .gpio_base = OMAP_MAX_GPIO_LINES, |
282 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 414 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
283 | .irq_end = TWL4030_GPIO_IRQ_END, | 415 | .irq_end = TWL4030_GPIO_IRQ_END, |
284 | .use_leds = false, | 416 | .use_leds = true, |
285 | .setup = igep2_twl_gpio_setup, | 417 | .setup = igep2_twl_gpio_setup, |
286 | }; | 418 | }; |
287 | 419 | ||
@@ -355,47 +487,6 @@ static void __init igep2_display_init(void) | |||
355 | pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n"); | 487 | pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n"); |
356 | } | 488 | } |
357 | 489 | ||
358 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | ||
359 | #include <linux/leds.h> | ||
360 | |||
361 | static struct gpio_led igep2_gpio_leds[] = { | ||
362 | { | ||
363 | .name = "led0:red", | ||
364 | .gpio = IGEP2_GPIO_LED0_RED, | ||
365 | }, | ||
366 | { | ||
367 | .name = "led0:green", | ||
368 | .default_trigger = "heartbeat", | ||
369 | .gpio = IGEP2_GPIO_LED0_GREEN, | ||
370 | }, | ||
371 | { | ||
372 | .name = "led1:red", | ||
373 | .gpio = IGEP2_GPIO_LED1_RED, | ||
374 | }, | ||
375 | }; | ||
376 | |||
377 | static struct gpio_led_platform_data igep2_led_pdata = { | ||
378 | .leds = igep2_gpio_leds, | ||
379 | .num_leds = ARRAY_SIZE(igep2_gpio_leds), | ||
380 | }; | ||
381 | |||
382 | static struct platform_device igep2_led_device = { | ||
383 | .name = "leds-gpio", | ||
384 | .id = -1, | ||
385 | .dev = { | ||
386 | .platform_data = &igep2_led_pdata, | ||
387 | }, | ||
388 | }; | ||
389 | |||
390 | static void __init igep2_init_led(void) | ||
391 | { | ||
392 | platform_device_register(&igep2_led_device); | ||
393 | } | ||
394 | |||
395 | #else | ||
396 | static inline void igep2_init_led(void) {} | ||
397 | #endif | ||
398 | |||
399 | static struct platform_device *igep2_devices[] __initdata = { | 490 | static struct platform_device *igep2_devices[] __initdata = { |
400 | &igep2_dss_device, | 491 | &igep2_dss_device, |
401 | }; | 492 | }; |
@@ -425,14 +516,13 @@ static struct twl4030_platform_data igep2_twldata = { | |||
425 | /* platform_data for children goes here */ | 516 | /* platform_data for children goes here */ |
426 | .usb = &igep2_usb_data, | 517 | .usb = &igep2_usb_data, |
427 | .codec = &igep2_codec_data, | 518 | .codec = &igep2_codec_data, |
428 | .gpio = &igep2_gpio_data, | 519 | .gpio = &igep2_twl4030_gpio_pdata, |
429 | .vmmc1 = &igep2_vmmc1, | 520 | .vmmc1 = &igep2_vmmc1, |
430 | .vmmc2 = &igep2_vmmc2, | ||
431 | .vpll2 = &igep2_vpll2, | 521 | .vpll2 = &igep2_vpll2, |
432 | 522 | ||
433 | }; | 523 | }; |
434 | 524 | ||
435 | static struct i2c_board_info __initdata igep2_i2c_boardinfo[] = { | 525 | static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = { |
436 | { | 526 | { |
437 | I2C_BOARD_INFO("twl4030", 0x48), | 527 | I2C_BOARD_INFO("twl4030", 0x48), |
438 | .flags = I2C_CLIENT_WAKE, | 528 | .flags = I2C_CLIENT_WAKE, |
@@ -441,14 +531,29 @@ static struct i2c_board_info __initdata igep2_i2c_boardinfo[] = { | |||
441 | }, | 531 | }, |
442 | }; | 532 | }; |
443 | 533 | ||
444 | static int __init igep2_i2c_init(void) | 534 | static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = { |
535 | { | ||
536 | I2C_BOARD_INFO("eeprom", 0x50), | ||
537 | }, | ||
538 | }; | ||
539 | |||
540 | static void __init igep2_i2c_init(void) | ||
445 | { | 541 | { |
446 | omap_register_i2c_bus(1, 2600, igep2_i2c_boardinfo, | 542 | int ret; |
447 | ARRAY_SIZE(igep2_i2c_boardinfo)); | 543 | |
448 | /* Bus 3 is attached to the DVI port where devices like the pico DLP | 544 | ret = omap_register_i2c_bus(1, 2600, igep2_i2c1_boardinfo, |
449 | * projector don't work reliably with 400kHz */ | 545 | ARRAY_SIZE(igep2_i2c1_boardinfo)); |
450 | omap_register_i2c_bus(3, 100, NULL, 0); | 546 | if (ret) |
451 | return 0; | 547 | pr_warning("IGEP2: Could not register I2C1 bus (%d)\n", ret); |
548 | |||
549 | /* | ||
550 | * Bus 3 is attached to the DVI port where devices like the pico DLP | ||
551 | * projector don't work reliably with 400kHz | ||
552 | */ | ||
553 | ret = omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo, | ||
554 | ARRAY_SIZE(igep2_i2c3_boardinfo)); | ||
555 | if (ret) | ||
556 | pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret); | ||
452 | } | 557 | } |
453 | 558 | ||
454 | static struct omap_musb_board_data musb_board_data = { | 559 | static struct omap_musb_board_data musb_board_data = { |
@@ -476,9 +581,57 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
476 | #define board_mux NULL | 581 | #define board_mux NULL |
477 | #endif | 582 | #endif |
478 | 583 | ||
584 | #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE) | ||
585 | |||
586 | static void __init igep2_wlan_bt_init(void) | ||
587 | { | ||
588 | unsigned npd, wreset, btreset; | ||
589 | |||
590 | /* GPIO's for WLAN-BT combo depends on hardware revision */ | ||
591 | if (hwrev == IGEP2_BOARD_HWREV_B) { | ||
592 | npd = IGEP2_RB_GPIO_WIFI_NPD; | ||
593 | wreset = IGEP2_RB_GPIO_WIFI_NRESET; | ||
594 | btreset = IGEP2_RB_GPIO_BT_NRESET; | ||
595 | } else if (hwrev == IGEP2_BOARD_HWREV_C) { | ||
596 | npd = IGEP2_RC_GPIO_WIFI_NPD; | ||
597 | wreset = IGEP2_RC_GPIO_WIFI_NRESET; | ||
598 | btreset = IGEP2_RC_GPIO_BT_NRESET; | ||
599 | } else | ||
600 | return; | ||
601 | |||
602 | /* Set GPIO's for WLAN-BT combo module */ | ||
603 | if ((gpio_request(npd, "GPIO_WIFI_NPD") == 0) && | ||
604 | (gpio_direction_output(npd, 1) == 0)) { | ||
605 | gpio_export(npd, 0); | ||
606 | } else | ||
607 | pr_warning("IGEP2: Could not obtain gpio GPIO_WIFI_NPD\n"); | ||
608 | |||
609 | if ((gpio_request(wreset, "GPIO_WIFI_NRESET") == 0) && | ||
610 | (gpio_direction_output(wreset, 1) == 0)) { | ||
611 | gpio_export(wreset, 0); | ||
612 | gpio_set_value(wreset, 0); | ||
613 | udelay(10); | ||
614 | gpio_set_value(wreset, 1); | ||
615 | } else | ||
616 | pr_warning("IGEP2: Could not obtain gpio GPIO_WIFI_NRESET\n"); | ||
617 | |||
618 | if ((gpio_request(btreset, "GPIO_BT_NRESET") == 0) && | ||
619 | (gpio_direction_output(btreset, 1) == 0)) { | ||
620 | gpio_export(btreset, 0); | ||
621 | } else | ||
622 | pr_warning("IGEP2: Could not obtain gpio GPIO_BT_NRESET\n"); | ||
623 | } | ||
624 | #else | ||
625 | static inline void __init igep2_wlan_bt_init(void) { } | ||
626 | #endif | ||
627 | |||
479 | static void __init igep2_init(void) | 628 | static void __init igep2_init(void) |
480 | { | 629 | { |
481 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 630 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
631 | |||
632 | /* Get IGEP2 hardware revision */ | ||
633 | igep2_get_revision(); | ||
634 | /* Register I2C busses and drivers */ | ||
482 | igep2_i2c_init(); | 635 | igep2_i2c_init(); |
483 | platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices)); | 636 | platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices)); |
484 | omap_serial_init(); | 637 | omap_serial_init(); |
@@ -486,50 +639,16 @@ static void __init igep2_init(void) | |||
486 | usb_ehci_init(&ehci_pdata); | 639 | usb_ehci_init(&ehci_pdata); |
487 | 640 | ||
488 | igep2_flash_init(); | 641 | igep2_flash_init(); |
489 | igep2_init_led(); | 642 | igep2_leds_init(); |
490 | igep2_display_init(); | 643 | igep2_display_init(); |
491 | igep2_init_smsc911x(); | 644 | igep2_init_smsc911x(); |
492 | 645 | ||
493 | /* GPIO userspace leds */ | 646 | /* |
494 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) | 647 | * WLAN-BT combo module from MuRata wich has a Marvell WLAN |
495 | if ((gpio_request(IGEP2_GPIO_LED0_RED, "led0:red") == 0) && | 648 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. |
496 | (gpio_direction_output(IGEP2_GPIO_LED0_RED, 1) == 0)) { | 649 | */ |
497 | gpio_export(IGEP2_GPIO_LED0_RED, 0); | 650 | igep2_wlan_bt_init(); |
498 | gpio_set_value(IGEP2_GPIO_LED0_RED, 0); | ||
499 | } else | ||
500 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_RED\n"); | ||
501 | |||
502 | if ((gpio_request(IGEP2_GPIO_LED0_GREEN, "led0:green") == 0) && | ||
503 | (gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 1) == 0)) { | ||
504 | gpio_export(IGEP2_GPIO_LED0_GREEN, 0); | ||
505 | gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0); | ||
506 | } else | ||
507 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n"); | ||
508 | |||
509 | if ((gpio_request(IGEP2_GPIO_LED1_RED, "led1:red") == 0) && | ||
510 | (gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) { | ||
511 | gpio_export(IGEP2_GPIO_LED1_RED, 0); | ||
512 | gpio_set_value(IGEP2_GPIO_LED1_RED, 0); | ||
513 | } else | ||
514 | pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_RED\n"); | ||
515 | #endif | ||
516 | |||
517 | /* GPIO W-LAN + Bluetooth combo module */ | ||
518 | if ((gpio_request(IGEP2_GPIO_WIFI_NPD, "GPIO_WIFI_NPD") == 0) && | ||
519 | (gpio_direction_output(IGEP2_GPIO_WIFI_NPD, 1) == 0)) { | ||
520 | gpio_export(IGEP2_GPIO_WIFI_NPD, 0); | ||
521 | /* gpio_set_value(IGEP2_GPIO_WIFI_NPD, 0); */ | ||
522 | } else | ||
523 | pr_warning("IGEP v2: Could not obtain gpio GPIO_WIFI_NPD\n"); | ||
524 | 651 | ||
525 | if ((gpio_request(IGEP2_GPIO_WIFI_NRESET, "GPIO_WIFI_NRESET") == 0) && | ||
526 | (gpio_direction_output(IGEP2_GPIO_WIFI_NRESET, 1) == 0)) { | ||
527 | gpio_export(IGEP2_GPIO_WIFI_NRESET, 0); | ||
528 | gpio_set_value(IGEP2_GPIO_WIFI_NRESET, 0); | ||
529 | udelay(10); | ||
530 | gpio_set_value(IGEP2_GPIO_WIFI_NRESET, 1); | ||
531 | } else | ||
532 | pr_warning("IGEP v2: Could not obtain gpio GPIO_WIFI_NRESET\n"); | ||
533 | } | 652 | } |
534 | 653 | ||
535 | MACHINE_START(IGEP0020, "IGEP v2 board") | 654 | MACHINE_START(IGEP0020, "IGEP v2 board") |
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c new file mode 100644 index 000000000000..22b0b253e16b --- /dev/null +++ b/arch/arm/mach-omap2/board-igep0030.c | |||
@@ -0,0 +1,400 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 - ISEE 2007 SL | ||
3 | * | ||
4 | * Modified from mach-omap2/board-generic.c | ||
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 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/delay.h> | ||
15 | #include <linux/err.h> | ||
16 | #include <linux/clk.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | |||
21 | #include <linux/regulator/machine.h> | ||
22 | #include <linux/i2c/twl.h> | ||
23 | #include <linux/mmc/host.h> | ||
24 | |||
25 | #include <asm/mach-types.h> | ||
26 | #include <asm/mach/arch.h> | ||
27 | |||
28 | #include <plat/board.h> | ||
29 | #include <plat/common.h> | ||
30 | #include <plat/gpmc.h> | ||
31 | #include <plat/usb.h> | ||
32 | #include <plat/onenand.h> | ||
33 | |||
34 | #include "mux.h" | ||
35 | #include "hsmmc.h" | ||
36 | #include "sdram-numonyx-m65kxxxxam.h" | ||
37 | |||
38 | #define IGEP3_GPIO_LED0_GREEN 54 | ||
39 | #define IGEP3_GPIO_LED0_RED 53 | ||
40 | #define IGEP3_GPIO_LED1_RED 16 | ||
41 | |||
42 | #define IGEP3_GPIO_WIFI_NPD 138 | ||
43 | #define IGEP3_GPIO_WIFI_NRESET 139 | ||
44 | #define IGEP3_GPIO_BT_NRESET 137 | ||
45 | |||
46 | #define IGEP3_GPIO_USBH_NRESET 115 | ||
47 | |||
48 | |||
49 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | ||
50 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) | ||
51 | |||
52 | #define ONENAND_MAP 0x20000000 | ||
53 | |||
54 | /* | ||
55 | * x2 Flash built-in COMBO POP MEMORY | ||
56 | * Since the device is equipped with two DataRAMs, and two-plane NAND | ||
57 | * Flash memory array, these two component enables simultaneous program | ||
58 | * of 4KiB. Plane1 has only even blocks such as block0, block2, block4 | ||
59 | * while Plane2 has only odd blocks such as block1, block3, block5. | ||
60 | * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048) | ||
61 | */ | ||
62 | |||
63 | static struct mtd_partition igep3_onenand_partitions[] = { | ||
64 | { | ||
65 | .name = "X-Loader", | ||
66 | .offset = 0, | ||
67 | .size = 2 * (64*(2*2048)) | ||
68 | }, | ||
69 | { | ||
70 | .name = "U-Boot", | ||
71 | .offset = MTDPART_OFS_APPEND, | ||
72 | .size = 6 * (64*(2*2048)), | ||
73 | }, | ||
74 | { | ||
75 | .name = "Environment", | ||
76 | .offset = MTDPART_OFS_APPEND, | ||
77 | .size = 2 * (64*(2*2048)), | ||
78 | }, | ||
79 | { | ||
80 | .name = "Kernel", | ||
81 | .offset = MTDPART_OFS_APPEND, | ||
82 | .size = 12 * (64*(2*2048)), | ||
83 | }, | ||
84 | { | ||
85 | .name = "File System", | ||
86 | .offset = MTDPART_OFS_APPEND, | ||
87 | .size = MTDPART_SIZ_FULL, | ||
88 | }, | ||
89 | }; | ||
90 | |||
91 | static struct omap_onenand_platform_data igep3_onenand_pdata = { | ||
92 | .parts = igep3_onenand_partitions, | ||
93 | .nr_parts = ARRAY_SIZE(igep3_onenand_partitions), | ||
94 | .onenand_setup = NULL, | ||
95 | .dma_channel = -1, /* disable DMA in OMAP OneNAND driver */ | ||
96 | }; | ||
97 | |||
98 | static struct platform_device igep3_onenand_device = { | ||
99 | .name = "omap2-onenand", | ||
100 | .id = -1, | ||
101 | .dev = { | ||
102 | .platform_data = &igep3_onenand_pdata, | ||
103 | }, | ||
104 | }; | ||
105 | |||
106 | void __init igep3_flash_init(void) | ||
107 | { | ||
108 | u8 cs = 0; | ||
109 | u8 onenandcs = GPMC_CS_NUM + 1; | ||
110 | |||
111 | for (cs = 0; cs < GPMC_CS_NUM; cs++) { | ||
112 | u32 ret; | ||
113 | ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1); | ||
114 | |||
115 | /* Check if NAND/oneNAND is configured */ | ||
116 | if ((ret & 0xC00) == 0x800) | ||
117 | /* NAND found */ | ||
118 | pr_err("IGEP3: Unsupported NAND found\n"); | ||
119 | else { | ||
120 | ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7); | ||
121 | |||
122 | if ((ret & 0x3F) == (ONENAND_MAP >> 24)) | ||
123 | /* OneNAND found */ | ||
124 | onenandcs = cs; | ||
125 | } | ||
126 | } | ||
127 | |||
128 | if (onenandcs > GPMC_CS_NUM) { | ||
129 | pr_err("IGEP3: Unable to find configuration in GPMC\n"); | ||
130 | return; | ||
131 | } | ||
132 | |||
133 | igep3_onenand_pdata.cs = onenandcs; | ||
134 | |||
135 | if (platform_device_register(&igep3_onenand_device) < 0) | ||
136 | pr_err("IGEP3: Unable to register OneNAND device\n"); | ||
137 | } | ||
138 | |||
139 | #else | ||
140 | void __init igep3_flash_init(void) {} | ||
141 | #endif | ||
142 | |||
143 | static struct regulator_consumer_supply igep3_vmmc1_supply = { | ||
144 | .supply = "vmmc", | ||
145 | }; | ||
146 | |||
147 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | ||
148 | static struct regulator_init_data igep3_vmmc1 = { | ||
149 | .constraints = { | ||
150 | .min_uV = 1850000, | ||
151 | .max_uV = 3150000, | ||
152 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
153 | | REGULATOR_MODE_STANDBY, | ||
154 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
155 | | REGULATOR_CHANGE_MODE | ||
156 | | REGULATOR_CHANGE_STATUS, | ||
157 | }, | ||
158 | .num_consumer_supplies = 1, | ||
159 | .consumer_supplies = &igep3_vmmc1_supply, | ||
160 | }; | ||
161 | |||
162 | static struct omap2_hsmmc_info mmc[] = { | ||
163 | [0] = { | ||
164 | .mmc = 1, | ||
165 | .caps = MMC_CAP_4_BIT_DATA, | ||
166 | .gpio_cd = -EINVAL, | ||
167 | .gpio_wp = -EINVAL, | ||
168 | }, | ||
169 | #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE) | ||
170 | [1] = { | ||
171 | .mmc = 2, | ||
172 | .caps = MMC_CAP_4_BIT_DATA, | ||
173 | .gpio_cd = -EINVAL, | ||
174 | .gpio_wp = -EINVAL, | ||
175 | }, | ||
176 | #endif | ||
177 | {} /* Terminator */ | ||
178 | }; | ||
179 | |||
180 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | ||
181 | #include <linux/leds.h> | ||
182 | |||
183 | static struct gpio_led igep3_gpio_leds[] = { | ||
184 | [0] = { | ||
185 | .name = "gpio-led:red:d0", | ||
186 | .gpio = IGEP3_GPIO_LED0_RED, | ||
187 | .default_trigger = "default-off" | ||
188 | }, | ||
189 | [1] = { | ||
190 | .name = "gpio-led:green:d0", | ||
191 | .gpio = IGEP3_GPIO_LED0_GREEN, | ||
192 | .default_trigger = "default-off", | ||
193 | }, | ||
194 | [2] = { | ||
195 | .name = "gpio-led:red:d1", | ||
196 | .gpio = IGEP3_GPIO_LED1_RED, | ||
197 | .default_trigger = "default-off", | ||
198 | }, | ||
199 | [3] = { | ||
200 | .name = "gpio-led:green:d1", | ||
201 | .default_trigger = "heartbeat", | ||
202 | .gpio = -EINVAL, /* gets replaced */ | ||
203 | }, | ||
204 | }; | ||
205 | |||
206 | static struct gpio_led_platform_data igep3_led_pdata = { | ||
207 | .leds = igep3_gpio_leds, | ||
208 | .num_leds = ARRAY_SIZE(igep3_gpio_leds), | ||
209 | }; | ||
210 | |||
211 | static struct platform_device igep3_led_device = { | ||
212 | .name = "leds-gpio", | ||
213 | .id = -1, | ||
214 | .dev = { | ||
215 | .platform_data = &igep3_led_pdata, | ||
216 | }, | ||
217 | }; | ||
218 | |||
219 | static void __init igep3_leds_init(void) | ||
220 | { | ||
221 | platform_device_register(&igep3_led_device); | ||
222 | } | ||
223 | |||
224 | #else | ||
225 | static inline void igep3_leds_init(void) | ||
226 | { | ||
227 | if ((gpio_request(IGEP3_GPIO_LED0_RED, "gpio-led:red:d0") == 0) && | ||
228 | (gpio_direction_output(IGEP3_GPIO_LED0_RED, 1) == 0)) { | ||
229 | gpio_export(IGEP3_GPIO_LED0_RED, 0); | ||
230 | gpio_set_value(IGEP3_GPIO_LED0_RED, 1); | ||
231 | } else | ||
232 | pr_warning("IGEP3: Could not obtain gpio GPIO_LED0_RED\n"); | ||
233 | |||
234 | if ((gpio_request(IGEP3_GPIO_LED0_GREEN, "gpio-led:green:d0") == 0) && | ||
235 | (gpio_direction_output(IGEP3_GPIO_LED0_GREEN, 1) == 0)) { | ||
236 | gpio_export(IGEP3_GPIO_LED0_GREEN, 0); | ||
237 | gpio_set_value(IGEP3_GPIO_LED0_GREEN, 1); | ||
238 | } else | ||
239 | pr_warning("IGEP3: Could not obtain gpio GPIO_LED0_GREEN\n"); | ||
240 | |||
241 | if ((gpio_request(IGEP3_GPIO_LED1_RED, "gpio-led:red:d1") == 0) && | ||
242 | (gpio_direction_output(IGEP3_GPIO_LED1_RED, 1) == 0)) { | ||
243 | gpio_export(IGEP3_GPIO_LED1_RED, 0); | ||
244 | gpio_set_value(IGEP3_GPIO_LED1_RED, 1); | ||
245 | } else | ||
246 | pr_warning("IGEP3: Could not obtain gpio GPIO_LED1_RED\n"); | ||
247 | } | ||
248 | #endif | ||
249 | |||
250 | static int igep3_twl4030_gpio_setup(struct device *dev, | ||
251 | unsigned gpio, unsigned ngpio) | ||
252 | { | ||
253 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | ||
254 | mmc[0].gpio_cd = gpio + 0; | ||
255 | omap2_hsmmc_init(mmc); | ||
256 | |||
257 | /* | ||
258 | * link regulators to MMC adapters ... we "know" the | ||
259 | * regulators will be set up only *after* we return. | ||
260 | */ | ||
261 | igep3_vmmc1_supply.dev = mmc[0].dev; | ||
262 | |||
263 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ | ||
264 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) | ||
265 | if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) | ||
266 | && (gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 1) == 0)) { | ||
267 | gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0); | ||
268 | gpio_set_value(gpio + TWL4030_GPIO_MAX + 1, 0); | ||
269 | } else | ||
270 | pr_warning("IGEP3: Could not obtain gpio GPIO_LED1_GREEN\n"); | ||
271 | #else | ||
272 | igep3_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1; | ||
273 | #endif | ||
274 | |||
275 | return 0; | ||
276 | }; | ||
277 | |||
278 | static struct twl4030_gpio_platform_data igep3_twl4030_gpio_pdata = { | ||
279 | .gpio_base = OMAP_MAX_GPIO_LINES, | ||
280 | .irq_base = TWL4030_GPIO_IRQ_BASE, | ||
281 | .irq_end = TWL4030_GPIO_IRQ_END, | ||
282 | .use_leds = true, | ||
283 | .setup = igep3_twl4030_gpio_setup, | ||
284 | }; | ||
285 | |||
286 | static struct twl4030_usb_data igep3_twl4030_usb_data = { | ||
287 | .usb_mode = T2_USB_MODE_ULPI, | ||
288 | }; | ||
289 | |||
290 | static void __init igep3_init_irq(void) | ||
291 | { | ||
292 | omap2_init_common_hw(m65kxxxxam_sdrc_params, m65kxxxxam_sdrc_params); | ||
293 | omap_init_irq(); | ||
294 | omap_gpio_init(); | ||
295 | } | ||
296 | |||
297 | static struct twl4030_platform_data igep3_twl4030_pdata = { | ||
298 | .irq_base = TWL4030_IRQ_BASE, | ||
299 | .irq_end = TWL4030_IRQ_END, | ||
300 | |||
301 | /* platform_data for children goes here */ | ||
302 | .usb = &igep3_twl4030_usb_data, | ||
303 | .gpio = &igep3_twl4030_gpio_pdata, | ||
304 | .vmmc1 = &igep3_vmmc1, | ||
305 | }; | ||
306 | |||
307 | static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = { | ||
308 | { | ||
309 | I2C_BOARD_INFO("twl4030", 0x48), | ||
310 | .flags = I2C_CLIENT_WAKE, | ||
311 | .irq = INT_34XX_SYS_NIRQ, | ||
312 | .platform_data = &igep3_twl4030_pdata, | ||
313 | }, | ||
314 | }; | ||
315 | |||
316 | static int __init igep3_i2c_init(void) | ||
317 | { | ||
318 | omap_register_i2c_bus(1, 2600, igep3_i2c_boardinfo, | ||
319 | ARRAY_SIZE(igep3_i2c_boardinfo)); | ||
320 | |||
321 | return 0; | ||
322 | } | ||
323 | |||
324 | static struct omap_musb_board_data musb_board_data = { | ||
325 | .interface_type = MUSB_INTERFACE_ULPI, | ||
326 | .mode = MUSB_OTG, | ||
327 | .power = 100, | ||
328 | }; | ||
329 | |||
330 | #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE) | ||
331 | |||
332 | static void __init igep3_wifi_bt_init(void) | ||
333 | { | ||
334 | /* Configure MUX values for W-LAN + Bluetooth GPIO's */ | ||
335 | omap_mux_init_gpio(IGEP3_GPIO_WIFI_NPD, OMAP_PIN_OUTPUT); | ||
336 | omap_mux_init_gpio(IGEP3_GPIO_WIFI_NRESET, OMAP_PIN_OUTPUT); | ||
337 | omap_mux_init_gpio(IGEP3_GPIO_BT_NRESET, OMAP_PIN_OUTPUT); | ||
338 | |||
339 | /* Set GPIO's for W-LAN + Bluetooth combo module */ | ||
340 | if ((gpio_request(IGEP3_GPIO_WIFI_NPD, "GPIO_WIFI_NPD") == 0) && | ||
341 | (gpio_direction_output(IGEP3_GPIO_WIFI_NPD, 1) == 0)) { | ||
342 | gpio_export(IGEP3_GPIO_WIFI_NPD, 0); | ||
343 | } else | ||
344 | pr_warning("IGEP3: Could not obtain gpio GPIO_WIFI_NPD\n"); | ||
345 | |||
346 | if ((gpio_request(IGEP3_GPIO_WIFI_NRESET, "GPIO_WIFI_NRESET") == 0) && | ||
347 | (gpio_direction_output(IGEP3_GPIO_WIFI_NRESET, 1) == 0)) { | ||
348 | gpio_export(IGEP3_GPIO_WIFI_NRESET, 0); | ||
349 | gpio_set_value(IGEP3_GPIO_WIFI_NRESET, 0); | ||
350 | udelay(10); | ||
351 | gpio_set_value(IGEP3_GPIO_WIFI_NRESET, 1); | ||
352 | } else | ||
353 | pr_warning("IGEP3: Could not obtain gpio GPIO_WIFI_NRESET\n"); | ||
354 | |||
355 | if ((gpio_request(IGEP3_GPIO_BT_NRESET, "GPIO_BT_NRESET") == 0) && | ||
356 | (gpio_direction_output(IGEP3_GPIO_BT_NRESET, 1) == 0)) { | ||
357 | gpio_export(IGEP3_GPIO_BT_NRESET, 0); | ||
358 | } else | ||
359 | pr_warning("IGEP3: Could not obtain gpio GPIO_BT_NRESET\n"); | ||
360 | } | ||
361 | #else | ||
362 | void __init igep3_wifi_bt_init(void) {} | ||
363 | #endif | ||
364 | |||
365 | #ifdef CONFIG_OMAP_MUX | ||
366 | static struct omap_board_mux board_mux[] __initdata = { | ||
367 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
368 | }; | ||
369 | #else | ||
370 | #define board_mux NULL | ||
371 | #endif | ||
372 | |||
373 | static void __init igep3_init(void) | ||
374 | { | ||
375 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
376 | |||
377 | /* Register I2C busses and drivers */ | ||
378 | igep3_i2c_init(); | ||
379 | |||
380 | omap_serial_init(); | ||
381 | usb_musb_init(&musb_board_data); | ||
382 | |||
383 | igep3_flash_init(); | ||
384 | igep3_leds_init(); | ||
385 | |||
386 | /* | ||
387 | * WLAN-BT combo module from MuRata wich has a Marvell WLAN | ||
388 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. | ||
389 | */ | ||
390 | igep3_wifi_bt_init(); | ||
391 | |||
392 | } | ||
393 | |||
394 | MACHINE_START(IGEP0030, "IGEP OMAP3 module") | ||
395 | .boot_params = 0x80000100, | ||
396 | .map_io = omap3_map_io, | ||
397 | .init_irq = igep3_init_irq, | ||
398 | .init_machine = igep3_init, | ||
399 | .timer = &omap_timer, | ||
400 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index f28fd77bceb3..001fd9713f39 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/i2c/twl.h> | 27 | #include <linux/i2c/twl.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/smsc911x.h> | 29 | #include <linux/smsc911x.h> |
30 | #include <linux/mmc/host.h> | ||
30 | 31 | ||
31 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
@@ -41,11 +42,12 @@ | |||
41 | #include <mach/board-zoom.h> | 42 | #include <mach/board-zoom.h> |
42 | 43 | ||
43 | #include <asm/delay.h> | 44 | #include <asm/delay.h> |
44 | #include <plat/control.h> | ||
45 | #include <plat/usb.h> | 45 | #include <plat/usb.h> |
46 | 46 | ||
47 | #include "board-flash.h" | ||
47 | #include "mux.h" | 48 | #include "mux.h" |
48 | #include "hsmmc.h" | 49 | #include "hsmmc.h" |
50 | #include "control.h" | ||
49 | 51 | ||
50 | #define LDP_SMSC911X_CS 1 | 52 | #define LDP_SMSC911X_CS 1 |
51 | #define LDP_SMSC911X_GPIO 152 | 53 | #define LDP_SMSC911X_GPIO 152 |
@@ -82,7 +84,7 @@ static struct platform_device ldp_smsc911x_device = { | |||
82 | }, | 84 | }, |
83 | }; | 85 | }; |
84 | 86 | ||
85 | static int board_keymap[] = { | 87 | static uint32_t board_keymap[] = { |
86 | KEY(0, 0, KEY_1), | 88 | KEY(0, 0, KEY_1), |
87 | KEY(1, 0, KEY_2), | 89 | KEY(1, 0, KEY_2), |
88 | KEY(2, 0, KEY_3), | 90 | KEY(2, 0, KEY_3), |
@@ -362,7 +364,7 @@ static int __init omap_i2c_init(void) | |||
362 | static struct omap2_hsmmc_info mmc[] __initdata = { | 364 | static struct omap2_hsmmc_info mmc[] __initdata = { |
363 | { | 365 | { |
364 | .mmc = 1, | 366 | .mmc = 1, |
365 | .wires = 4, | 367 | .caps = MMC_CAP_4_BIT_DATA, |
366 | .gpio_cd = -EINVAL, | 368 | .gpio_cd = -EINVAL, |
367 | .gpio_wp = -EINVAL, | 369 | .gpio_wp = -EINVAL, |
368 | }, | 370 | }, |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 3f7966873507..e823c7042ab3 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/usb/musb.h> | 22 | #include <linux/usb/musb.h> |
23 | #include <sound/tlv320aic3x.h> | ||
23 | 24 | ||
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
@@ -383,15 +384,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask) | |||
383 | omap_mmc_notify_cover_event(mmc_device, index, *openp); | 384 | omap_mmc_notify_cover_event(mmc_device, index, *openp); |
384 | } | 385 | } |
385 | 386 | ||
386 | void n8x0_mmc_slot1_cover_handler(void *arg, int closed_state) | ||
387 | { | ||
388 | if (mmc_device == NULL) | ||
389 | return; | ||
390 | |||
391 | slot1_cover_open = !closed_state; | ||
392 | omap_mmc_notify_cover_event(mmc_device, 0, closed_state); | ||
393 | } | ||
394 | |||
395 | static int n8x0_mmc_late_init(struct device *dev) | 387 | static int n8x0_mmc_late_init(struct device *dev) |
396 | { | 388 | { |
397 | int r, bit, *openp; | 389 | int r, bit, *openp; |
@@ -511,7 +503,7 @@ static struct omap_mmc_platform_data mmc1_data = { | |||
511 | 503 | ||
512 | static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC]; | 504 | static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC]; |
513 | 505 | ||
514 | void __init n8x0_mmc_init(void) | 506 | static void __init n8x0_mmc_init(void) |
515 | 507 | ||
516 | { | 508 | { |
517 | int err; | 509 | int err; |
@@ -560,11 +552,6 @@ void __init n8x0_mmc_init(void) | |||
560 | void __init n8x0_mmc_init(void) | 552 | void __init n8x0_mmc_init(void) |
561 | { | 553 | { |
562 | } | 554 | } |
563 | |||
564 | void n8x0_mmc_slot1_cover_handler(void *arg, int state) | ||
565 | { | ||
566 | } | ||
567 | |||
568 | #endif /* CONFIG_MMC_OMAP */ | 555 | #endif /* CONFIG_MMC_OMAP */ |
569 | 556 | ||
570 | #ifdef CONFIG_MENELAUS | 557 | #ifdef CONFIG_MENELAUS |
@@ -614,29 +601,35 @@ static int n8x0_menelaus_late_init(struct device *dev) | |||
614 | return 0; | 601 | return 0; |
615 | } | 602 | } |
616 | 603 | ||
617 | static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] = { | 604 | #else |
605 | static int n8x0_menelaus_late_init(struct device *dev) | ||
606 | { | ||
607 | return 0; | ||
608 | } | ||
609 | #endif | ||
610 | |||
611 | static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = { | ||
612 | .late_init = n8x0_menelaus_late_init, | ||
613 | }; | ||
614 | |||
615 | static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = { | ||
618 | { | 616 | { |
619 | I2C_BOARD_INFO("menelaus", 0x72), | 617 | I2C_BOARD_INFO("menelaus", 0x72), |
620 | .irq = INT_24XX_SYS_NIRQ, | 618 | .irq = INT_24XX_SYS_NIRQ, |
619 | .platform_data = &n8x0_menelaus_platform_data, | ||
621 | }, | 620 | }, |
622 | }; | 621 | }; |
623 | 622 | ||
624 | static struct menelaus_platform_data n8x0_menelaus_platform_data = { | 623 | static struct aic3x_pdata n810_aic33_data __initdata = { |
625 | .late_init = n8x0_menelaus_late_init, | 624 | .gpio_reset = 118, |
626 | }; | 625 | }; |
627 | 626 | ||
628 | static void __init n8x0_menelaus_init(void) | 627 | static struct i2c_board_info n810_i2c_board_info_2[] __initdata = { |
629 | { | 628 | { |
630 | n8x0_i2c_board_info_1[0].platform_data = &n8x0_menelaus_platform_data; | 629 | I2C_BOARD_INFO("tlv320aic3x", 0x18), |
631 | omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1, | 630 | .platform_data = &n810_aic33_data, |
632 | ARRAY_SIZE(n8x0_i2c_board_info_1)); | 631 | }, |
633 | } | 632 | }; |
634 | |||
635 | #else | ||
636 | static inline void __init n8x0_menelaus_init(void) | ||
637 | { | ||
638 | } | ||
639 | #endif | ||
640 | 633 | ||
641 | static void __init n8x0_map_io(void) | 634 | static void __init n8x0_map_io(void) |
642 | { | 635 | { |
@@ -653,6 +646,11 @@ static void __init n8x0_init_irq(void) | |||
653 | 646 | ||
654 | #ifdef CONFIG_OMAP_MUX | 647 | #ifdef CONFIG_OMAP_MUX |
655 | static struct omap_board_mux board_mux[] __initdata = { | 648 | static struct omap_board_mux board_mux[] __initdata = { |
649 | /* I2S codec port pins for McBSP block */ | ||
650 | OMAP2420_MUX(EAC_AC_SCLK, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), | ||
651 | OMAP2420_MUX(EAC_AC_FS, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), | ||
652 | OMAP2420_MUX(EAC_AC_DIN, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), | ||
653 | OMAP2420_MUX(EAC_AC_DOUT, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT), | ||
656 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 654 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
657 | }; | 655 | }; |
658 | #else | 656 | #else |
@@ -665,9 +663,14 @@ static void __init n8x0_init_machine(void) | |||
665 | /* FIXME: add n810 spi devices */ | 663 | /* FIXME: add n810 spi devices */ |
666 | spi_register_board_info(n800_spi_board_info, | 664 | spi_register_board_info(n800_spi_board_info, |
667 | ARRAY_SIZE(n800_spi_board_info)); | 665 | ARRAY_SIZE(n800_spi_board_info)); |
666 | omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1, | ||
667 | ARRAY_SIZE(n8x0_i2c_board_info_1)); | ||
668 | omap_register_i2c_bus(2, 400, NULL, 0); | ||
669 | if (machine_is_nokia_n810()) | ||
670 | i2c_register_board_info(2, n810_i2c_board_info_2, | ||
671 | ARRAY_SIZE(n810_i2c_board_info_2)); | ||
668 | 672 | ||
669 | omap_serial_init(); | 673 | omap_serial_init(); |
670 | n8x0_menelaus_init(); | ||
671 | n8x0_onenand_init(); | 674 | n8x0_onenand_init(); |
672 | n8x0_mmc_init(); | 675 | n8x0_mmc_init(); |
673 | n8x0_usb_init(); | 676 | n8x0_usb_init(); |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 9d9f5b881ee8..14f42240ae79 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/mtd/mtd.h> | 27 | #include <linux/mtd/mtd.h> |
28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
29 | #include <linux/mtd/nand.h> | 29 | #include <linux/mtd/nand.h> |
30 | #include <linux/mmc/host.h> | ||
30 | 31 | ||
31 | #include <linux/regulator/machine.h> | 32 | #include <linux/regulator/machine.h> |
32 | #include <linux/i2c/twl.h> | 33 | #include <linux/i2c/twl.h> |
@@ -43,13 +44,100 @@ | |||
43 | #include <plat/gpmc.h> | 44 | #include <plat/gpmc.h> |
44 | #include <plat/nand.h> | 45 | #include <plat/nand.h> |
45 | #include <plat/usb.h> | 46 | #include <plat/usb.h> |
46 | #include <plat/timer-gp.h> | ||
47 | 47 | ||
48 | #include "mux.h" | 48 | #include "mux.h" |
49 | #include "hsmmc.h" | 49 | #include "hsmmc.h" |
50 | #include "timer-gp.h" | ||
50 | 51 | ||
51 | #define NAND_BLOCK_SIZE SZ_128K | 52 | #define NAND_BLOCK_SIZE SZ_128K |
52 | 53 | ||
54 | /* | ||
55 | * OMAP3 Beagle revision | ||
56 | * Run time detection of Beagle revision is done by reading GPIO. | ||
57 | * GPIO ID - | ||
58 | * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1 | ||
59 | * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0 | ||
60 | * C4 = GPIO173, GPIO172, GPIO171: 1 0 1 | ||
61 | * XM = GPIO173, GPIO172, GPIO171: 0 0 0 | ||
62 | */ | ||
63 | enum { | ||
64 | OMAP3BEAGLE_BOARD_UNKN = 0, | ||
65 | OMAP3BEAGLE_BOARD_AXBX, | ||
66 | OMAP3BEAGLE_BOARD_C1_3, | ||
67 | OMAP3BEAGLE_BOARD_C4, | ||
68 | OMAP3BEAGLE_BOARD_XM, | ||
69 | }; | ||
70 | |||
71 | static u8 omap3_beagle_version; | ||
72 | |||
73 | static u8 omap3_beagle_get_rev(void) | ||
74 | { | ||
75 | return omap3_beagle_version; | ||
76 | } | ||
77 | |||
78 | static void __init omap3_beagle_init_rev(void) | ||
79 | { | ||
80 | int ret; | ||
81 | u16 beagle_rev = 0; | ||
82 | |||
83 | omap_mux_init_gpio(171, OMAP_PIN_INPUT_PULLUP); | ||
84 | omap_mux_init_gpio(172, OMAP_PIN_INPUT_PULLUP); | ||
85 | omap_mux_init_gpio(173, OMAP_PIN_INPUT_PULLUP); | ||
86 | |||
87 | ret = gpio_request(171, "rev_id_0"); | ||
88 | if (ret < 0) | ||
89 | goto fail0; | ||
90 | |||
91 | ret = gpio_request(172, "rev_id_1"); | ||
92 | if (ret < 0) | ||
93 | goto fail1; | ||
94 | |||
95 | ret = gpio_request(173, "rev_id_2"); | ||
96 | if (ret < 0) | ||
97 | goto fail2; | ||
98 | |||
99 | gpio_direction_input(171); | ||
100 | gpio_direction_input(172); | ||
101 | gpio_direction_input(173); | ||
102 | |||
103 | beagle_rev = gpio_get_value(171) | (gpio_get_value(172) << 1) | ||
104 | | (gpio_get_value(173) << 2); | ||
105 | |||
106 | switch (beagle_rev) { | ||
107 | case 7: | ||
108 | printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n"); | ||
109 | omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX; | ||
110 | break; | ||
111 | case 6: | ||
112 | printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n"); | ||
113 | omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3; | ||
114 | break; | ||
115 | case 5: | ||
116 | printk(KERN_INFO "OMAP3 Beagle Rev: C4\n"); | ||
117 | omap3_beagle_version = OMAP3BEAGLE_BOARD_C4; | ||
118 | break; | ||
119 | case 0: | ||
120 | printk(KERN_INFO "OMAP3 Beagle Rev: xM\n"); | ||
121 | omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; | ||
122 | break; | ||
123 | default: | ||
124 | printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev); | ||
125 | omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN; | ||
126 | } | ||
127 | |||
128 | return; | ||
129 | |||
130 | fail2: | ||
131 | gpio_free(172); | ||
132 | fail1: | ||
133 | gpio_free(171); | ||
134 | fail0: | ||
135 | printk(KERN_ERR "Unable to get revision detection GPIO pins\n"); | ||
136 | omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN; | ||
137 | |||
138 | return; | ||
139 | } | ||
140 | |||
53 | static struct mtd_partition omap3beagle_nand_partitions[] = { | 141 | static struct mtd_partition omap3beagle_nand_partitions[] = { |
54 | /* All the partition sizes are listed in terms of NAND block size */ | 142 | /* All the partition sizes are listed in terms of NAND block size */ |
55 | { | 143 | { |
@@ -166,7 +254,7 @@ static void __init beagle_display_init(void) | |||
166 | static struct omap2_hsmmc_info mmc[] = { | 254 | static struct omap2_hsmmc_info mmc[] = { |
167 | { | 255 | { |
168 | .mmc = 1, | 256 | .mmc = 1, |
169 | .wires = 8, | 257 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
170 | .gpio_wp = 29, | 258 | .gpio_wp = 29, |
171 | }, | 259 | }, |
172 | {} /* Terminator */ | 260 | {} /* Terminator */ |
@@ -185,7 +273,10 @@ static struct gpio_led gpio_leds[]; | |||
185 | static int beagle_twl_gpio_setup(struct device *dev, | 273 | static int beagle_twl_gpio_setup(struct device *dev, |
186 | unsigned gpio, unsigned ngpio) | 274 | unsigned gpio, unsigned ngpio) |
187 | { | 275 | { |
188 | if (system_rev >= 0x20 && system_rev <= 0x34301000) { | 276 | if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { |
277 | mmc[0].gpio_wp = -EINVAL; | ||
278 | } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || | ||
279 | (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) { | ||
189 | omap_mux_init_gpio(23, OMAP_PIN_INPUT); | 280 | omap_mux_init_gpio(23, OMAP_PIN_INPUT); |
190 | mmc[0].gpio_wp = 23; | 281 | mmc[0].gpio_wp = 23; |
191 | } else { | 282 | } else { |
@@ -322,13 +413,19 @@ static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { | |||
322 | }, | 413 | }, |
323 | }; | 414 | }; |
324 | 415 | ||
416 | static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { | ||
417 | { | ||
418 | I2C_BOARD_INFO("eeprom", 0x50), | ||
419 | }, | ||
420 | }; | ||
421 | |||
325 | static int __init omap3_beagle_i2c_init(void) | 422 | static int __init omap3_beagle_i2c_init(void) |
326 | { | 423 | { |
327 | omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, | 424 | omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, |
328 | ARRAY_SIZE(beagle_i2c_boardinfo)); | 425 | ARRAY_SIZE(beagle_i2c_boardinfo)); |
329 | /* Bus 3 is attached to the DVI port where devices like the pico DLP | 426 | /* Bus 3 is attached to the DVI port where devices like the pico DLP |
330 | * projector don't work reliably with 400kHz */ | 427 | * projector don't work reliably with 400kHz */ |
331 | omap_register_i2c_bus(3, 100, NULL, 0); | 428 | omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); |
332 | return 0; | 429 | return 0; |
333 | } | 430 | } |
334 | 431 | ||
@@ -464,6 +561,7 @@ static struct omap_musb_board_data musb_board_data = { | |||
464 | static void __init omap3_beagle_init(void) | 561 | static void __init omap3_beagle_init(void) |
465 | { | 562 | { |
466 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 563 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
564 | omap3_beagle_init_rev(); | ||
467 | omap3_beagle_i2c_init(); | 565 | omap3_beagle_i2c_init(); |
468 | platform_add_devices(omap3_beagle_devices, | 566 | platform_add_devices(omap3_beagle_devices, |
469 | ARRAY_SIZE(omap3_beagle_devices)); | 567 | ARRAY_SIZE(omap3_beagle_devices)); |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 8936e4fba334..b04365c6bb10 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/smsc911x.h> | 31 | #include <linux/smsc911x.h> |
32 | 32 | ||
33 | #include <linux/regulator/machine.h> | 33 | #include <linux/regulator/machine.h> |
34 | #include <linux/mmc/host.h> | ||
34 | 35 | ||
35 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
@@ -370,7 +371,7 @@ static struct regulator_init_data omap3evm_vsim = { | |||
370 | static struct omap2_hsmmc_info mmc[] = { | 371 | static struct omap2_hsmmc_info mmc[] = { |
371 | { | 372 | { |
372 | .mmc = 1, | 373 | .mmc = 1, |
373 | .wires = 4, | 374 | .caps = MMC_CAP_4_BIT_DATA, |
374 | .gpio_cd = -EINVAL, | 375 | .gpio_cd = -EINVAL, |
375 | .gpio_wp = 63, | 376 | .gpio_wp = 63, |
376 | }, | 377 | }, |
@@ -446,7 +447,7 @@ static struct twl4030_usb_data omap3evm_usb_data = { | |||
446 | .usb_mode = T2_USB_MODE_ULPI, | 447 | .usb_mode = T2_USB_MODE_ULPI, |
447 | }; | 448 | }; |
448 | 449 | ||
449 | static int board_keymap[] = { | 450 | static uint32_t board_keymap[] = { |
450 | KEY(0, 0, KEY_LEFT), | 451 | KEY(0, 0, KEY_LEFT), |
451 | KEY(0, 1, KEY_DOWN), | 452 | KEY(0, 1, KEY_DOWN), |
452 | KEY(0, 2, KEY_ENTER), | 453 | KEY(0, 2, KEY_ENTER), |
@@ -584,7 +585,7 @@ static int ads7846_get_pendown_state(void) | |||
584 | return !gpio_get_value(OMAP3_EVM_TS_GPIO); | 585 | return !gpio_get_value(OMAP3_EVM_TS_GPIO); |
585 | } | 586 | } |
586 | 587 | ||
587 | struct ads7846_platform_data ads7846_config = { | 588 | static struct ads7846_platform_data ads7846_config = { |
588 | .x_max = 0x0fff, | 589 | .x_max = 0x0fff, |
589 | .y_max = 0x0fff, | 590 | .y_max = 0x0fff, |
590 | .x_plate_ohms = 180, | 591 | .x_plate_ohms = 180, |
@@ -603,7 +604,7 @@ static struct omap2_mcspi_device_config ads7846_mcspi_config = { | |||
603 | .single_channel = 1, /* 0: slave, 1: master */ | 604 | .single_channel = 1, /* 0: slave, 1: master */ |
604 | }; | 605 | }; |
605 | 606 | ||
606 | struct spi_board_info omap3evm_spi_board_info[] = { | 607 | static struct spi_board_info omap3evm_spi_board_info[] = { |
607 | [0] = { | 608 | [0] = { |
608 | .modalias = "ads7846", | 609 | .modalias = "ads7846", |
609 | .bus_num = 1, | 610 | .bus_num = 1, |
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c new file mode 100644 index 000000000000..5f7d2c1e7ef5 --- /dev/null +++ b/arch/arm/mach-omap2/board-omap3logic.c | |||
@@ -0,0 +1,241 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/board-omap3logic.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Li-Pro.Net | ||
5 | * Stephan Linz <linz@li-pro.net> | ||
6 | * | ||
7 | * Copyright (C) 2010 Logic Product Development, Inc. | ||
8 | * Peter Barada <peter.barada@logicpd.com> | ||
9 | * | ||
10 | * Modified from Beagle, EVM, and RX51 | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/delay.h> | ||
21 | #include <linux/err.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/gpio.h> | ||
25 | |||
26 | #include <linux/regulator/machine.h> | ||
27 | |||
28 | #include <linux/i2c/twl.h> | ||
29 | #include <linux/mmc/host.h> | ||
30 | |||
31 | #include <mach/hardware.h> | ||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <asm/mach/map.h> | ||
35 | |||
36 | #include "mux.h" | ||
37 | #include "hsmmc.h" | ||
38 | #include "timer-gp.h" | ||
39 | #include "control.h" | ||
40 | |||
41 | #include <plat/mux.h> | ||
42 | #include <plat/board.h> | ||
43 | #include <plat/common.h> | ||
44 | #include <plat/gpmc-smsc911x.h> | ||
45 | #include <plat/gpmc.h> | ||
46 | #include <plat/sdrc.h> | ||
47 | |||
48 | #define OMAP3LOGIC_SMSC911X_CS 1 | ||
49 | |||
50 | #define OMAP3530_LV_SOM_MMC_GPIO_CD 110 | ||
51 | #define OMAP3530_LV_SOM_MMC_GPIO_WP 126 | ||
52 | #define OMAP3530_LV_SOM_SMSC911X_GPIO_IRQ 152 | ||
53 | |||
54 | #define OMAP3_TORPEDO_MMC_GPIO_CD 127 | ||
55 | #define OMAP3_TORPEDO_SMSC911X_GPIO_IRQ 129 | ||
56 | |||
57 | static struct regulator_consumer_supply omap3logic_vmmc1_supply = { | ||
58 | .supply = "vmmc", | ||
59 | }; | ||
60 | |||
61 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | ||
62 | static struct regulator_init_data omap3logic_vmmc1 = { | ||
63 | .constraints = { | ||
64 | .name = "VMMC1", | ||
65 | .min_uV = 1850000, | ||
66 | .max_uV = 3150000, | ||
67 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
68 | | REGULATOR_MODE_STANDBY, | ||
69 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
70 | | REGULATOR_CHANGE_MODE | ||
71 | | REGULATOR_CHANGE_STATUS, | ||
72 | }, | ||
73 | .num_consumer_supplies = 1, | ||
74 | .consumer_supplies = &omap3logic_vmmc1_supply, | ||
75 | }; | ||
76 | |||
77 | static struct twl4030_gpio_platform_data omap3logic_gpio_data = { | ||
78 | .gpio_base = OMAP_MAX_GPIO_LINES, | ||
79 | .irq_base = TWL4030_GPIO_IRQ_BASE, | ||
80 | .irq_end = TWL4030_GPIO_IRQ_END, | ||
81 | .use_leds = true, | ||
82 | .pullups = BIT(1), | ||
83 | .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | ||
84 | | BIT(13) | BIT(15) | BIT(16) | BIT(17), | ||
85 | }; | ||
86 | |||
87 | static struct twl4030_platform_data omap3logic_twldata = { | ||
88 | .irq_base = TWL4030_IRQ_BASE, | ||
89 | .irq_end = TWL4030_IRQ_END, | ||
90 | |||
91 | /* platform_data for children goes here */ | ||
92 | .gpio = &omap3logic_gpio_data, | ||
93 | .vmmc1 = &omap3logic_vmmc1, | ||
94 | }; | ||
95 | |||
96 | static struct i2c_board_info __initdata omap3logic_i2c_boardinfo[] = { | ||
97 | { | ||
98 | I2C_BOARD_INFO("twl4030", 0x48), | ||
99 | .flags = I2C_CLIENT_WAKE, | ||
100 | .irq = INT_34XX_SYS_NIRQ, | ||
101 | .platform_data = &omap3logic_twldata, | ||
102 | }, | ||
103 | }; | ||
104 | |||
105 | static int __init omap3logic_i2c_init(void) | ||
106 | { | ||
107 | omap_register_i2c_bus(1, 2600, omap3logic_i2c_boardinfo, | ||
108 | ARRAY_SIZE(omap3logic_i2c_boardinfo)); | ||
109 | return 0; | ||
110 | } | ||
111 | |||
112 | static struct omap2_hsmmc_info __initdata board_mmc_info[] = { | ||
113 | { | ||
114 | .name = "external", | ||
115 | .mmc = 1, | ||
116 | .caps = MMC_CAP_4_BIT_DATA, | ||
117 | .gpio_cd = -EINVAL, | ||
118 | .gpio_wp = -EINVAL, | ||
119 | }, | ||
120 | {} /* Terminator */ | ||
121 | }; | ||
122 | |||
123 | static void __init board_mmc_init(void) | ||
124 | { | ||
125 | if (machine_is_omap3530_lv_som()) { | ||
126 | /* OMAP3530 LV SOM board */ | ||
127 | board_mmc_info[0].gpio_cd = OMAP3530_LV_SOM_MMC_GPIO_CD; | ||
128 | board_mmc_info[0].gpio_wp = OMAP3530_LV_SOM_MMC_GPIO_WP; | ||
129 | omap_mux_init_signal("gpio_110", OMAP_PIN_OUTPUT); | ||
130 | omap_mux_init_signal("gpio_126", OMAP_PIN_OUTPUT); | ||
131 | } else if (machine_is_omap3_torpedo()) { | ||
132 | /* OMAP3 Torpedo board */ | ||
133 | board_mmc_info[0].gpio_cd = OMAP3_TORPEDO_MMC_GPIO_CD; | ||
134 | omap_mux_init_signal("gpio_127", OMAP_PIN_OUTPUT); | ||
135 | } else { | ||
136 | /* unsupported board */ | ||
137 | printk(KERN_ERR "%s(): unknown machine type\n", __func__); | ||
138 | return; | ||
139 | } | ||
140 | |||
141 | omap2_hsmmc_init(board_mmc_info); | ||
142 | /* link regulators to MMC adapters */ | ||
143 | omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev; | ||
144 | } | ||
145 | |||
146 | static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = { | ||
147 | .cs = OMAP3LOGIC_SMSC911X_CS, | ||
148 | .gpio_irq = -EINVAL, | ||
149 | .gpio_reset = -EINVAL, | ||
150 | .flags = IORESOURCE_IRQ_LOWLEVEL, | ||
151 | }; | ||
152 | |||
153 | /* TODO/FIXME (comment by Peter Barada, LogicPD): | ||
154 | * Fix the PBIAS voltage for Torpedo MMC1 pins that | ||
155 | * are used for other needs (IRQs, etc). */ | ||
156 | static void omap3torpedo_fix_pbias_voltage(void) | ||
157 | { | ||
158 | u16 control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE; | ||
159 | u32 reg; | ||
160 | |||
161 | if (machine_is_omap3_torpedo()) | ||
162 | { | ||
163 | /* Set the bias for the pin */ | ||
164 | reg = omap_ctrl_readl(control_pbias_offset); | ||
165 | |||
166 | reg &= ~OMAP343X_PBIASLITEPWRDNZ1; | ||
167 | omap_ctrl_writel(reg, control_pbias_offset); | ||
168 | |||
169 | /* 100ms delay required for PBIAS configuration */ | ||
170 | msleep(100); | ||
171 | |||
172 | reg |= OMAP343X_PBIASLITEVMODE1; | ||
173 | reg |= OMAP343X_PBIASLITEPWRDNZ1; | ||
174 | omap_ctrl_writel(reg | 0x300, control_pbias_offset); | ||
175 | } | ||
176 | } | ||
177 | |||
178 | static inline void __init board_smsc911x_init(void) | ||
179 | { | ||
180 | if (machine_is_omap3530_lv_som()) { | ||
181 | /* OMAP3530 LV SOM board */ | ||
182 | board_smsc911x_data.gpio_irq = | ||
183 | OMAP3530_LV_SOM_SMSC911X_GPIO_IRQ; | ||
184 | omap_mux_init_signal("gpio_152", OMAP_PIN_INPUT); | ||
185 | } else if (machine_is_omap3_torpedo()) { | ||
186 | /* OMAP3 Torpedo board */ | ||
187 | board_smsc911x_data.gpio_irq = OMAP3_TORPEDO_SMSC911X_GPIO_IRQ; | ||
188 | omap_mux_init_signal("gpio_129", OMAP_PIN_INPUT); | ||
189 | } else { | ||
190 | /* unsupported board */ | ||
191 | printk(KERN_ERR "%s(): unknown machine type\n", __func__); | ||
192 | return; | ||
193 | } | ||
194 | |||
195 | gpmc_smsc911x_init(&board_smsc911x_data); | ||
196 | } | ||
197 | |||
198 | static void __init omap3logic_init_irq(void) | ||
199 | { | ||
200 | omap2_init_common_hw(NULL, NULL); | ||
201 | omap_init_irq(); | ||
202 | omap_gpio_init(); | ||
203 | } | ||
204 | |||
205 | #ifdef CONFIG_OMAP_MUX | ||
206 | static struct omap_board_mux board_mux[] __initdata = { | ||
207 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
208 | }; | ||
209 | #else | ||
210 | #define board_mux NULL | ||
211 | #endif | ||
212 | |||
213 | static void __init omap3logic_init(void) | ||
214 | { | ||
215 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
216 | omap3torpedo_fix_pbias_voltage(); | ||
217 | omap3logic_i2c_init(); | ||
218 | omap_serial_init(); | ||
219 | board_mmc_init(); | ||
220 | board_smsc911x_init(); | ||
221 | |||
222 | /* Ensure SDRC pins are mux'd for self-refresh */ | ||
223 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); | ||
224 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); | ||
225 | } | ||
226 | |||
227 | MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") | ||
228 | .boot_params = 0x80000100, | ||
229 | .map_io = omap3_map_io, | ||
230 | .init_irq = omap3logic_init_irq, | ||
231 | .init_machine = omap3logic_init, | ||
232 | .timer = &omap_timer, | ||
233 | MACHINE_END | ||
234 | |||
235 | MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") | ||
236 | .boot_params = 0x80000100, | ||
237 | .map_io = omap3_map_io, | ||
238 | .init_irq = omap3logic_init_irq, | ||
239 | .init_machine = omap3logic_init, | ||
240 | .timer = &omap_timer, | ||
241 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 41d6f549070c..89ed1be2d62e 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -32,7 +32,9 @@ | |||
32 | #include <linux/input.h> | 32 | #include <linux/input.h> |
33 | #include <linux/input/matrix_keypad.h> | 33 | #include <linux/input/matrix_keypad.h> |
34 | #include <linux/gpio_keys.h> | 34 | #include <linux/gpio_keys.h> |
35 | #include <linux/mmc/host.h> | ||
35 | #include <linux/mmc/card.h> | 36 | #include <linux/mmc/card.h> |
37 | #include <linux/regulator/fixed.h> | ||
36 | 38 | ||
37 | #include <asm/mach-types.h> | 39 | #include <asm/mach-types.h> |
38 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
@@ -276,14 +278,14 @@ static void pandora_wl1251_init_card(struct mmc_card *card) | |||
276 | static struct omap2_hsmmc_info omap3pandora_mmc[] = { | 278 | static struct omap2_hsmmc_info omap3pandora_mmc[] = { |
277 | { | 279 | { |
278 | .mmc = 1, | 280 | .mmc = 1, |
279 | .wires = 4, | 281 | .caps = MMC_CAP_4_BIT_DATA, |
280 | .gpio_cd = -EINVAL, | 282 | .gpio_cd = -EINVAL, |
281 | .gpio_wp = 126, | 283 | .gpio_wp = 126, |
282 | .ext_clock = 0, | 284 | .ext_clock = 0, |
283 | }, | 285 | }, |
284 | { | 286 | { |
285 | .mmc = 2, | 287 | .mmc = 2, |
286 | .wires = 4, | 288 | .caps = MMC_CAP_4_BIT_DATA, |
287 | .gpio_cd = -EINVAL, | 289 | .gpio_cd = -EINVAL, |
288 | .gpio_wp = 127, | 290 | .gpio_wp = 127, |
289 | .ext_clock = 1, | 291 | .ext_clock = 1, |
@@ -291,7 +293,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = { | |||
291 | }, | 293 | }, |
292 | { | 294 | { |
293 | .mmc = 3, | 295 | .mmc = 3, |
294 | .wires = 4, | 296 | .caps = MMC_CAP_4_BIT_DATA, |
295 | .gpio_cd = -EINVAL, | 297 | .gpio_cd = -EINVAL, |
296 | .gpio_wp = -EINVAL, | 298 | .gpio_wp = -EINVAL, |
297 | .init_card = pandora_wl1251_init_card, | 299 | .init_card = pandora_wl1251_init_card, |
@@ -344,6 +346,9 @@ static struct regulator_consumer_supply pandora_vmmc1_supply = | |||
344 | static struct regulator_consumer_supply pandora_vmmc2_supply = | 346 | static struct regulator_consumer_supply pandora_vmmc2_supply = |
345 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | 347 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); |
346 | 348 | ||
349 | static struct regulator_consumer_supply pandora_vmmc3_supply = | ||
350 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2"); | ||
351 | |||
347 | static struct regulator_consumer_supply pandora_vdda_dac_supply = | 352 | static struct regulator_consumer_supply pandora_vdda_dac_supply = |
348 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); | 353 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
349 | 354 | ||
@@ -488,6 +493,33 @@ static struct regulator_init_data pandora_vsim = { | |||
488 | .consumer_supplies = &pandora_adac_supply, | 493 | .consumer_supplies = &pandora_adac_supply, |
489 | }; | 494 | }; |
490 | 495 | ||
496 | /* Fixed regulator internal to Wifi module */ | ||
497 | static struct regulator_init_data pandora_vmmc3 = { | ||
498 | .constraints = { | ||
499 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
500 | }, | ||
501 | .num_consumer_supplies = 1, | ||
502 | .consumer_supplies = &pandora_vmmc3_supply, | ||
503 | }; | ||
504 | |||
505 | static struct fixed_voltage_config pandora_vwlan = { | ||
506 | .supply_name = "vwlan", | ||
507 | .microvolts = 1800000, /* 1.8V */ | ||
508 | .gpio = PANDORA_WIFI_NRESET_GPIO, | ||
509 | .startup_delay = 50000, /* 50ms */ | ||
510 | .enable_high = 1, | ||
511 | .enabled_at_boot = 0, | ||
512 | .init_data = &pandora_vmmc3, | ||
513 | }; | ||
514 | |||
515 | static struct platform_device pandora_vwlan_device = { | ||
516 | .name = "reg-fixed-voltage", | ||
517 | .id = 1, | ||
518 | .dev = { | ||
519 | .platform_data = &pandora_vwlan, | ||
520 | }, | ||
521 | }; | ||
522 | |||
491 | static struct twl4030_usb_data omap3pandora_usb_data = { | 523 | static struct twl4030_usb_data omap3pandora_usb_data = { |
492 | .usb_mode = T2_USB_MODE_ULPI, | 524 | .usb_mode = T2_USB_MODE_ULPI, |
493 | }; | 525 | }; |
@@ -501,6 +533,8 @@ static struct twl4030_codec_data omap3pandora_codec_data = { | |||
501 | .audio = &omap3pandora_audio_data, | 533 | .audio = &omap3pandora_audio_data, |
502 | }; | 534 | }; |
503 | 535 | ||
536 | static struct twl4030_bci_platform_data pandora_bci_data; | ||
537 | |||
504 | static struct twl4030_platform_data omap3pandora_twldata = { | 538 | static struct twl4030_platform_data omap3pandora_twldata = { |
505 | .irq_base = TWL4030_IRQ_BASE, | 539 | .irq_base = TWL4030_IRQ_BASE, |
506 | .irq_end = TWL4030_IRQ_END, | 540 | .irq_end = TWL4030_IRQ_END, |
@@ -516,6 +550,7 @@ static struct twl4030_platform_data omap3pandora_twldata = { | |||
516 | .vaux4 = &pandora_vaux4, | 550 | .vaux4 = &pandora_vaux4, |
517 | .vsim = &pandora_vsim, | 551 | .vsim = &pandora_vsim, |
518 | .keypad = &pandora_kp_data, | 552 | .keypad = &pandora_kp_data, |
553 | .bci = &pandora_bci_data, | ||
519 | }; | 554 | }; |
520 | 555 | ||
521 | static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = { | 556 | static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = { |
@@ -644,19 +679,8 @@ static void pandora_wl1251_init(void) | |||
644 | if (pandora_wl1251_pdata.irq < 0) | 679 | if (pandora_wl1251_pdata.irq < 0) |
645 | goto fail_irq; | 680 | goto fail_irq; |
646 | 681 | ||
647 | ret = gpio_request(PANDORA_WIFI_NRESET_GPIO, "wl1251 nreset"); | ||
648 | if (ret < 0) | ||
649 | goto fail_irq; | ||
650 | |||
651 | /* start powered so that it probes with MMC subsystem */ | ||
652 | ret = gpio_direction_output(PANDORA_WIFI_NRESET_GPIO, 1); | ||
653 | if (ret < 0) | ||
654 | goto fail_nreset; | ||
655 | |||
656 | return; | 682 | return; |
657 | 683 | ||
658 | fail_nreset: | ||
659 | gpio_free(PANDORA_WIFI_NRESET_GPIO); | ||
660 | fail_irq: | 684 | fail_irq: |
661 | gpio_free(PANDORA_WIFI_IRQ_GPIO); | 685 | gpio_free(PANDORA_WIFI_IRQ_GPIO); |
662 | fail: | 686 | fail: |
@@ -668,6 +692,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { | |||
668 | &pandora_keys_gpio, | 692 | &pandora_keys_gpio, |
669 | &pandora_dss_device, | 693 | &pandora_dss_device, |
670 | &pandora_wl1251_data, | 694 | &pandora_wl1251_data, |
695 | &pandora_vwlan_device, | ||
671 | }; | 696 | }; |
672 | 697 | ||
673 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 698 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index bc5ac83bd4cf..f25272125413 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/regulator/machine.h> | 27 | #include <linux/regulator/machine.h> |
28 | #include <linux/i2c/twl.h> | 28 | #include <linux/i2c/twl.h> |
29 | #include <linux/mmc/host.h> | ||
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
31 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
@@ -38,7 +39,6 @@ | |||
38 | #include <plat/gpmc.h> | 39 | #include <plat/gpmc.h> |
39 | #include <plat/nand.h> | 40 | #include <plat/nand.h> |
40 | #include <plat/usb.h> | 41 | #include <plat/usb.h> |
41 | #include <plat/timer-gp.h> | ||
42 | #include <plat/display.h> | 42 | #include <plat/display.h> |
43 | 43 | ||
44 | #include <plat/mcspi.h> | 44 | #include <plat/mcspi.h> |
@@ -52,6 +52,7 @@ | |||
52 | #include "sdram-micron-mt46h32m32lf-6.h" | 52 | #include "sdram-micron-mt46h32m32lf-6.h" |
53 | #include "mux.h" | 53 | #include "mux.h" |
54 | #include "hsmmc.h" | 54 | #include "hsmmc.h" |
55 | #include "timer-gp.h" | ||
55 | 56 | ||
56 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | 57 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) |
57 | #define OMAP3STALKER_ETHR_START 0x2c000000 | 58 | #define OMAP3STALKER_ETHR_START 0x2c000000 |
@@ -275,7 +276,7 @@ static struct regulator_init_data omap3stalker_vsim = { | |||
275 | static struct omap2_hsmmc_info mmc[] = { | 276 | static struct omap2_hsmmc_info mmc[] = { |
276 | { | 277 | { |
277 | .mmc = 1, | 278 | .mmc = 1, |
278 | .wires = 4, | 279 | .caps = MMC_CAP_4_BIT_DATA, |
279 | .gpio_cd = -EINVAL, | 280 | .gpio_cd = -EINVAL, |
280 | .gpio_wp = 23, | 281 | .gpio_wp = 23, |
281 | }, | 282 | }, |
@@ -389,7 +390,7 @@ static struct twl4030_usb_data omap3stalker_usb_data = { | |||
389 | .usb_mode = T2_USB_MODE_ULPI, | 390 | .usb_mode = T2_USB_MODE_ULPI, |
390 | }; | 391 | }; |
391 | 392 | ||
392 | static int board_keymap[] = { | 393 | static uint32_t board_keymap[] = { |
393 | KEY(0, 0, KEY_LEFT), | 394 | KEY(0, 0, KEY_LEFT), |
394 | KEY(0, 1, KEY_DOWN), | 395 | KEY(0, 1, KEY_DOWN), |
395 | KEY(0, 2, KEY_ENTER), | 396 | KEY(0, 2, KEY_ENTER), |
@@ -564,7 +565,7 @@ static struct omap2_mcspi_device_config ads7846_mcspi_config = { | |||
564 | .single_channel = 1, /* 0: slave, 1: master */ | 565 | .single_channel = 1, /* 0: slave, 1: master */ |
565 | }; | 566 | }; |
566 | 567 | ||
567 | struct spi_board_info omap3stalker_spi_board_info[] = { | 568 | static struct spi_board_info omap3stalker_spi_board_info[] = { |
568 | [0] = { | 569 | [0] = { |
569 | .modalias = "ads7846", | 570 | .modalias = "ads7846", |
570 | .bus_num = 1, | 571 | .bus_num = 1, |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 0e99ce584dbf..41104bb8774c 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/mtd/mtd.h> | 27 | #include <linux/mtd/mtd.h> |
28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
29 | #include <linux/mtd/nand.h> | 29 | #include <linux/mtd/nand.h> |
30 | #include <linux/mmc/host.h> | ||
30 | 31 | ||
31 | #include <plat/mcspi.h> | 32 | #include <plat/mcspi.h> |
32 | #include <linux/spi/spi.h> | 33 | #include <linux/spi/spi.h> |
@@ -47,10 +48,10 @@ | |||
47 | #include <plat/gpmc.h> | 48 | #include <plat/gpmc.h> |
48 | #include <plat/nand.h> | 49 | #include <plat/nand.h> |
49 | #include <plat/usb.h> | 50 | #include <plat/usb.h> |
50 | #include <plat/timer-gp.h> | ||
51 | 51 | ||
52 | #include "mux.h" | 52 | #include "mux.h" |
53 | #include "hsmmc.h" | 53 | #include "hsmmc.h" |
54 | #include "timer-gp.h" | ||
54 | 55 | ||
55 | #include <asm/setup.h> | 56 | #include <asm/setup.h> |
56 | 57 | ||
@@ -61,7 +62,7 @@ | |||
61 | #define TB_BL_PWM_TIMER 9 | 62 | #define TB_BL_PWM_TIMER 9 |
62 | #define TB_KILL_POWER_GPIO 168 | 63 | #define TB_KILL_POWER_GPIO 168 |
63 | 64 | ||
64 | unsigned long touchbook_revision; | 65 | static unsigned long touchbook_revision; |
65 | 66 | ||
66 | static struct mtd_partition omap3touchbook_nand_partitions[] = { | 67 | static struct mtd_partition omap3touchbook_nand_partitions[] = { |
67 | /* All the partition sizes are listed in terms of NAND block size */ | 68 | /* All the partition sizes are listed in terms of NAND block size */ |
@@ -108,7 +109,7 @@ static struct omap_nand_platform_data omap3touchbook_nand_data = { | |||
108 | static struct omap2_hsmmc_info mmc[] = { | 109 | static struct omap2_hsmmc_info mmc[] = { |
109 | { | 110 | { |
110 | .mmc = 1, | 111 | .mmc = 1, |
111 | .wires = 8, | 112 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
112 | .gpio_wp = 29, | 113 | .gpio_wp = 29, |
113 | }, | 114 | }, |
114 | {} /* Terminator */ | 115 | {} /* Terminator */ |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index db69bcadf4c7..702f2a63f2c1 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/leds.h> | ||
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
24 | #include <linux/usb/otg.h> | 25 | #include <linux/usb/otg.h> |
25 | #include <linux/i2c/twl.h> | 26 | #include <linux/i2c/twl.h> |
@@ -33,12 +34,45 @@ | |||
33 | 34 | ||
34 | #include <plat/board.h> | 35 | #include <plat/board.h> |
35 | #include <plat/common.h> | 36 | #include <plat/common.h> |
36 | #include <plat/control.h> | ||
37 | #include <plat/timer-gp.h> | ||
38 | #include <plat/usb.h> | 37 | #include <plat/usb.h> |
39 | #include <plat/mmc.h> | 38 | #include <plat/mmc.h> |
39 | #include "timer-gp.h" | ||
40 | |||
40 | #include "hsmmc.h" | 41 | #include "hsmmc.h" |
42 | #include "control.h" | ||
43 | |||
44 | #define GPIO_HUB_POWER 1 | ||
45 | #define GPIO_HUB_NRESET 62 | ||
46 | |||
47 | static struct gpio_led gpio_leds[] = { | ||
48 | { | ||
49 | .name = "pandaboard::status1", | ||
50 | .default_trigger = "heartbeat", | ||
51 | .gpio = 7, | ||
52 | }, | ||
53 | { | ||
54 | .name = "pandaboard::status2", | ||
55 | .default_trigger = "mmc0", | ||
56 | .gpio = 8, | ||
57 | }, | ||
58 | }; | ||
41 | 59 | ||
60 | static struct gpio_led_platform_data gpio_led_info = { | ||
61 | .leds = gpio_leds, | ||
62 | .num_leds = ARRAY_SIZE(gpio_leds), | ||
63 | }; | ||
64 | |||
65 | static struct platform_device leds_gpio = { | ||
66 | .name = "leds-gpio", | ||
67 | .id = -1, | ||
68 | .dev = { | ||
69 | .platform_data = &gpio_led_info, | ||
70 | }, | ||
71 | }; | ||
72 | |||
73 | static struct platform_device *panda_devices[] __initdata = { | ||
74 | &leds_gpio, | ||
75 | }; | ||
42 | 76 | ||
43 | static void __init omap4_panda_init_irq(void) | 77 | static void __init omap4_panda_init_irq(void) |
44 | { | 78 | { |
@@ -47,6 +81,56 @@ static void __init omap4_panda_init_irq(void) | |||
47 | omap_gpio_init(); | 81 | omap_gpio_init(); |
48 | } | 82 | } |
49 | 83 | ||
84 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | ||
85 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | ||
86 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
87 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
88 | .phy_reset = false, | ||
89 | .reset_gpio_port[0] = -EINVAL, | ||
90 | .reset_gpio_port[1] = -EINVAL, | ||
91 | .reset_gpio_port[2] = -EINVAL | ||
92 | }; | ||
93 | |||
94 | static void __init omap4_ehci_init(void) | ||
95 | { | ||
96 | int ret; | ||
97 | |||
98 | |||
99 | /* disable the power to the usb hub prior to init */ | ||
100 | ret = gpio_request(GPIO_HUB_POWER, "hub_power"); | ||
101 | if (ret) { | ||
102 | pr_err("Cannot request GPIO %d\n", GPIO_HUB_POWER); | ||
103 | goto error1; | ||
104 | } | ||
105 | gpio_export(GPIO_HUB_POWER, 0); | ||
106 | gpio_direction_output(GPIO_HUB_POWER, 0); | ||
107 | gpio_set_value(GPIO_HUB_POWER, 0); | ||
108 | |||
109 | /* reset phy+hub */ | ||
110 | ret = gpio_request(GPIO_HUB_NRESET, "hub_nreset"); | ||
111 | if (ret) { | ||
112 | pr_err("Cannot request GPIO %d\n", GPIO_HUB_NRESET); | ||
113 | goto error2; | ||
114 | } | ||
115 | gpio_export(GPIO_HUB_NRESET, 0); | ||
116 | gpio_direction_output(GPIO_HUB_NRESET, 0); | ||
117 | gpio_set_value(GPIO_HUB_NRESET, 0); | ||
118 | gpio_set_value(GPIO_HUB_NRESET, 1); | ||
119 | |||
120 | usb_ehci_init(&ehci_pdata); | ||
121 | |||
122 | /* enable power to hub */ | ||
123 | gpio_set_value(GPIO_HUB_POWER, 1); | ||
124 | return; | ||
125 | |||
126 | error2: | ||
127 | gpio_free(GPIO_HUB_POWER); | ||
128 | error1: | ||
129 | pr_err("Unable to initialize EHCI power/reset\n"); | ||
130 | return; | ||
131 | |||
132 | } | ||
133 | |||
50 | static struct omap_musb_board_data musb_board_data = { | 134 | static struct omap_musb_board_data musb_board_data = { |
51 | .interface_type = MUSB_INTERFACE_UTMI, | 135 | .interface_type = MUSB_INTERFACE_UTMI, |
52 | .mode = MUSB_PERIPHERAL, | 136 | .mode = MUSB_PERIPHERAL, |
@@ -56,7 +140,7 @@ static struct omap_musb_board_data musb_board_data = { | |||
56 | static struct omap2_hsmmc_info mmc[] = { | 140 | static struct omap2_hsmmc_info mmc[] = { |
57 | { | 141 | { |
58 | .mmc = 1, | 142 | .mmc = 1, |
59 | .wires = 8, | 143 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
60 | .gpio_wp = -EINVAL, | 144 | .gpio_wp = -EINVAL, |
61 | }, | 145 | }, |
62 | {} /* Terminator */ | 146 | {} /* Terminator */ |
@@ -67,10 +151,6 @@ static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { | |||
67 | .supply = "vmmc", | 151 | .supply = "vmmc", |
68 | .dev_name = "mmci-omap-hs.0", | 152 | .dev_name = "mmci-omap-hs.0", |
69 | }, | 153 | }, |
70 | { | ||
71 | .supply = "vmmc", | ||
72 | .dev_name = "mmci-omap-hs.1", | ||
73 | }, | ||
74 | }; | 154 | }; |
75 | 155 | ||
76 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) | 156 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) |
@@ -89,7 +169,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev) | |||
89 | 169 | ||
90 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) | 170 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) |
91 | { | 171 | { |
92 | struct omap_mmc_platform_data *pdata = dev->platform_data; | 172 | struct omap_mmc_platform_data *pdata; |
173 | |||
174 | /* dev can be null if CONFIG_MMC_OMAP_HS is not set */ | ||
175 | if (!dev) { | ||
176 | pr_err("Failed omap4_twl6030_hsmmc_set_late_init\n"); | ||
177 | return; | ||
178 | } | ||
179 | pdata = dev->platform_data; | ||
93 | 180 | ||
94 | pdata->init = omap4_twl6030_hsmmc_late_init; | 181 | pdata->init = omap4_twl6030_hsmmc_late_init; |
95 | } | 182 | } |
@@ -156,7 +243,7 @@ static struct regulator_init_data omap4_panda_vmmc = { | |||
156 | | REGULATOR_CHANGE_MODE | 243 | | REGULATOR_CHANGE_MODE |
157 | | REGULATOR_CHANGE_STATUS, | 244 | | REGULATOR_CHANGE_STATUS, |
158 | }, | 245 | }, |
159 | .num_consumer_supplies = 2, | 246 | .num_consumer_supplies = 1, |
160 | .consumer_supplies = omap4_panda_vmmc_supply, | 247 | .consumer_supplies = omap4_panda_vmmc_supply, |
161 | }; | 248 | }; |
162 | 249 | ||
@@ -274,13 +361,13 @@ static int __init omap4_panda_i2c_init(void) | |||
274 | } | 361 | } |
275 | static void __init omap4_panda_init(void) | 362 | static void __init omap4_panda_init(void) |
276 | { | 363 | { |
277 | int status; | ||
278 | |||
279 | omap4_panda_i2c_init(); | 364 | omap4_panda_i2c_init(); |
365 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); | ||
280 | omap_serial_init(); | 366 | omap_serial_init(); |
281 | omap4_twl6030_hsmmc_init(mmc); | 367 | omap4_twl6030_hsmmc_init(mmc); |
282 | /* OMAP4 Panda uses internal transceiver so register nop transceiver */ | 368 | /* OMAP4 Panda uses internal transceiver so register nop transceiver */ |
283 | usb_nop_xceiv_register(); | 369 | usb_nop_xceiv_register(); |
370 | omap4_ehci_init(); | ||
284 | /* FIXME: allow multi-omap to boot until musb is updated for omap4 */ | 371 | /* FIXME: allow multi-omap to boot until musb is updated for omap4 */ |
285 | if (!cpu_is_omap44xx()) | 372 | if (!cpu_is_omap44xx()) |
286 | usb_musb_init(&musb_board_data); | 373 | usb_musb_init(&musb_board_data); |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 5e528ca015a1..7053bc0b46db 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/mtd/mtd.h> | 32 | #include <linux/mtd/mtd.h> |
33 | #include <linux/mtd/nand.h> | 33 | #include <linux/mtd/nand.h> |
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/mmc/host.h> | ||
35 | 36 | ||
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
@@ -303,13 +304,13 @@ static void __init overo_flash_init(void) | |||
303 | static struct omap2_hsmmc_info mmc[] = { | 304 | static struct omap2_hsmmc_info mmc[] = { |
304 | { | 305 | { |
305 | .mmc = 1, | 306 | .mmc = 1, |
306 | .wires = 4, | 307 | .caps = MMC_CAP_4_BIT_DATA, |
307 | .gpio_cd = -EINVAL, | 308 | .gpio_cd = -EINVAL, |
308 | .gpio_wp = -EINVAL, | 309 | .gpio_wp = -EINVAL, |
309 | }, | 310 | }, |
310 | { | 311 | { |
311 | .mmc = 2, | 312 | .mmc = 2, |
312 | .wires = 4, | 313 | .caps = MMC_CAP_4_BIT_DATA, |
313 | .gpio_cd = -EINVAL, | 314 | .gpio_cd = -EINVAL, |
314 | .gpio_wp = -EINVAL, | 315 | .gpio_wp = -EINVAL, |
315 | .transceiver = true, | 316 | .transceiver = true, |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 63d786bccb67..41285297eafc 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <plat/onenand.h> | 33 | #include <plat/onenand.h> |
34 | #include <plat/gpmc-smc91x.h> | 34 | #include <plat/gpmc-smc91x.h> |
35 | 35 | ||
36 | #include <mach/board-rx51.h> | ||
37 | |||
36 | #include <sound/tlv320aic3x.h> | 38 | #include <sound/tlv320aic3x.h> |
37 | #include <sound/tpa6130a2-plat.h> | 39 | #include <sound/tpa6130a2-plat.h> |
38 | 40 | ||
@@ -185,7 +187,7 @@ static void __init rx51_add_gpio_keys(void) | |||
185 | } | 187 | } |
186 | #endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */ | 188 | #endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */ |
187 | 189 | ||
188 | static int board_keymap[] = { | 190 | static uint32_t board_keymap[] = { |
189 | /* | 191 | /* |
190 | * Note that KEY(x, 8, KEY_XXX) entries represent "entrire row | 192 | * Note that KEY(x, 8, KEY_XXX) entries represent "entrire row |
191 | * connected to the ground" matrix state. | 193 | * connected to the ground" matrix state. |
@@ -303,7 +305,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = { | |||
303 | { | 305 | { |
304 | .name = "external", | 306 | .name = "external", |
305 | .mmc = 1, | 307 | .mmc = 1, |
306 | .wires = 4, | 308 | .caps = MMC_CAP_4_BIT_DATA, |
307 | .cover_only = true, | 309 | .cover_only = true, |
308 | .gpio_cd = 160, | 310 | .gpio_cd = 160, |
309 | .gpio_wp = -EINVAL, | 311 | .gpio_wp = -EINVAL, |
@@ -312,7 +314,8 @@ static struct omap2_hsmmc_info mmc[] __initdata = { | |||
312 | { | 314 | { |
313 | .name = "internal", | 315 | .name = "internal", |
314 | .mmc = 2, | 316 | .mmc = 2, |
315 | .wires = 8, /* See also rx51_mmc2_remux */ | 317 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
318 | /* See also rx51_mmc2_remux */ | ||
316 | .gpio_cd = -EINVAL, | 319 | .gpio_cd = -EINVAL, |
317 | .gpio_wp = -EINVAL, | 320 | .gpio_wp = -EINVAL, |
318 | .nonremovable = true, | 321 | .nonremovable = true, |
diff --git a/arch/arm/mach-omap2/board-rx51-sdram.c b/arch/arm/mach-omap2/board-rx51-sdram.c index f392844195d2..a43b2c5c838b 100644 --- a/arch/arm/mach-omap2/board-rx51-sdram.c +++ b/arch/arm/mach-omap2/board-rx51-sdram.c | |||
@@ -43,7 +43,7 @@ struct sdram_timings { | |||
43 | u32 tWTR; | 43 | u32 tWTR; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | struct omap_sdrc_params rx51_sdrc_params[4]; | 46 | static struct omap_sdrc_params rx51_sdrc_params[4]; |
47 | 47 | ||
48 | static const struct sdram_timings rx51_timings[] = { | 48 | static const struct sdram_timings rx51_timings[] = { |
49 | { | 49 | { |
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c index 5a1005ba9815..85503fed4e13 100644 --- a/arch/arm/mach-omap2/board-rx51-video.c +++ b/arch/arm/mach-omap2/board-rx51-video.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <plat/vram.h> | 20 | #include <plat/vram.h> |
21 | #include <plat/mcspi.h> | 21 | #include <plat/mcspi.h> |
22 | 22 | ||
23 | #include <mach/board-rx51.h> | ||
24 | |||
23 | #include "mux.h" | 25 | #include "mux.h" |
24 | 26 | ||
25 | #define RX51_LCD_RESET_GPIO 90 | 27 | #define RX51_LCD_RESET_GPIO 90 |
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index 1d7f827b0408..007ebdc6c993 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | #include <plat/gpmc.h> | 17 | #include <plat/gpmc.h> |
18 | 18 | ||
19 | #include <mach/board-zoom.h> | ||
20 | |||
19 | #define ZOOM_SMSC911X_CS 7 | 21 | #define ZOOM_SMSC911X_CS 7 |
20 | #define ZOOM_SMSC911X_GPIO 158 | 22 | #define ZOOM_SMSC911X_GPIO 158 |
21 | #define ZOOM_QUADUART_CS 3 | 23 | #define ZOOM_QUADUART_CS 3 |
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index bc8232845d7a..86c9b2102952 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/regulator/machine.h> | 18 | #include <linux/regulator/machine.h> |
19 | #include <linux/regulator/fixed.h> | 19 | #include <linux/regulator/fixed.h> |
20 | #include <linux/wl12xx.h> | 20 | #include <linux/wl12xx.h> |
21 | #include <linux/mmc/host.h> | ||
21 | 22 | ||
22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
@@ -35,7 +36,7 @@ | |||
35 | #define OMAP_ZOOM_WLAN_IRQ_GPIO (162) | 36 | #define OMAP_ZOOM_WLAN_IRQ_GPIO (162) |
36 | 37 | ||
37 | /* Zoom2 has Qwerty keyboard*/ | 38 | /* Zoom2 has Qwerty keyboard*/ |
38 | static int board_keymap[] = { | 39 | static uint32_t board_keymap[] = { |
39 | KEY(0, 0, KEY_E), | 40 | KEY(0, 0, KEY_E), |
40 | KEY(0, 1, KEY_R), | 41 | KEY(0, 1, KEY_R), |
41 | KEY(0, 2, KEY_T), | 42 | KEY(0, 2, KEY_T), |
@@ -199,14 +200,14 @@ static struct omap2_hsmmc_info mmc[] __initdata = { | |||
199 | { | 200 | { |
200 | .name = "external", | 201 | .name = "external", |
201 | .mmc = 1, | 202 | .mmc = 1, |
202 | .wires = 4, | 203 | .caps = MMC_CAP_4_BIT_DATA, |
203 | .gpio_wp = -EINVAL, | 204 | .gpio_wp = -EINVAL, |
204 | .power_saving = true, | 205 | .power_saving = true, |
205 | }, | 206 | }, |
206 | { | 207 | { |
207 | .name = "internal", | 208 | .name = "internal", |
208 | .mmc = 2, | 209 | .mmc = 2, |
209 | .wires = 8, | 210 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
210 | .gpio_cd = -EINVAL, | 211 | .gpio_cd = -EINVAL, |
211 | .gpio_wp = -EINVAL, | 212 | .gpio_wp = -EINVAL, |
212 | .nonremovable = true, | 213 | .nonremovable = true, |
@@ -348,4 +349,5 @@ void __init zoom_peripherals_init(void) | |||
348 | platform_device_register(&omap_vwlan_device); | 349 | platform_device_register(&omap_vwlan_device); |
349 | usb_musb_init(&musb_board_data); | 350 | usb_musb_init(&musb_board_data); |
350 | enable_board_wakeup_source(); | 351 | enable_board_wakeup_source(); |
352 | omap_serial_init(); | ||
351 | } | 353 | } |
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c index 4ccbc32386a0..2992a9f3a585 100644 --- a/arch/arm/mach-omap2/board-zoom2.c +++ b/arch/arm/mach-omap2/board-zoom2.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <mach/board-zoom.h> | 25 | #include <mach/board-zoom.h> |
26 | 26 | ||
27 | #include "board-flash.h" | ||
27 | #include "mux.h" | 28 | #include "mux.h" |
28 | #include "sdram-micron-mt46h32m32lf-6.h" | 29 | #include "sdram-micron-mt46h32m32lf-6.h" |
29 | 30 | ||
diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c index b2bb3ff971ac..5adde12c0395 100644 --- a/arch/arm/mach-omap2/board-zoom3.c +++ b/arch/arm/mach-omap2/board-zoom3.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <plat/board.h> | 22 | #include <plat/board.h> |
23 | #include <plat/usb.h> | 23 | #include <plat/usb.h> |
24 | 24 | ||
25 | #include "board-flash.h" | ||
25 | #include "mux.h" | 26 | #include "mux.h" |
26 | #include "sdram-hynix-h8mbx00u0mer-0em.h" | 27 | #include "sdram-hynix-h8mbx00u0mer-0em.h" |
27 | 28 | ||
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 605f531783a8..b5babf5440e4 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -395,7 +395,7 @@ void omap2_clk_disable_unused(struct clk *clk) | |||
395 | if ((regval32 & (1 << clk->enable_bit)) == v) | 395 | if ((regval32 & (1 << clk->enable_bit)) == v) |
396 | return; | 396 | return; |
397 | 397 | ||
398 | printk(KERN_DEBUG "Disabling unused clock \"%s\"\n", clk->name); | 398 | pr_debug("Disabling unused clock \"%s\"\n", clk->name); |
399 | if (cpu_is_omap34xx()) { | 399 | if (cpu_is_omap34xx()) { |
400 | omap2_clk_enable(clk); | 400 | omap2_clk_enable(clk); |
401 | omap2_clk_disable(clk); | 401 | omap2_clk_disable(clk); |
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c index 5f2066a6ba74..21f856252ad8 100644 --- a/arch/arm/mach-omap2/clock2420_data.c +++ b/arch/arm/mach-omap2/clock2420_data.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "prm-regbits-24xx.h" | 27 | #include "prm-regbits-24xx.h" |
28 | #include "cm-regbits-24xx.h" | 28 | #include "cm-regbits-24xx.h" |
29 | #include "sdrc.h" | 29 | #include "sdrc.h" |
30 | #include "control.h" | ||
30 | 31 | ||
31 | #define OMAP_CM_REGADDR OMAP2420_CM_REGADDR | 32 | #define OMAP_CM_REGADDR OMAP2420_CM_REGADDR |
32 | 33 | ||
@@ -89,6 +90,12 @@ static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */ | |||
89 | .clkdm_name = "wkup_clkdm", | 90 | .clkdm_name = "wkup_clkdm", |
90 | }; | 91 | }; |
91 | 92 | ||
93 | /* Optional external clock input for McBSP CLKS */ | ||
94 | static struct clk mcbsp_clks = { | ||
95 | .name = "mcbsp_clks", | ||
96 | .ops = &clkops_null, | ||
97 | }; | ||
98 | |||
92 | /* | 99 | /* |
93 | * Analog domain root source clocks | 100 | * Analog domain root source clocks |
94 | */ | 101 | */ |
@@ -1135,14 +1142,34 @@ static struct clk mcbsp1_ick = { | |||
1135 | .recalc = &followparent_recalc, | 1142 | .recalc = &followparent_recalc, |
1136 | }; | 1143 | }; |
1137 | 1144 | ||
1145 | static const struct clksel_rate common_mcbsp_96m_rates[] = { | ||
1146 | { .div = 1, .val = 0, .flags = RATE_IN_24XX }, | ||
1147 | { .div = 0 } | ||
1148 | }; | ||
1149 | |||
1150 | static const struct clksel_rate common_mcbsp_mcbsp_rates[] = { | ||
1151 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, | ||
1152 | { .div = 0 } | ||
1153 | }; | ||
1154 | |||
1155 | static const struct clksel mcbsp_fck_clksel[] = { | ||
1156 | { .parent = &func_96m_ck, .rates = common_mcbsp_96m_rates }, | ||
1157 | { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates }, | ||
1158 | { .parent = NULL } | ||
1159 | }; | ||
1160 | |||
1138 | static struct clk mcbsp1_fck = { | 1161 | static struct clk mcbsp1_fck = { |
1139 | .name = "mcbsp1_fck", | 1162 | .name = "mcbsp1_fck", |
1140 | .ops = &clkops_omap2_dflt_wait, | 1163 | .ops = &clkops_omap2_dflt_wait, |
1141 | .parent = &func_96m_ck, | 1164 | .parent = &func_96m_ck, |
1165 | .init = &omap2_init_clksel_parent, | ||
1142 | .clkdm_name = "core_l4_clkdm", | 1166 | .clkdm_name = "core_l4_clkdm", |
1143 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1167 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1144 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, | 1168 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
1145 | .recalc = &followparent_recalc, | 1169 | .clksel_reg = OMAP242X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0), |
1170 | .clksel_mask = OMAP2_MCBSP1_CLKS_MASK, | ||
1171 | .clksel = mcbsp_fck_clksel, | ||
1172 | .recalc = &omap2_clksel_recalc, | ||
1146 | }; | 1173 | }; |
1147 | 1174 | ||
1148 | static struct clk mcbsp2_ick = { | 1175 | static struct clk mcbsp2_ick = { |
@@ -1159,10 +1186,14 @@ static struct clk mcbsp2_fck = { | |||
1159 | .name = "mcbsp2_fck", | 1186 | .name = "mcbsp2_fck", |
1160 | .ops = &clkops_omap2_dflt_wait, | 1187 | .ops = &clkops_omap2_dflt_wait, |
1161 | .parent = &func_96m_ck, | 1188 | .parent = &func_96m_ck, |
1189 | .init = &omap2_init_clksel_parent, | ||
1162 | .clkdm_name = "core_l4_clkdm", | 1190 | .clkdm_name = "core_l4_clkdm", |
1163 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1191 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1164 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, | 1192 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
1165 | .recalc = &followparent_recalc, | 1193 | .clksel_reg = OMAP242X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0), |
1194 | .clksel_mask = OMAP2_MCBSP2_CLKS_MASK, | ||
1195 | .clksel = mcbsp_fck_clksel, | ||
1196 | .recalc = &omap2_clksel_recalc, | ||
1166 | }; | 1197 | }; |
1167 | 1198 | ||
1168 | static struct clk mcspi1_ick = { | 1199 | static struct clk mcspi1_ick = { |
@@ -1721,6 +1752,9 @@ static struct omap_clk omap2420_clks[] = { | |||
1721 | CLK(NULL, "osc_ck", &osc_ck, CK_242X), | 1752 | CLK(NULL, "osc_ck", &osc_ck, CK_242X), |
1722 | CLK(NULL, "sys_ck", &sys_ck, CK_242X), | 1753 | CLK(NULL, "sys_ck", &sys_ck, CK_242X), |
1723 | CLK(NULL, "alt_ck", &alt_ck, CK_242X), | 1754 | CLK(NULL, "alt_ck", &alt_ck, CK_242X), |
1755 | CLK("omap-mcbsp.1", "pad_fck", &mcbsp_clks, CK_242X), | ||
1756 | CLK("omap-mcbsp.2", "pad_fck", &mcbsp_clks, CK_242X), | ||
1757 | CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_242X), | ||
1724 | /* internal analog sources */ | 1758 | /* internal analog sources */ |
1725 | CLK(NULL, "dpll_ck", &dpll_ck, CK_242X), | 1759 | CLK(NULL, "dpll_ck", &dpll_ck, CK_242X), |
1726 | CLK(NULL, "apll96_ck", &apll96_ck, CK_242X), | 1760 | CLK(NULL, "apll96_ck", &apll96_ck, CK_242X), |
@@ -1728,6 +1762,8 @@ static struct omap_clk omap2420_clks[] = { | |||
1728 | /* internal prcm root sources */ | 1762 | /* internal prcm root sources */ |
1729 | CLK(NULL, "func_54m_ck", &func_54m_ck, CK_242X), | 1763 | CLK(NULL, "func_54m_ck", &func_54m_ck, CK_242X), |
1730 | CLK(NULL, "core_ck", &core_ck, CK_242X), | 1764 | CLK(NULL, "core_ck", &core_ck, CK_242X), |
1765 | CLK("omap-mcbsp.1", "prcm_fck", &func_96m_ck, CK_242X), | ||
1766 | CLK("omap-mcbsp.2", "prcm_fck", &func_96m_ck, CK_242X), | ||
1731 | CLK(NULL, "func_96m_ck", &func_96m_ck, CK_242X), | 1767 | CLK(NULL, "func_96m_ck", &func_96m_ck, CK_242X), |
1732 | CLK(NULL, "func_48m_ck", &func_48m_ck, CK_242X), | 1768 | CLK(NULL, "func_48m_ck", &func_48m_ck, CK_242X), |
1733 | CLK(NULL, "func_12m_ck", &func_12m_ck, CK_242X), | 1769 | CLK(NULL, "func_12m_ck", &func_12m_ck, CK_242X), |
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c index 701a1716019e..e32afcbdfb88 100644 --- a/arch/arm/mach-omap2/clock2430_data.c +++ b/arch/arm/mach-omap2/clock2430_data.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "prm-regbits-24xx.h" | 27 | #include "prm-regbits-24xx.h" |
28 | #include "cm-regbits-24xx.h" | 28 | #include "cm-regbits-24xx.h" |
29 | #include "sdrc.h" | 29 | #include "sdrc.h" |
30 | #include "control.h" | ||
30 | 31 | ||
31 | #define OMAP_CM_REGADDR OMAP2430_CM_REGADDR | 32 | #define OMAP_CM_REGADDR OMAP2430_CM_REGADDR |
32 | 33 | ||
@@ -89,6 +90,12 @@ static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */ | |||
89 | .clkdm_name = "wkup_clkdm", | 90 | .clkdm_name = "wkup_clkdm", |
90 | }; | 91 | }; |
91 | 92 | ||
93 | /* Optional external clock input for McBSP CLKS */ | ||
94 | static struct clk mcbsp_clks = { | ||
95 | .name = "mcbsp_clks", | ||
96 | .ops = &clkops_null, | ||
97 | }; | ||
98 | |||
92 | /* | 99 | /* |
93 | * Analog domain root source clocks | 100 | * Analog domain root source clocks |
94 | */ | 101 | */ |
@@ -1123,14 +1130,34 @@ static struct clk mcbsp1_ick = { | |||
1123 | .recalc = &followparent_recalc, | 1130 | .recalc = &followparent_recalc, |
1124 | }; | 1131 | }; |
1125 | 1132 | ||
1133 | static const struct clksel_rate common_mcbsp_96m_rates[] = { | ||
1134 | { .div = 1, .val = 0, .flags = RATE_IN_24XX }, | ||
1135 | { .div = 0 } | ||
1136 | }; | ||
1137 | |||
1138 | static const struct clksel_rate common_mcbsp_mcbsp_rates[] = { | ||
1139 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, | ||
1140 | { .div = 0 } | ||
1141 | }; | ||
1142 | |||
1143 | static const struct clksel mcbsp_fck_clksel[] = { | ||
1144 | { .parent = &func_96m_ck, .rates = common_mcbsp_96m_rates }, | ||
1145 | { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates }, | ||
1146 | { .parent = NULL } | ||
1147 | }; | ||
1148 | |||
1126 | static struct clk mcbsp1_fck = { | 1149 | static struct clk mcbsp1_fck = { |
1127 | .name = "mcbsp1_fck", | 1150 | .name = "mcbsp1_fck", |
1128 | .ops = &clkops_omap2_dflt_wait, | 1151 | .ops = &clkops_omap2_dflt_wait, |
1129 | .parent = &func_96m_ck, | 1152 | .parent = &func_96m_ck, |
1153 | .init = &omap2_init_clksel_parent, | ||
1130 | .clkdm_name = "core_l4_clkdm", | 1154 | .clkdm_name = "core_l4_clkdm", |
1131 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1155 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1132 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, | 1156 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
1133 | .recalc = &followparent_recalc, | 1157 | .clksel_reg = OMAP243X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0), |
1158 | .clksel_mask = OMAP2_MCBSP1_CLKS_MASK, | ||
1159 | .clksel = mcbsp_fck_clksel, | ||
1160 | .recalc = &omap2_clksel_recalc, | ||
1134 | }; | 1161 | }; |
1135 | 1162 | ||
1136 | static struct clk mcbsp2_ick = { | 1163 | static struct clk mcbsp2_ick = { |
@@ -1147,10 +1174,14 @@ static struct clk mcbsp2_fck = { | |||
1147 | .name = "mcbsp2_fck", | 1174 | .name = "mcbsp2_fck", |
1148 | .ops = &clkops_omap2_dflt_wait, | 1175 | .ops = &clkops_omap2_dflt_wait, |
1149 | .parent = &func_96m_ck, | 1176 | .parent = &func_96m_ck, |
1177 | .init = &omap2_init_clksel_parent, | ||
1150 | .clkdm_name = "core_l4_clkdm", | 1178 | .clkdm_name = "core_l4_clkdm", |
1151 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1179 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1152 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, | 1180 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
1153 | .recalc = &followparent_recalc, | 1181 | .clksel_reg = OMAP243X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0), |
1182 | .clksel_mask = OMAP2_MCBSP2_CLKS_MASK, | ||
1183 | .clksel = mcbsp_fck_clksel, | ||
1184 | .recalc = &omap2_clksel_recalc, | ||
1154 | }; | 1185 | }; |
1155 | 1186 | ||
1156 | static struct clk mcbsp3_ick = { | 1187 | static struct clk mcbsp3_ick = { |
@@ -1167,10 +1198,14 @@ static struct clk mcbsp3_fck = { | |||
1167 | .name = "mcbsp3_fck", | 1198 | .name = "mcbsp3_fck", |
1168 | .ops = &clkops_omap2_dflt_wait, | 1199 | .ops = &clkops_omap2_dflt_wait, |
1169 | .parent = &func_96m_ck, | 1200 | .parent = &func_96m_ck, |
1201 | .init = &omap2_init_clksel_parent, | ||
1170 | .clkdm_name = "core_l4_clkdm", | 1202 | .clkdm_name = "core_l4_clkdm", |
1171 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), | 1203 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
1172 | .enable_bit = OMAP2430_EN_MCBSP3_SHIFT, | 1204 | .enable_bit = OMAP2430_EN_MCBSP3_SHIFT, |
1173 | .recalc = &followparent_recalc, | 1205 | .clksel_reg = OMAP243X_CTRL_REGADDR(OMAP243X_CONTROL_DEVCONF1), |
1206 | .clksel_mask = OMAP2_MCBSP3_CLKS_MASK, | ||
1207 | .clksel = mcbsp_fck_clksel, | ||
1208 | .recalc = &omap2_clksel_recalc, | ||
1174 | }; | 1209 | }; |
1175 | 1210 | ||
1176 | static struct clk mcbsp4_ick = { | 1211 | static struct clk mcbsp4_ick = { |
@@ -1187,10 +1222,14 @@ static struct clk mcbsp4_fck = { | |||
1187 | .name = "mcbsp4_fck", | 1222 | .name = "mcbsp4_fck", |
1188 | .ops = &clkops_omap2_dflt_wait, | 1223 | .ops = &clkops_omap2_dflt_wait, |
1189 | .parent = &func_96m_ck, | 1224 | .parent = &func_96m_ck, |
1225 | .init = &omap2_init_clksel_parent, | ||
1190 | .clkdm_name = "core_l4_clkdm", | 1226 | .clkdm_name = "core_l4_clkdm", |
1191 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), | 1227 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
1192 | .enable_bit = OMAP2430_EN_MCBSP4_SHIFT, | 1228 | .enable_bit = OMAP2430_EN_MCBSP4_SHIFT, |
1193 | .recalc = &followparent_recalc, | 1229 | .clksel_reg = OMAP243X_CTRL_REGADDR(OMAP243X_CONTROL_DEVCONF1), |
1230 | .clksel_mask = OMAP2_MCBSP4_CLKS_MASK, | ||
1231 | .clksel = mcbsp_fck_clksel, | ||
1232 | .recalc = &omap2_clksel_recalc, | ||
1194 | }; | 1233 | }; |
1195 | 1234 | ||
1196 | static struct clk mcbsp5_ick = { | 1235 | static struct clk mcbsp5_ick = { |
@@ -1207,10 +1246,14 @@ static struct clk mcbsp5_fck = { | |||
1207 | .name = "mcbsp5_fck", | 1246 | .name = "mcbsp5_fck", |
1208 | .ops = &clkops_omap2_dflt_wait, | 1247 | .ops = &clkops_omap2_dflt_wait, |
1209 | .parent = &func_96m_ck, | 1248 | .parent = &func_96m_ck, |
1249 | .init = &omap2_init_clksel_parent, | ||
1210 | .clkdm_name = "core_l4_clkdm", | 1250 | .clkdm_name = "core_l4_clkdm", |
1211 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), | 1251 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
1212 | .enable_bit = OMAP2430_EN_MCBSP5_SHIFT, | 1252 | .enable_bit = OMAP2430_EN_MCBSP5_SHIFT, |
1213 | .recalc = &followparent_recalc, | 1253 | .clksel_reg = OMAP243X_CTRL_REGADDR(OMAP243X_CONTROL_DEVCONF1), |
1254 | .clksel_mask = OMAP2_MCBSP5_CLKS_MASK, | ||
1255 | .clksel = mcbsp_fck_clksel, | ||
1256 | .recalc = &omap2_clksel_recalc, | ||
1214 | }; | 1257 | }; |
1215 | 1258 | ||
1216 | static struct clk mcspi1_ick = { | 1259 | static struct clk mcspi1_ick = { |
@@ -1808,6 +1851,12 @@ static struct omap_clk omap2430_clks[] = { | |||
1808 | CLK(NULL, "osc_ck", &osc_ck, CK_243X), | 1851 | CLK(NULL, "osc_ck", &osc_ck, CK_243X), |
1809 | CLK(NULL, "sys_ck", &sys_ck, CK_243X), | 1852 | CLK(NULL, "sys_ck", &sys_ck, CK_243X), |
1810 | CLK(NULL, "alt_ck", &alt_ck, CK_243X), | 1853 | CLK(NULL, "alt_ck", &alt_ck, CK_243X), |
1854 | CLK("omap-mcbsp.1", "pad_fck", &mcbsp_clks, CK_243X), | ||
1855 | CLK("omap-mcbsp.2", "pad_fck", &mcbsp_clks, CK_243X), | ||
1856 | CLK("omap-mcbsp.3", "pad_fck", &mcbsp_clks, CK_243X), | ||
1857 | CLK("omap-mcbsp.4", "pad_fck", &mcbsp_clks, CK_243X), | ||
1858 | CLK("omap-mcbsp.5", "pad_fck", &mcbsp_clks, CK_243X), | ||
1859 | CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_243X), | ||
1811 | /* internal analog sources */ | 1860 | /* internal analog sources */ |
1812 | CLK(NULL, "dpll_ck", &dpll_ck, CK_243X), | 1861 | CLK(NULL, "dpll_ck", &dpll_ck, CK_243X), |
1813 | CLK(NULL, "apll96_ck", &apll96_ck, CK_243X), | 1862 | CLK(NULL, "apll96_ck", &apll96_ck, CK_243X), |
@@ -1815,6 +1864,11 @@ static struct omap_clk omap2430_clks[] = { | |||
1815 | /* internal prcm root sources */ | 1864 | /* internal prcm root sources */ |
1816 | CLK(NULL, "func_54m_ck", &func_54m_ck, CK_243X), | 1865 | CLK(NULL, "func_54m_ck", &func_54m_ck, CK_243X), |
1817 | CLK(NULL, "core_ck", &core_ck, CK_243X), | 1866 | CLK(NULL, "core_ck", &core_ck, CK_243X), |
1867 | CLK("omap-mcbsp.1", "prcm_fck", &func_96m_ck, CK_243X), | ||
1868 | CLK("omap-mcbsp.2", "prcm_fck", &func_96m_ck, CK_243X), | ||
1869 | CLK("omap-mcbsp.3", "prcm_fck", &func_96m_ck, CK_243X), | ||
1870 | CLK("omap-mcbsp.4", "prcm_fck", &func_96m_ck, CK_243X), | ||
1871 | CLK("omap-mcbsp.5", "prcm_fck", &func_96m_ck, CK_243X), | ||
1818 | CLK(NULL, "func_96m_ck", &func_96m_ck, CK_243X), | 1872 | CLK(NULL, "func_96m_ck", &func_96m_ck, CK_243X), |
1819 | CLK(NULL, "func_48m_ck", &func_48m_ck, CK_243X), | 1873 | CLK(NULL, "func_48m_ck", &func_48m_ck, CK_243X), |
1820 | CLK(NULL, "func_12m_ck", &func_12m_ck, CK_243X), | 1874 | CLK(NULL, "func_12m_ck", &func_12m_ck, CK_243X), |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index c73906d17458..d85ecd5aebfd 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | 22 | ||
23 | #include <plat/control.h> | ||
24 | #include <plat/clkdev_omap.h> | 23 | #include <plat/clkdev_omap.h> |
25 | 24 | ||
26 | #include "clock.h" | 25 | #include "clock.h" |
@@ -33,6 +32,7 @@ | |||
33 | #include "cm-regbits-34xx.h" | 32 | #include "cm-regbits-34xx.h" |
34 | #include "prm.h" | 33 | #include "prm.h" |
35 | #include "prm-regbits-34xx.h" | 34 | #include "prm-regbits-34xx.h" |
35 | #include "control.h" | ||
36 | 36 | ||
37 | /* | 37 | /* |
38 | * clocks | 38 | * clocks |
@@ -2465,6 +2465,16 @@ static struct clk uart3_fck = { | |||
2465 | .recalc = &followparent_recalc, | 2465 | .recalc = &followparent_recalc, |
2466 | }; | 2466 | }; |
2467 | 2467 | ||
2468 | static struct clk uart4_fck = { | ||
2469 | .name = "uart4_fck", | ||
2470 | .ops = &clkops_omap2_dflt_wait, | ||
2471 | .parent = &per_48m_fck, | ||
2472 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | ||
2473 | .enable_bit = OMAP3630_EN_UART4_SHIFT, | ||
2474 | .clkdm_name = "per_clkdm", | ||
2475 | .recalc = &followparent_recalc, | ||
2476 | }; | ||
2477 | |||
2468 | static struct clk gpt2_fck = { | 2478 | static struct clk gpt2_fck = { |
2469 | .name = "gpt2_fck", | 2479 | .name = "gpt2_fck", |
2470 | .ops = &clkops_omap2_dflt_wait, | 2480 | .ops = &clkops_omap2_dflt_wait, |
@@ -2715,6 +2725,16 @@ static struct clk uart3_ick = { | |||
2715 | .recalc = &followparent_recalc, | 2725 | .recalc = &followparent_recalc, |
2716 | }; | 2726 | }; |
2717 | 2727 | ||
2728 | static struct clk uart4_ick = { | ||
2729 | .name = "uart4_ick", | ||
2730 | .ops = &clkops_omap2_dflt_wait, | ||
2731 | .parent = &per_l4_ick, | ||
2732 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | ||
2733 | .enable_bit = OMAP3630_EN_UART4_SHIFT, | ||
2734 | .clkdm_name = "per_clkdm", | ||
2735 | .recalc = &followparent_recalc, | ||
2736 | }; | ||
2737 | |||
2718 | static struct clk gpt9_ick = { | 2738 | static struct clk gpt9_ick = { |
2719 | .name = "gpt9_ick", | 2739 | .name = "gpt9_ick", |
2720 | .ops = &clkops_omap2_dflt_wait, | 2740 | .ops = &clkops_omap2_dflt_wait, |
@@ -3188,6 +3208,11 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3188 | CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_3XXX), | 3208 | CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_3XXX), |
3189 | CLK(NULL, "sys_ck", &sys_ck, CK_3XXX), | 3209 | CLK(NULL, "sys_ck", &sys_ck, CK_3XXX), |
3190 | CLK(NULL, "sys_altclk", &sys_altclk, CK_3XXX), | 3210 | CLK(NULL, "sys_altclk", &sys_altclk, CK_3XXX), |
3211 | CLK("omap-mcbsp.1", "pad_fck", &mcbsp_clks, CK_3XXX), | ||
3212 | CLK("omap-mcbsp.2", "pad_fck", &mcbsp_clks, CK_3XXX), | ||
3213 | CLK("omap-mcbsp.3", "pad_fck", &mcbsp_clks, CK_3XXX), | ||
3214 | CLK("omap-mcbsp.4", "pad_fck", &mcbsp_clks, CK_3XXX), | ||
3215 | CLK("omap-mcbsp.5", "pad_fck", &mcbsp_clks, CK_3XXX), | ||
3191 | CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_3XXX), | 3216 | CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_3XXX), |
3192 | CLK(NULL, "sys_clkout1", &sys_clkout1, CK_3XXX), | 3217 | CLK(NULL, "sys_clkout1", &sys_clkout1, CK_3XXX), |
3193 | CLK(NULL, "dpll1_ck", &dpll1_ck, CK_3XXX), | 3218 | CLK(NULL, "dpll1_ck", &dpll1_ck, CK_3XXX), |
@@ -3253,6 +3278,8 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3253 | CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2 | CK_AM35XX), | 3278 | CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2 | CK_AM35XX), |
3254 | CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2 | CK_AM35XX), | 3279 | CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2 | CK_AM35XX), |
3255 | CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2 | CK_AM35XX), | 3280 | CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2 | CK_AM35XX), |
3281 | CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), | ||
3282 | CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), | ||
3256 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), | 3283 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), |
3257 | CLK("mmci-omap-hs.2", "fck", &mmchs3_fck, CK_3430ES2 | CK_AM35XX), | 3284 | CLK("mmci-omap-hs.2", "fck", &mmchs3_fck, CK_3430ES2 | CK_AM35XX), |
3258 | CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_3XXX), | 3285 | CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_3XXX), |
@@ -3346,9 +3373,13 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3346 | CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_3XXX), | 3373 | CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_3XXX), |
3347 | CLK(NULL, "gpt12_ick", &gpt12_ick, CK_3XXX), | 3374 | CLK(NULL, "gpt12_ick", &gpt12_ick, CK_3XXX), |
3348 | CLK(NULL, "gpt1_ick", &gpt1_ick, CK_3XXX), | 3375 | CLK(NULL, "gpt1_ick", &gpt1_ick, CK_3XXX), |
3376 | CLK("omap-mcbsp.2", "prcm_fck", &per_96m_fck, CK_3XXX), | ||
3377 | CLK("omap-mcbsp.3", "prcm_fck", &per_96m_fck, CK_3XXX), | ||
3378 | CLK("omap-mcbsp.4", "prcm_fck", &per_96m_fck, CK_3XXX), | ||
3349 | CLK(NULL, "per_96m_fck", &per_96m_fck, CK_3XXX), | 3379 | CLK(NULL, "per_96m_fck", &per_96m_fck, CK_3XXX), |
3350 | CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX), | 3380 | CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX), |
3351 | CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX), | 3381 | CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX), |
3382 | CLK(NULL, "uart4_fck", &uart4_fck, CK_36XX), | ||
3352 | CLK(NULL, "gpt2_fck", &gpt2_fck, CK_3XXX), | 3383 | CLK(NULL, "gpt2_fck", &gpt2_fck, CK_3XXX), |
3353 | CLK(NULL, "gpt3_fck", &gpt3_fck, CK_3XXX), | 3384 | CLK(NULL, "gpt3_fck", &gpt3_fck, CK_3XXX), |
3354 | CLK(NULL, "gpt4_fck", &gpt4_fck, CK_3XXX), | 3385 | CLK(NULL, "gpt4_fck", &gpt4_fck, CK_3XXX), |
@@ -3372,6 +3403,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3372 | CLK(NULL, "gpio2_ick", &gpio2_ick, CK_3XXX), | 3403 | CLK(NULL, "gpio2_ick", &gpio2_ick, CK_3XXX), |
3373 | CLK(NULL, "wdt3_ick", &wdt3_ick, CK_3XXX), | 3404 | CLK(NULL, "wdt3_ick", &wdt3_ick, CK_3XXX), |
3374 | CLK(NULL, "uart3_ick", &uart3_ick, CK_3XXX), | 3405 | CLK(NULL, "uart3_ick", &uart3_ick, CK_3XXX), |
3406 | CLK(NULL, "uart4_ick", &uart4_ick, CK_36XX), | ||
3375 | CLK(NULL, "gpt9_ick", &gpt9_ick, CK_3XXX), | 3407 | CLK(NULL, "gpt9_ick", &gpt9_ick, CK_3XXX), |
3376 | CLK(NULL, "gpt8_ick", &gpt8_ick, CK_3XXX), | 3408 | CLK(NULL, "gpt8_ick", &gpt8_ick, CK_3XXX), |
3377 | CLK(NULL, "gpt7_ick", &gpt7_ick, CK_3XXX), | 3409 | CLK(NULL, "gpt7_ick", &gpt7_ick, CK_3XXX), |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index e10db7a90cb2..1599836ba3d9 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -17,13 +17,15 @@ | |||
17 | * This program is free software; you can redistribute it and/or modify | 17 | * This program is free software; you can redistribute it and/or modify |
18 | * it under the terms of the GNU General Public License version 2 as | 18 | * it under the terms of the GNU General Public License version 2 as |
19 | * published by the Free Software Foundation. | 19 | * published by the Free Software Foundation. |
20 | * | ||
21 | * XXX Some of the ES1 clocks have been removed/changed; once support | ||
22 | * is added for discriminating clocks by ES level, these should be added back | ||
23 | * in. | ||
20 | */ | 24 | */ |
21 | 25 | ||
22 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
23 | #include <linux/list.h> | 27 | #include <linux/list.h> |
24 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
25 | |||
26 | #include <plat/control.h> | ||
27 | #include <plat/clkdev_omap.h> | 29 | #include <plat/clkdev_omap.h> |
28 | 30 | ||
29 | #include "clock.h" | 31 | #include "clock.h" |
@@ -32,6 +34,7 @@ | |||
32 | #include "cm-regbits-44xx.h" | 34 | #include "cm-regbits-44xx.h" |
33 | #include "prm.h" | 35 | #include "prm.h" |
34 | #include "prm-regbits-44xx.h" | 36 | #include "prm-regbits-44xx.h" |
37 | #include "control.h" | ||
35 | 38 | ||
36 | /* Root clocks */ | 39 | /* Root clocks */ |
37 | 40 | ||
@@ -175,21 +178,27 @@ static struct clk sys_clkin_ck = { | |||
175 | .recalc = &omap2_clksel_recalc, | 178 | .recalc = &omap2_clksel_recalc, |
176 | }; | 179 | }; |
177 | 180 | ||
181 | static struct clk tie_low_clock_ck = { | ||
182 | .name = "tie_low_clock_ck", | ||
183 | .rate = 0, | ||
184 | .ops = &clkops_null, | ||
185 | }; | ||
186 | |||
178 | static struct clk utmi_phy_clkout_ck = { | 187 | static struct clk utmi_phy_clkout_ck = { |
179 | .name = "utmi_phy_clkout_ck", | 188 | .name = "utmi_phy_clkout_ck", |
180 | .rate = 12000000, | 189 | .rate = 60000000, |
181 | .ops = &clkops_null, | 190 | .ops = &clkops_null, |
182 | }; | 191 | }; |
183 | 192 | ||
184 | static struct clk xclk60mhsp1_ck = { | 193 | static struct clk xclk60mhsp1_ck = { |
185 | .name = "xclk60mhsp1_ck", | 194 | .name = "xclk60mhsp1_ck", |
186 | .rate = 12000000, | 195 | .rate = 60000000, |
187 | .ops = &clkops_null, | 196 | .ops = &clkops_null, |
188 | }; | 197 | }; |
189 | 198 | ||
190 | static struct clk xclk60mhsp2_ck = { | 199 | static struct clk xclk60mhsp2_ck = { |
191 | .name = "xclk60mhsp2_ck", | 200 | .name = "xclk60mhsp2_ck", |
192 | .rate = 12000000, | 201 | .rate = 60000000, |
193 | .ops = &clkops_null, | 202 | .ops = &clkops_null, |
194 | }; | 203 | }; |
195 | 204 | ||
@@ -201,39 +210,23 @@ static struct clk xclk60motg_ck = { | |||
201 | 210 | ||
202 | /* Module clocks and DPLL outputs */ | 211 | /* Module clocks and DPLL outputs */ |
203 | 212 | ||
204 | static const struct clksel_rate div2_1to2_rates[] = { | 213 | static const struct clksel abe_dpll_bypass_clk_mux_sel[] = { |
205 | { .div = 1, .val = 0, .flags = RATE_IN_4430 }, | 214 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
206 | { .div = 2, .val = 1, .flags = RATE_IN_4430 }, | 215 | { .parent = &sys_32k_ck, .rates = div_1_1_rates }, |
207 | { .div = 0 }, | ||
208 | }; | ||
209 | |||
210 | static const struct clksel dpll_sys_ref_clk_div[] = { | ||
211 | { .parent = &sys_clkin_ck, .rates = div2_1to2_rates }, | ||
212 | { .parent = NULL }, | 216 | { .parent = NULL }, |
213 | }; | 217 | }; |
214 | 218 | ||
215 | static struct clk dpll_sys_ref_clk = { | 219 | static struct clk abe_dpll_bypass_clk_mux_ck = { |
216 | .name = "dpll_sys_ref_clk", | 220 | .name = "abe_dpll_bypass_clk_mux_ck", |
217 | .parent = &sys_clkin_ck, | 221 | .parent = &sys_clkin_ck, |
218 | .clksel = dpll_sys_ref_clk_div, | ||
219 | .clksel_reg = OMAP4430_CM_DPLL_SYS_REF_CLKSEL, | ||
220 | .clksel_mask = OMAP4430_CLKSEL_0_0_MASK, | ||
221 | .ops = &clkops_null, | 222 | .ops = &clkops_null, |
222 | .recalc = &omap2_clksel_recalc, | 223 | .recalc = &followparent_recalc, |
223 | .round_rate = &omap2_clksel_round_rate, | ||
224 | .set_rate = &omap2_clksel_set_rate, | ||
225 | }; | ||
226 | |||
227 | static const struct clksel abe_dpll_refclk_mux_sel[] = { | ||
228 | { .parent = &dpll_sys_ref_clk, .rates = div_1_0_rates }, | ||
229 | { .parent = &sys_32k_ck, .rates = div_1_1_rates }, | ||
230 | { .parent = NULL }, | ||
231 | }; | 224 | }; |
232 | 225 | ||
233 | static struct clk abe_dpll_refclk_mux_ck = { | 226 | static struct clk abe_dpll_refclk_mux_ck = { |
234 | .name = "abe_dpll_refclk_mux_ck", | 227 | .name = "abe_dpll_refclk_mux_ck", |
235 | .parent = &dpll_sys_ref_clk, | 228 | .parent = &sys_clkin_ck, |
236 | .clksel = abe_dpll_refclk_mux_sel, | 229 | .clksel = abe_dpll_bypass_clk_mux_sel, |
237 | .init = &omap2_init_clksel_parent, | 230 | .init = &omap2_init_clksel_parent, |
238 | .clksel_reg = OMAP4430_CM_ABE_PLL_REF_CLKSEL, | 231 | .clksel_reg = OMAP4430_CM_ABE_PLL_REF_CLKSEL, |
239 | .clksel_mask = OMAP4430_CLKSEL_0_0_MASK, | 232 | .clksel_mask = OMAP4430_CLKSEL_0_0_MASK, |
@@ -244,7 +237,7 @@ static struct clk abe_dpll_refclk_mux_ck = { | |||
244 | /* DPLL_ABE */ | 237 | /* DPLL_ABE */ |
245 | static struct dpll_data dpll_abe_dd = { | 238 | static struct dpll_data dpll_abe_dd = { |
246 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_ABE, | 239 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_ABE, |
247 | .clk_bypass = &sys_clkin_ck, | 240 | .clk_bypass = &abe_dpll_bypass_clk_mux_ck, |
248 | .clk_ref = &abe_dpll_refclk_mux_ck, | 241 | .clk_ref = &abe_dpll_refclk_mux_ck, |
249 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_ABE, | 242 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_ABE, |
250 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), | 243 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
@@ -310,6 +303,12 @@ static struct clk abe_clk = { | |||
310 | .set_rate = &omap2_clksel_set_rate, | 303 | .set_rate = &omap2_clksel_set_rate, |
311 | }; | 304 | }; |
312 | 305 | ||
306 | static const struct clksel_rate div2_1to2_rates[] = { | ||
307 | { .div = 1, .val = 0, .flags = RATE_IN_4430 }, | ||
308 | { .div = 2, .val = 1, .flags = RATE_IN_4430 }, | ||
309 | { .div = 0 }, | ||
310 | }; | ||
311 | |||
313 | static const struct clksel aess_fclk_div[] = { | 312 | static const struct clksel aess_fclk_div[] = { |
314 | { .parent = &abe_clk, .rates = div2_1to2_rates }, | 313 | { .parent = &abe_clk, .rates = div2_1to2_rates }, |
315 | { .parent = NULL }, | 314 | { .parent = NULL }, |
@@ -380,14 +379,14 @@ static struct clk dpll_abe_m3_ck = { | |||
380 | }; | 379 | }; |
381 | 380 | ||
382 | static const struct clksel core_hsd_byp_clk_mux_sel[] = { | 381 | static const struct clksel core_hsd_byp_clk_mux_sel[] = { |
383 | { .parent = &dpll_sys_ref_clk, .rates = div_1_0_rates }, | 382 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
384 | { .parent = &dpll_abe_m3_ck, .rates = div_1_1_rates }, | 383 | { .parent = &dpll_abe_m3_ck, .rates = div_1_1_rates }, |
385 | { .parent = NULL }, | 384 | { .parent = NULL }, |
386 | }; | 385 | }; |
387 | 386 | ||
388 | static struct clk core_hsd_byp_clk_mux_ck = { | 387 | static struct clk core_hsd_byp_clk_mux_ck = { |
389 | .name = "core_hsd_byp_clk_mux_ck", | 388 | .name = "core_hsd_byp_clk_mux_ck", |
390 | .parent = &dpll_sys_ref_clk, | 389 | .parent = &sys_clkin_ck, |
391 | .clksel = core_hsd_byp_clk_mux_sel, | 390 | .clksel = core_hsd_byp_clk_mux_sel, |
392 | .init = &omap2_init_clksel_parent, | 391 | .init = &omap2_init_clksel_parent, |
393 | .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_CORE, | 392 | .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_CORE, |
@@ -400,7 +399,7 @@ static struct clk core_hsd_byp_clk_mux_ck = { | |||
400 | static struct dpll_data dpll_core_dd = { | 399 | static struct dpll_data dpll_core_dd = { |
401 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_CORE, | 400 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_CORE, |
402 | .clk_bypass = &core_hsd_byp_clk_mux_ck, | 401 | .clk_bypass = &core_hsd_byp_clk_mux_ck, |
403 | .clk_ref = &dpll_sys_ref_clk, | 402 | .clk_ref = &sys_clkin_ck, |
404 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_CORE, | 403 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_CORE, |
405 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), | 404 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
406 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_CORE, | 405 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_CORE, |
@@ -418,7 +417,7 @@ static struct dpll_data dpll_core_dd = { | |||
418 | 417 | ||
419 | static struct clk dpll_core_ck = { | 418 | static struct clk dpll_core_ck = { |
420 | .name = "dpll_core_ck", | 419 | .name = "dpll_core_ck", |
421 | .parent = &dpll_sys_ref_clk, | 420 | .parent = &sys_clkin_ck, |
422 | .dpll_data = &dpll_core_dd, | 421 | .dpll_data = &dpll_core_dd, |
423 | .init = &omap2_init_dpll_parent, | 422 | .init = &omap2_init_dpll_parent, |
424 | .ops = &clkops_null, | 423 | .ops = &clkops_null, |
@@ -596,14 +595,14 @@ static struct clk dpll_core_m7_ck = { | |||
596 | }; | 595 | }; |
597 | 596 | ||
598 | static const struct clksel iva_hsd_byp_clk_mux_sel[] = { | 597 | static const struct clksel iva_hsd_byp_clk_mux_sel[] = { |
599 | { .parent = &dpll_sys_ref_clk, .rates = div_1_0_rates }, | 598 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
600 | { .parent = &div_iva_hs_clk, .rates = div_1_1_rates }, | 599 | { .parent = &div_iva_hs_clk, .rates = div_1_1_rates }, |
601 | { .parent = NULL }, | 600 | { .parent = NULL }, |
602 | }; | 601 | }; |
603 | 602 | ||
604 | static struct clk iva_hsd_byp_clk_mux_ck = { | 603 | static struct clk iva_hsd_byp_clk_mux_ck = { |
605 | .name = "iva_hsd_byp_clk_mux_ck", | 604 | .name = "iva_hsd_byp_clk_mux_ck", |
606 | .parent = &dpll_sys_ref_clk, | 605 | .parent = &sys_clkin_ck, |
607 | .ops = &clkops_null, | 606 | .ops = &clkops_null, |
608 | .recalc = &followparent_recalc, | 607 | .recalc = &followparent_recalc, |
609 | }; | 608 | }; |
@@ -612,7 +611,7 @@ static struct clk iva_hsd_byp_clk_mux_ck = { | |||
612 | static struct dpll_data dpll_iva_dd = { | 611 | static struct dpll_data dpll_iva_dd = { |
613 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_IVA, | 612 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_IVA, |
614 | .clk_bypass = &iva_hsd_byp_clk_mux_ck, | 613 | .clk_bypass = &iva_hsd_byp_clk_mux_ck, |
615 | .clk_ref = &dpll_sys_ref_clk, | 614 | .clk_ref = &sys_clkin_ck, |
616 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_IVA, | 615 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_IVA, |
617 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), | 616 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
618 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_IVA, | 617 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_IVA, |
@@ -630,7 +629,7 @@ static struct dpll_data dpll_iva_dd = { | |||
630 | 629 | ||
631 | static struct clk dpll_iva_ck = { | 630 | static struct clk dpll_iva_ck = { |
632 | .name = "dpll_iva_ck", | 631 | .name = "dpll_iva_ck", |
633 | .parent = &dpll_sys_ref_clk, | 632 | .parent = &sys_clkin_ck, |
634 | .dpll_data = &dpll_iva_dd, | 633 | .dpll_data = &dpll_iva_dd, |
635 | .init = &omap2_init_dpll_parent, | 634 | .init = &omap2_init_dpll_parent, |
636 | .ops = &clkops_omap3_noncore_dpll_ops, | 635 | .ops = &clkops_omap3_noncore_dpll_ops, |
@@ -672,7 +671,7 @@ static struct clk dpll_iva_m5_ck = { | |||
672 | static struct dpll_data dpll_mpu_dd = { | 671 | static struct dpll_data dpll_mpu_dd = { |
673 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_MPU, | 672 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_MPU, |
674 | .clk_bypass = &div_mpu_hs_clk, | 673 | .clk_bypass = &div_mpu_hs_clk, |
675 | .clk_ref = &dpll_sys_ref_clk, | 674 | .clk_ref = &sys_clkin_ck, |
676 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_MPU, | 675 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_MPU, |
677 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), | 676 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
678 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_MPU, | 677 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_MPU, |
@@ -690,7 +689,7 @@ static struct dpll_data dpll_mpu_dd = { | |||
690 | 689 | ||
691 | static struct clk dpll_mpu_ck = { | 690 | static struct clk dpll_mpu_ck = { |
692 | .name = "dpll_mpu_ck", | 691 | .name = "dpll_mpu_ck", |
693 | .parent = &dpll_sys_ref_clk, | 692 | .parent = &sys_clkin_ck, |
694 | .dpll_data = &dpll_mpu_dd, | 693 | .dpll_data = &dpll_mpu_dd, |
695 | .init = &omap2_init_dpll_parent, | 694 | .init = &omap2_init_dpll_parent, |
696 | .ops = &clkops_omap3_noncore_dpll_ops, | 695 | .ops = &clkops_omap3_noncore_dpll_ops, |
@@ -724,14 +723,14 @@ static struct clk per_hs_clk_div_ck = { | |||
724 | }; | 723 | }; |
725 | 724 | ||
726 | static const struct clksel per_hsd_byp_clk_mux_sel[] = { | 725 | static const struct clksel per_hsd_byp_clk_mux_sel[] = { |
727 | { .parent = &dpll_sys_ref_clk, .rates = div_1_0_rates }, | 726 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
728 | { .parent = &per_hs_clk_div_ck, .rates = div_1_1_rates }, | 727 | { .parent = &per_hs_clk_div_ck, .rates = div_1_1_rates }, |
729 | { .parent = NULL }, | 728 | { .parent = NULL }, |
730 | }; | 729 | }; |
731 | 730 | ||
732 | static struct clk per_hsd_byp_clk_mux_ck = { | 731 | static struct clk per_hsd_byp_clk_mux_ck = { |
733 | .name = "per_hsd_byp_clk_mux_ck", | 732 | .name = "per_hsd_byp_clk_mux_ck", |
734 | .parent = &dpll_sys_ref_clk, | 733 | .parent = &sys_clkin_ck, |
735 | .clksel = per_hsd_byp_clk_mux_sel, | 734 | .clksel = per_hsd_byp_clk_mux_sel, |
736 | .init = &omap2_init_clksel_parent, | 735 | .init = &omap2_init_clksel_parent, |
737 | .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_PER, | 736 | .clksel_reg = OMAP4430_CM_CLKSEL_DPLL_PER, |
@@ -744,7 +743,7 @@ static struct clk per_hsd_byp_clk_mux_ck = { | |||
744 | static struct dpll_data dpll_per_dd = { | 743 | static struct dpll_data dpll_per_dd = { |
745 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_PER, | 744 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_PER, |
746 | .clk_bypass = &per_hsd_byp_clk_mux_ck, | 745 | .clk_bypass = &per_hsd_byp_clk_mux_ck, |
747 | .clk_ref = &dpll_sys_ref_clk, | 746 | .clk_ref = &sys_clkin_ck, |
748 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_PER, | 747 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_PER, |
749 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), | 748 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
750 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_PER, | 749 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_PER, |
@@ -762,7 +761,7 @@ static struct dpll_data dpll_per_dd = { | |||
762 | 761 | ||
763 | static struct clk dpll_per_ck = { | 762 | static struct clk dpll_per_ck = { |
764 | .name = "dpll_per_ck", | 763 | .name = "dpll_per_ck", |
765 | .parent = &dpll_sys_ref_clk, | 764 | .parent = &sys_clkin_ck, |
766 | .dpll_data = &dpll_per_dd, | 765 | .dpll_data = &dpll_per_dd, |
767 | .init = &omap2_init_dpll_parent, | 766 | .init = &omap2_init_dpll_parent, |
768 | .ops = &clkops_omap3_noncore_dpll_ops, | 767 | .ops = &clkops_omap3_noncore_dpll_ops, |
@@ -858,8 +857,8 @@ static struct clk dpll_per_m7_ck = { | |||
858 | /* DPLL_UNIPRO */ | 857 | /* DPLL_UNIPRO */ |
859 | static struct dpll_data dpll_unipro_dd = { | 858 | static struct dpll_data dpll_unipro_dd = { |
860 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_UNIPRO, | 859 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_UNIPRO, |
861 | .clk_bypass = &dpll_sys_ref_clk, | 860 | .clk_bypass = &sys_clkin_ck, |
862 | .clk_ref = &dpll_sys_ref_clk, | 861 | .clk_ref = &sys_clkin_ck, |
863 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_UNIPRO, | 862 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_UNIPRO, |
864 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), | 863 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
865 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_UNIPRO, | 864 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_UNIPRO, |
@@ -877,7 +876,7 @@ static struct dpll_data dpll_unipro_dd = { | |||
877 | 876 | ||
878 | static struct clk dpll_unipro_ck = { | 877 | static struct clk dpll_unipro_ck = { |
879 | .name = "dpll_unipro_ck", | 878 | .name = "dpll_unipro_ck", |
880 | .parent = &dpll_sys_ref_clk, | 879 | .parent = &sys_clkin_ck, |
881 | .dpll_data = &dpll_unipro_dd, | 880 | .dpll_data = &dpll_unipro_dd, |
882 | .init = &omap2_init_dpll_parent, | 881 | .init = &omap2_init_dpll_parent, |
883 | .ops = &clkops_omap3_noncore_dpll_ops, | 882 | .ops = &clkops_omap3_noncore_dpll_ops, |
@@ -914,7 +913,8 @@ static struct clk usb_hs_clk_div_ck = { | |||
914 | static struct dpll_data dpll_usb_dd = { | 913 | static struct dpll_data dpll_usb_dd = { |
915 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_USB, | 914 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_USB, |
916 | .clk_bypass = &usb_hs_clk_div_ck, | 915 | .clk_bypass = &usb_hs_clk_div_ck, |
917 | .clk_ref = &dpll_sys_ref_clk, | 916 | .flags = DPLL_J_TYPE | DPLL_NO_DCO_SEL, |
917 | .clk_ref = &sys_clkin_ck, | ||
918 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_USB, | 918 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_USB, |
919 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), | 919 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), |
920 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_USB, | 920 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_USB, |
@@ -927,13 +927,12 @@ static struct dpll_data dpll_usb_dd = { | |||
927 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, | 927 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, |
928 | .max_divider = OMAP4430_MAX_DPLL_DIV, | 928 | .max_divider = OMAP4430_MAX_DPLL_DIV, |
929 | .min_divider = 1, | 929 | .min_divider = 1, |
930 | .flags = DPLL_J_TYPE | DPLL_NO_DCO_SEL | ||
931 | }; | 930 | }; |
932 | 931 | ||
933 | 932 | ||
934 | static struct clk dpll_usb_ck = { | 933 | static struct clk dpll_usb_ck = { |
935 | .name = "dpll_usb_ck", | 934 | .name = "dpll_usb_ck", |
936 | .parent = &dpll_sys_ref_clk, | 935 | .parent = &sys_clkin_ck, |
937 | .dpll_data = &dpll_usb_dd, | 936 | .dpll_data = &dpll_usb_dd, |
938 | .init = &omap2_init_dpll_parent, | 937 | .init = &omap2_init_dpll_parent, |
939 | .ops = &clkops_omap3_noncore_dpll_ops, | 938 | .ops = &clkops_omap3_noncore_dpll_ops, |
@@ -1222,7 +1221,7 @@ static struct clk per_abe_24m_fclk = { | |||
1222 | static const struct clksel pmd_stm_clock_mux_sel[] = { | 1221 | static const struct clksel pmd_stm_clock_mux_sel[] = { |
1223 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, | 1222 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
1224 | { .parent = &dpll_core_m6_ck, .rates = div_1_1_rates }, | 1223 | { .parent = &dpll_core_m6_ck, .rates = div_1_1_rates }, |
1225 | { .parent = &dpll_per_m7_ck, .rates = div_1_2_rates }, | 1224 | { .parent = &tie_low_clock_ck, .rates = div_1_2_rates }, |
1226 | { .parent = NULL }, | 1225 | { .parent = NULL }, |
1227 | }; | 1226 | }; |
1228 | 1227 | ||
@@ -1240,10 +1239,15 @@ static struct clk pmd_trace_clk_mux_ck = { | |||
1240 | .recalc = &followparent_recalc, | 1239 | .recalc = &followparent_recalc, |
1241 | }; | 1240 | }; |
1242 | 1241 | ||
1242 | static const struct clksel syc_clk_div_div[] = { | ||
1243 | { .parent = &sys_clkin_ck, .rates = div2_1to2_rates }, | ||
1244 | { .parent = NULL }, | ||
1245 | }; | ||
1246 | |||
1243 | static struct clk syc_clk_div_ck = { | 1247 | static struct clk syc_clk_div_ck = { |
1244 | .name = "syc_clk_div_ck", | 1248 | .name = "syc_clk_div_ck", |
1245 | .parent = &sys_clkin_ck, | 1249 | .parent = &sys_clkin_ck, |
1246 | .clksel = dpll_sys_ref_clk_div, | 1250 | .clksel = syc_clk_div_div, |
1247 | .clksel_reg = OMAP4430_CM_ABE_DSS_SYS_CLKSEL, | 1251 | .clksel_reg = OMAP4430_CM_ABE_DSS_SYS_CLKSEL, |
1248 | .clksel_mask = OMAP4430_CLKSEL_0_0_MASK, | 1252 | .clksel_mask = OMAP4430_CLKSEL_0_0_MASK, |
1249 | .ops = &clkops_null, | 1253 | .ops = &clkops_null, |
@@ -1284,13 +1288,13 @@ static struct clk aess_fck = { | |||
1284 | .recalc = &followparent_recalc, | 1288 | .recalc = &followparent_recalc, |
1285 | }; | 1289 | }; |
1286 | 1290 | ||
1287 | static struct clk cust_efuse_fck = { | 1291 | static struct clk bandgap_fclk = { |
1288 | .name = "cust_efuse_fck", | 1292 | .name = "bandgap_fclk", |
1289 | .ops = &clkops_omap2_dflt, | 1293 | .ops = &clkops_omap2_dflt, |
1290 | .enable_reg = OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL, | 1294 | .enable_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, |
1291 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 1295 | .enable_bit = OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT, |
1292 | .clkdm_name = "l4_cefuse_clkdm", | 1296 | .clkdm_name = "l4_wkup_clkdm", |
1293 | .parent = &sys_clkin_ck, | 1297 | .parent = &sys_32k_ck, |
1294 | .recalc = &followparent_recalc, | 1298 | .recalc = &followparent_recalc, |
1295 | }; | 1299 | }; |
1296 | 1300 | ||
@@ -1344,6 +1348,56 @@ static struct clk dmic_fck = { | |||
1344 | .clkdm_name = "abe_clkdm", | 1348 | .clkdm_name = "abe_clkdm", |
1345 | }; | 1349 | }; |
1346 | 1350 | ||
1351 | static struct clk dsp_fck = { | ||
1352 | .name = "dsp_fck", | ||
1353 | .ops = &clkops_omap2_dflt, | ||
1354 | .enable_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL, | ||
1355 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | ||
1356 | .clkdm_name = "tesla_clkdm", | ||
1357 | .parent = &dpll_iva_m4_ck, | ||
1358 | .recalc = &followparent_recalc, | ||
1359 | }; | ||
1360 | |||
1361 | static struct clk dss_sys_clk = { | ||
1362 | .name = "dss_sys_clk", | ||
1363 | .ops = &clkops_omap2_dflt, | ||
1364 | .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1365 | .enable_bit = OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT, | ||
1366 | .clkdm_name = "l3_dss_clkdm", | ||
1367 | .parent = &syc_clk_div_ck, | ||
1368 | .recalc = &followparent_recalc, | ||
1369 | }; | ||
1370 | |||
1371 | static struct clk dss_tv_clk = { | ||
1372 | .name = "dss_tv_clk", | ||
1373 | .ops = &clkops_omap2_dflt, | ||
1374 | .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1375 | .enable_bit = OMAP4430_OPTFCLKEN_TV_CLK_SHIFT, | ||
1376 | .clkdm_name = "l3_dss_clkdm", | ||
1377 | .parent = &extalt_clkin_ck, | ||
1378 | .recalc = &followparent_recalc, | ||
1379 | }; | ||
1380 | |||
1381 | static struct clk dss_dss_clk = { | ||
1382 | .name = "dss_dss_clk", | ||
1383 | .ops = &clkops_omap2_dflt, | ||
1384 | .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1385 | .enable_bit = OMAP4430_OPTFCLKEN_DSSCLK_SHIFT, | ||
1386 | .clkdm_name = "l3_dss_clkdm", | ||
1387 | .parent = &dpll_per_m5_ck, | ||
1388 | .recalc = &followparent_recalc, | ||
1389 | }; | ||
1390 | |||
1391 | static struct clk dss_48mhz_clk = { | ||
1392 | .name = "dss_48mhz_clk", | ||
1393 | .ops = &clkops_omap2_dflt, | ||
1394 | .enable_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1395 | .enable_bit = OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT, | ||
1396 | .clkdm_name = "l3_dss_clkdm", | ||
1397 | .parent = &func_48mc_fclk, | ||
1398 | .recalc = &followparent_recalc, | ||
1399 | }; | ||
1400 | |||
1347 | static struct clk dss_fck = { | 1401 | static struct clk dss_fck = { |
1348 | .name = "dss_fck", | 1402 | .name = "dss_fck", |
1349 | .ops = &clkops_omap2_dflt, | 1403 | .ops = &clkops_omap2_dflt, |
@@ -1354,18 +1408,18 @@ static struct clk dss_fck = { | |||
1354 | .recalc = &followparent_recalc, | 1408 | .recalc = &followparent_recalc, |
1355 | }; | 1409 | }; |
1356 | 1410 | ||
1357 | static struct clk ducati_ick = { | 1411 | static struct clk efuse_ctrl_cust_fck = { |
1358 | .name = "ducati_ick", | 1412 | .name = "efuse_ctrl_cust_fck", |
1359 | .ops = &clkops_omap2_dflt, | 1413 | .ops = &clkops_omap2_dflt, |
1360 | .enable_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL, | 1414 | .enable_reg = OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL, |
1361 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1415 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
1362 | .clkdm_name = "ducati_clkdm", | 1416 | .clkdm_name = "l4_cefuse_clkdm", |
1363 | .parent = &ducati_clk_mux_ck, | 1417 | .parent = &sys_clkin_ck, |
1364 | .recalc = &followparent_recalc, | 1418 | .recalc = &followparent_recalc, |
1365 | }; | 1419 | }; |
1366 | 1420 | ||
1367 | static struct clk emif1_ick = { | 1421 | static struct clk emif1_fck = { |
1368 | .name = "emif1_ick", | 1422 | .name = "emif1_fck", |
1369 | .ops = &clkops_omap2_dflt, | 1423 | .ops = &clkops_omap2_dflt, |
1370 | .enable_reg = OMAP4430_CM_MEMIF_EMIF_1_CLKCTRL, | 1424 | .enable_reg = OMAP4430_CM_MEMIF_EMIF_1_CLKCTRL, |
1371 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1425 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
@@ -1375,8 +1429,8 @@ static struct clk emif1_ick = { | |||
1375 | .recalc = &followparent_recalc, | 1429 | .recalc = &followparent_recalc, |
1376 | }; | 1430 | }; |
1377 | 1431 | ||
1378 | static struct clk emif2_ick = { | 1432 | static struct clk emif2_fck = { |
1379 | .name = "emif2_ick", | 1433 | .name = "emif2_fck", |
1380 | .ops = &clkops_omap2_dflt, | 1434 | .ops = &clkops_omap2_dflt, |
1381 | .enable_reg = OMAP4430_CM_MEMIF_EMIF_2_CLKCTRL, | 1435 | .enable_reg = OMAP4430_CM_MEMIF_EMIF_2_CLKCTRL, |
1382 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1436 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
@@ -1407,42 +1461,24 @@ static struct clk fdif_fck = { | |||
1407 | .clkdm_name = "iss_clkdm", | 1461 | .clkdm_name = "iss_clkdm", |
1408 | }; | 1462 | }; |
1409 | 1463 | ||
1410 | static const struct clksel per_sgx_fclk_div[] = { | 1464 | static struct clk fpka_fck = { |
1411 | { .parent = &dpll_per_m2x2_ck, .rates = div3_1to4_rates }, | 1465 | .name = "fpka_fck", |
1412 | { .parent = NULL }, | 1466 | .ops = &clkops_omap2_dflt, |
1413 | }; | 1467 | .enable_reg = OMAP4430_CM_L4SEC_PKAEIP29_CLKCTRL, |
1414 | 1468 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | |
1415 | static struct clk per_sgx_fclk = { | 1469 | .clkdm_name = "l4_secure_clkdm", |
1416 | .name = "per_sgx_fclk", | 1470 | .parent = &l4_div_ck, |
1417 | .parent = &dpll_per_m2x2_ck, | 1471 | .recalc = &followparent_recalc, |
1418 | .clksel = per_sgx_fclk_div, | ||
1419 | .clksel_reg = OMAP4430_CM_GFX_GFX_CLKCTRL, | ||
1420 | .clksel_mask = OMAP4430_CLKSEL_PER_192M_MASK, | ||
1421 | .ops = &clkops_null, | ||
1422 | .recalc = &omap2_clksel_recalc, | ||
1423 | .round_rate = &omap2_clksel_round_rate, | ||
1424 | .set_rate = &omap2_clksel_set_rate, | ||
1425 | }; | ||
1426 | |||
1427 | static const struct clksel sgx_clk_mux_sel[] = { | ||
1428 | { .parent = &dpll_core_m7_ck, .rates = div_1_0_rates }, | ||
1429 | { .parent = &per_sgx_fclk, .rates = div_1_1_rates }, | ||
1430 | { .parent = NULL }, | ||
1431 | }; | 1472 | }; |
1432 | 1473 | ||
1433 | /* Merged sgx_clk_mux into gfx */ | 1474 | static struct clk gpio1_dbclk = { |
1434 | static struct clk gfx_fck = { | 1475 | .name = "gpio1_dbclk", |
1435 | .name = "gfx_fck", | ||
1436 | .parent = &dpll_core_m7_ck, | ||
1437 | .clksel = sgx_clk_mux_sel, | ||
1438 | .init = &omap2_init_clksel_parent, | ||
1439 | .clksel_reg = OMAP4430_CM_GFX_GFX_CLKCTRL, | ||
1440 | .clksel_mask = OMAP4430_CLKSEL_SGX_FCLK_MASK, | ||
1441 | .ops = &clkops_omap2_dflt, | 1476 | .ops = &clkops_omap2_dflt, |
1442 | .recalc = &omap2_clksel_recalc, | 1477 | .enable_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL, |
1443 | .enable_reg = OMAP4430_CM_GFX_GFX_CLKCTRL, | 1478 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, |
1444 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 1479 | .clkdm_name = "l4_wkup_clkdm", |
1445 | .clkdm_name = "l3_gfx_clkdm", | 1480 | .parent = &sys_32k_ck, |
1481 | .recalc = &followparent_recalc, | ||
1446 | }; | 1482 | }; |
1447 | 1483 | ||
1448 | static struct clk gpio1_ick = { | 1484 | static struct clk gpio1_ick = { |
@@ -1455,6 +1491,16 @@ static struct clk gpio1_ick = { | |||
1455 | .recalc = &followparent_recalc, | 1491 | .recalc = &followparent_recalc, |
1456 | }; | 1492 | }; |
1457 | 1493 | ||
1494 | static struct clk gpio2_dbclk = { | ||
1495 | .name = "gpio2_dbclk", | ||
1496 | .ops = &clkops_omap2_dflt, | ||
1497 | .enable_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL, | ||
1498 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, | ||
1499 | .clkdm_name = "l4_per_clkdm", | ||
1500 | .parent = &sys_32k_ck, | ||
1501 | .recalc = &followparent_recalc, | ||
1502 | }; | ||
1503 | |||
1458 | static struct clk gpio2_ick = { | 1504 | static struct clk gpio2_ick = { |
1459 | .name = "gpio2_ick", | 1505 | .name = "gpio2_ick", |
1460 | .ops = &clkops_omap2_dflt, | 1506 | .ops = &clkops_omap2_dflt, |
@@ -1465,6 +1511,16 @@ static struct clk gpio2_ick = { | |||
1465 | .recalc = &followparent_recalc, | 1511 | .recalc = &followparent_recalc, |
1466 | }; | 1512 | }; |
1467 | 1513 | ||
1514 | static struct clk gpio3_dbclk = { | ||
1515 | .name = "gpio3_dbclk", | ||
1516 | .ops = &clkops_omap2_dflt, | ||
1517 | .enable_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL, | ||
1518 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, | ||
1519 | .clkdm_name = "l4_per_clkdm", | ||
1520 | .parent = &sys_32k_ck, | ||
1521 | .recalc = &followparent_recalc, | ||
1522 | }; | ||
1523 | |||
1468 | static struct clk gpio3_ick = { | 1524 | static struct clk gpio3_ick = { |
1469 | .name = "gpio3_ick", | 1525 | .name = "gpio3_ick", |
1470 | .ops = &clkops_omap2_dflt, | 1526 | .ops = &clkops_omap2_dflt, |
@@ -1475,6 +1531,16 @@ static struct clk gpio3_ick = { | |||
1475 | .recalc = &followparent_recalc, | 1531 | .recalc = &followparent_recalc, |
1476 | }; | 1532 | }; |
1477 | 1533 | ||
1534 | static struct clk gpio4_dbclk = { | ||
1535 | .name = "gpio4_dbclk", | ||
1536 | .ops = &clkops_omap2_dflt, | ||
1537 | .enable_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL, | ||
1538 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, | ||
1539 | .clkdm_name = "l4_per_clkdm", | ||
1540 | .parent = &sys_32k_ck, | ||
1541 | .recalc = &followparent_recalc, | ||
1542 | }; | ||
1543 | |||
1478 | static struct clk gpio4_ick = { | 1544 | static struct clk gpio4_ick = { |
1479 | .name = "gpio4_ick", | 1545 | .name = "gpio4_ick", |
1480 | .ops = &clkops_omap2_dflt, | 1546 | .ops = &clkops_omap2_dflt, |
@@ -1485,6 +1551,16 @@ static struct clk gpio4_ick = { | |||
1485 | .recalc = &followparent_recalc, | 1551 | .recalc = &followparent_recalc, |
1486 | }; | 1552 | }; |
1487 | 1553 | ||
1554 | static struct clk gpio5_dbclk = { | ||
1555 | .name = "gpio5_dbclk", | ||
1556 | .ops = &clkops_omap2_dflt, | ||
1557 | .enable_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL, | ||
1558 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, | ||
1559 | .clkdm_name = "l4_per_clkdm", | ||
1560 | .parent = &sys_32k_ck, | ||
1561 | .recalc = &followparent_recalc, | ||
1562 | }; | ||
1563 | |||
1488 | static struct clk gpio5_ick = { | 1564 | static struct clk gpio5_ick = { |
1489 | .name = "gpio5_ick", | 1565 | .name = "gpio5_ick", |
1490 | .ops = &clkops_omap2_dflt, | 1566 | .ops = &clkops_omap2_dflt, |
@@ -1495,6 +1571,16 @@ static struct clk gpio5_ick = { | |||
1495 | .recalc = &followparent_recalc, | 1571 | .recalc = &followparent_recalc, |
1496 | }; | 1572 | }; |
1497 | 1573 | ||
1574 | static struct clk gpio6_dbclk = { | ||
1575 | .name = "gpio6_dbclk", | ||
1576 | .ops = &clkops_omap2_dflt, | ||
1577 | .enable_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL, | ||
1578 | .enable_bit = OMAP4430_OPTFCLKEN_DBCLK_SHIFT, | ||
1579 | .clkdm_name = "l4_per_clkdm", | ||
1580 | .parent = &sys_32k_ck, | ||
1581 | .recalc = &followparent_recalc, | ||
1582 | }; | ||
1583 | |||
1498 | static struct clk gpio6_ick = { | 1584 | static struct clk gpio6_ick = { |
1499 | .name = "gpio6_ick", | 1585 | .name = "gpio6_ick", |
1500 | .ops = &clkops_omap2_dflt, | 1586 | .ops = &clkops_omap2_dflt, |
@@ -1515,214 +1601,25 @@ static struct clk gpmc_ick = { | |||
1515 | .recalc = &followparent_recalc, | 1601 | .recalc = &followparent_recalc, |
1516 | }; | 1602 | }; |
1517 | 1603 | ||
1518 | static const struct clksel dmt1_clk_mux_sel[] = { | 1604 | static const struct clksel sgx_clk_mux_sel[] = { |
1519 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, | 1605 | { .parent = &dpll_core_m7_ck, .rates = div_1_0_rates }, |
1520 | { .parent = &sys_32k_ck, .rates = div_1_1_rates }, | 1606 | { .parent = &dpll_per_m7_ck, .rates = div_1_1_rates }, |
1521 | { .parent = NULL }, | ||
1522 | }; | ||
1523 | |||
1524 | /* | ||
1525 | * Merged dmt1_clk_mux into gptimer1 | ||
1526 | * gptimer1 renamed temporarily into gpt1 to match OMAP3 convention | ||
1527 | */ | ||
1528 | static struct clk gpt1_fck = { | ||
1529 | .name = "gpt1_fck", | ||
1530 | .parent = &sys_clkin_ck, | ||
1531 | .clksel = dmt1_clk_mux_sel, | ||
1532 | .init = &omap2_init_clksel_parent, | ||
1533 | .clksel_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL, | ||
1534 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
1535 | .ops = &clkops_omap2_dflt, | ||
1536 | .recalc = &omap2_clksel_recalc, | ||
1537 | .enable_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL, | ||
1538 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1539 | .clkdm_name = "l4_wkup_clkdm", | ||
1540 | }; | ||
1541 | |||
1542 | /* | ||
1543 | * Merged cm2_dm10_mux into gptimer10 | ||
1544 | * gptimer10 renamed temporarily into gpt10 to match OMAP3 convention | ||
1545 | */ | ||
1546 | static struct clk gpt10_fck = { | ||
1547 | .name = "gpt10_fck", | ||
1548 | .parent = &sys_clkin_ck, | ||
1549 | .clksel = dmt1_clk_mux_sel, | ||
1550 | .init = &omap2_init_clksel_parent, | ||
1551 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL, | ||
1552 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
1553 | .ops = &clkops_omap2_dflt, | ||
1554 | .recalc = &omap2_clksel_recalc, | ||
1555 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL, | ||
1556 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1557 | .clkdm_name = "l4_per_clkdm", | ||
1558 | }; | ||
1559 | |||
1560 | /* | ||
1561 | * Merged cm2_dm11_mux into gptimer11 | ||
1562 | * gptimer11 renamed temporarily into gpt11 to match OMAP3 convention | ||
1563 | */ | ||
1564 | static struct clk gpt11_fck = { | ||
1565 | .name = "gpt11_fck", | ||
1566 | .parent = &sys_clkin_ck, | ||
1567 | .clksel = dmt1_clk_mux_sel, | ||
1568 | .init = &omap2_init_clksel_parent, | ||
1569 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL, | ||
1570 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
1571 | .ops = &clkops_omap2_dflt, | ||
1572 | .recalc = &omap2_clksel_recalc, | ||
1573 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL, | ||
1574 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1575 | .clkdm_name = "l4_per_clkdm", | ||
1576 | }; | ||
1577 | |||
1578 | /* | ||
1579 | * Merged cm2_dm2_mux into gptimer2 | ||
1580 | * gptimer2 renamed temporarily into gpt2 to match OMAP3 convention | ||
1581 | */ | ||
1582 | static struct clk gpt2_fck = { | ||
1583 | .name = "gpt2_fck", | ||
1584 | .parent = &sys_clkin_ck, | ||
1585 | .clksel = dmt1_clk_mux_sel, | ||
1586 | .init = &omap2_init_clksel_parent, | ||
1587 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL, | ||
1588 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
1589 | .ops = &clkops_omap2_dflt, | ||
1590 | .recalc = &omap2_clksel_recalc, | ||
1591 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL, | ||
1592 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1593 | .clkdm_name = "l4_per_clkdm", | ||
1594 | }; | ||
1595 | |||
1596 | /* | ||
1597 | * Merged cm2_dm3_mux into gptimer3 | ||
1598 | * gptimer3 renamed temporarily into gpt3 to match OMAP3 convention | ||
1599 | */ | ||
1600 | static struct clk gpt3_fck = { | ||
1601 | .name = "gpt3_fck", | ||
1602 | .parent = &sys_clkin_ck, | ||
1603 | .clksel = dmt1_clk_mux_sel, | ||
1604 | .init = &omap2_init_clksel_parent, | ||
1605 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL, | ||
1606 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
1607 | .ops = &clkops_omap2_dflt, | ||
1608 | .recalc = &omap2_clksel_recalc, | ||
1609 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL, | ||
1610 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1611 | .clkdm_name = "l4_per_clkdm", | ||
1612 | }; | ||
1613 | |||
1614 | /* | ||
1615 | * Merged cm2_dm4_mux into gptimer4 | ||
1616 | * gptimer4 renamed temporarily into gpt4 to match OMAP3 convention | ||
1617 | */ | ||
1618 | static struct clk gpt4_fck = { | ||
1619 | .name = "gpt4_fck", | ||
1620 | .parent = &sys_clkin_ck, | ||
1621 | .clksel = dmt1_clk_mux_sel, | ||
1622 | .init = &omap2_init_clksel_parent, | ||
1623 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL, | ||
1624 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
1625 | .ops = &clkops_omap2_dflt, | ||
1626 | .recalc = &omap2_clksel_recalc, | ||
1627 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL, | ||
1628 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1629 | .clkdm_name = "l4_per_clkdm", | ||
1630 | }; | ||
1631 | |||
1632 | static const struct clksel timer5_sync_mux_sel[] = { | ||
1633 | { .parent = &syc_clk_div_ck, .rates = div_1_0_rates }, | ||
1634 | { .parent = &sys_32k_ck, .rates = div_1_1_rates }, | ||
1635 | { .parent = NULL }, | 1607 | { .parent = NULL }, |
1636 | }; | 1608 | }; |
1637 | 1609 | ||
1638 | /* | 1610 | /* Merged sgx_clk_mux into gpu */ |
1639 | * Merged timer5_sync_mux into gptimer5 | 1611 | static struct clk gpu_fck = { |
1640 | * gptimer5 renamed temporarily into gpt5 to match OMAP3 convention | 1612 | .name = "gpu_fck", |
1641 | */ | 1613 | .parent = &dpll_core_m7_ck, |
1642 | static struct clk gpt5_fck = { | 1614 | .clksel = sgx_clk_mux_sel, |
1643 | .name = "gpt5_fck", | ||
1644 | .parent = &syc_clk_div_ck, | ||
1645 | .clksel = timer5_sync_mux_sel, | ||
1646 | .init = &omap2_init_clksel_parent, | ||
1647 | .clksel_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL, | ||
1648 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
1649 | .ops = &clkops_omap2_dflt, | ||
1650 | .recalc = &omap2_clksel_recalc, | ||
1651 | .enable_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL, | ||
1652 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1653 | .clkdm_name = "abe_clkdm", | ||
1654 | }; | ||
1655 | |||
1656 | /* | ||
1657 | * Merged timer6_sync_mux into gptimer6 | ||
1658 | * gptimer6 renamed temporarily into gpt6 to match OMAP3 convention | ||
1659 | */ | ||
1660 | static struct clk gpt6_fck = { | ||
1661 | .name = "gpt6_fck", | ||
1662 | .parent = &syc_clk_div_ck, | ||
1663 | .clksel = timer5_sync_mux_sel, | ||
1664 | .init = &omap2_init_clksel_parent, | ||
1665 | .clksel_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL, | ||
1666 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
1667 | .ops = &clkops_omap2_dflt, | ||
1668 | .recalc = &omap2_clksel_recalc, | ||
1669 | .enable_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL, | ||
1670 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1671 | .clkdm_name = "abe_clkdm", | ||
1672 | }; | ||
1673 | |||
1674 | /* | ||
1675 | * Merged timer7_sync_mux into gptimer7 | ||
1676 | * gptimer7 renamed temporarily into gpt7 to match OMAP3 convention | ||
1677 | */ | ||
1678 | static struct clk gpt7_fck = { | ||
1679 | .name = "gpt7_fck", | ||
1680 | .parent = &syc_clk_div_ck, | ||
1681 | .clksel = timer5_sync_mux_sel, | ||
1682 | .init = &omap2_init_clksel_parent, | ||
1683 | .clksel_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL, | ||
1684 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
1685 | .ops = &clkops_omap2_dflt, | ||
1686 | .recalc = &omap2_clksel_recalc, | ||
1687 | .enable_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL, | ||
1688 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1689 | .clkdm_name = "abe_clkdm", | ||
1690 | }; | ||
1691 | |||
1692 | /* | ||
1693 | * Merged timer8_sync_mux into gptimer8 | ||
1694 | * gptimer8 renamed temporarily into gpt8 to match OMAP3 convention | ||
1695 | */ | ||
1696 | static struct clk gpt8_fck = { | ||
1697 | .name = "gpt8_fck", | ||
1698 | .parent = &syc_clk_div_ck, | ||
1699 | .clksel = timer5_sync_mux_sel, | ||
1700 | .init = &omap2_init_clksel_parent, | ||
1701 | .clksel_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL, | ||
1702 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
1703 | .ops = &clkops_omap2_dflt, | ||
1704 | .recalc = &omap2_clksel_recalc, | ||
1705 | .enable_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL, | ||
1706 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1707 | .clkdm_name = "abe_clkdm", | ||
1708 | }; | ||
1709 | |||
1710 | /* | ||
1711 | * Merged cm2_dm9_mux into gptimer9 | ||
1712 | * gptimer9 renamed temporarily into gpt9 to match OMAP3 convention | ||
1713 | */ | ||
1714 | static struct clk gpt9_fck = { | ||
1715 | .name = "gpt9_fck", | ||
1716 | .parent = &sys_clkin_ck, | ||
1717 | .clksel = dmt1_clk_mux_sel, | ||
1718 | .init = &omap2_init_clksel_parent, | 1615 | .init = &omap2_init_clksel_parent, |
1719 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL, | 1616 | .clksel_reg = OMAP4430_CM_GFX_GFX_CLKCTRL, |
1720 | .clksel_mask = OMAP4430_CLKSEL_MASK, | 1617 | .clksel_mask = OMAP4430_CLKSEL_SGX_FCLK_MASK, |
1721 | .ops = &clkops_omap2_dflt, | 1618 | .ops = &clkops_omap2_dflt, |
1722 | .recalc = &omap2_clksel_recalc, | 1619 | .recalc = &omap2_clksel_recalc, |
1723 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL, | 1620 | .enable_reg = OMAP4430_CM_GFX_GFX_CLKCTRL, |
1724 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 1621 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
1725 | .clkdm_name = "l4_per_clkdm", | 1622 | .clkdm_name = "l3_gfx_clkdm", |
1726 | }; | 1623 | }; |
1727 | 1624 | ||
1728 | static struct clk hdq1w_fck = { | 1625 | static struct clk hdq1w_fck = { |
@@ -1735,11 +1632,16 @@ static struct clk hdq1w_fck = { | |||
1735 | .recalc = &followparent_recalc, | 1632 | .recalc = &followparent_recalc, |
1736 | }; | 1633 | }; |
1737 | 1634 | ||
1635 | static const struct clksel hsi_fclk_div[] = { | ||
1636 | { .parent = &dpll_per_m2x2_ck, .rates = div3_1to4_rates }, | ||
1637 | { .parent = NULL }, | ||
1638 | }; | ||
1639 | |||
1738 | /* Merged hsi_fclk into hsi */ | 1640 | /* Merged hsi_fclk into hsi */ |
1739 | static struct clk hsi_ick = { | 1641 | static struct clk hsi_fck = { |
1740 | .name = "hsi_ick", | 1642 | .name = "hsi_fck", |
1741 | .parent = &dpll_per_m2x2_ck, | 1643 | .parent = &dpll_per_m2x2_ck, |
1742 | .clksel = per_sgx_fclk_div, | 1644 | .clksel = hsi_fclk_div, |
1743 | .clksel_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL, | 1645 | .clksel_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL, |
1744 | .clksel_mask = OMAP4430_CLKSEL_24_25_MASK, | 1646 | .clksel_mask = OMAP4430_CLKSEL_24_25_MASK, |
1745 | .ops = &clkops_omap2_dflt, | 1647 | .ops = &clkops_omap2_dflt, |
@@ -1791,6 +1693,26 @@ static struct clk i2c4_fck = { | |||
1791 | .recalc = &followparent_recalc, | 1693 | .recalc = &followparent_recalc, |
1792 | }; | 1694 | }; |
1793 | 1695 | ||
1696 | static struct clk ipu_fck = { | ||
1697 | .name = "ipu_fck", | ||
1698 | .ops = &clkops_omap2_dflt, | ||
1699 | .enable_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL, | ||
1700 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | ||
1701 | .clkdm_name = "ducati_clkdm", | ||
1702 | .parent = &ducati_clk_mux_ck, | ||
1703 | .recalc = &followparent_recalc, | ||
1704 | }; | ||
1705 | |||
1706 | static struct clk iss_ctrlclk = { | ||
1707 | .name = "iss_ctrlclk", | ||
1708 | .ops = &clkops_omap2_dflt, | ||
1709 | .enable_reg = OMAP4430_CM_CAM_ISS_CLKCTRL, | ||
1710 | .enable_bit = OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT, | ||
1711 | .clkdm_name = "iss_clkdm", | ||
1712 | .parent = &func_96m_fclk, | ||
1713 | .recalc = &followparent_recalc, | ||
1714 | }; | ||
1715 | |||
1794 | static struct clk iss_fck = { | 1716 | static struct clk iss_fck = { |
1795 | .name = "iss_fck", | 1717 | .name = "iss_fck", |
1796 | .ops = &clkops_omap2_dflt, | 1718 | .ops = &clkops_omap2_dflt, |
@@ -1801,8 +1723,8 @@ static struct clk iss_fck = { | |||
1801 | .recalc = &followparent_recalc, | 1723 | .recalc = &followparent_recalc, |
1802 | }; | 1724 | }; |
1803 | 1725 | ||
1804 | static struct clk ivahd_ick = { | 1726 | static struct clk iva_fck = { |
1805 | .name = "ivahd_ick", | 1727 | .name = "iva_fck", |
1806 | .ops = &clkops_omap2_dflt, | 1728 | .ops = &clkops_omap2_dflt, |
1807 | .enable_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL, | 1729 | .enable_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL, |
1808 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1730 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
@@ -1811,8 +1733,8 @@ static struct clk ivahd_ick = { | |||
1811 | .recalc = &followparent_recalc, | 1733 | .recalc = &followparent_recalc, |
1812 | }; | 1734 | }; |
1813 | 1735 | ||
1814 | static struct clk keyboard_fck = { | 1736 | static struct clk kbd_fck = { |
1815 | .name = "keyboard_fck", | 1737 | .name = "kbd_fck", |
1816 | .ops = &clkops_omap2_dflt, | 1738 | .ops = &clkops_omap2_dflt, |
1817 | .enable_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL, | 1739 | .enable_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL, |
1818 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 1740 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
@@ -1821,8 +1743,8 @@ static struct clk keyboard_fck = { | |||
1821 | .recalc = &followparent_recalc, | 1743 | .recalc = &followparent_recalc, |
1822 | }; | 1744 | }; |
1823 | 1745 | ||
1824 | static struct clk l3_instr_interconnect_ick = { | 1746 | static struct clk l3_instr_ick = { |
1825 | .name = "l3_instr_interconnect_ick", | 1747 | .name = "l3_instr_ick", |
1826 | .ops = &clkops_omap2_dflt, | 1748 | .ops = &clkops_omap2_dflt, |
1827 | .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL, | 1749 | .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL, |
1828 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1750 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
@@ -1831,8 +1753,8 @@ static struct clk l3_instr_interconnect_ick = { | |||
1831 | .recalc = &followparent_recalc, | 1753 | .recalc = &followparent_recalc, |
1832 | }; | 1754 | }; |
1833 | 1755 | ||
1834 | static struct clk l3_interconnect_3_ick = { | 1756 | static struct clk l3_main_3_ick = { |
1835 | .name = "l3_interconnect_3_ick", | 1757 | .name = "l3_main_3_ick", |
1836 | .ops = &clkops_omap2_dflt, | 1758 | .ops = &clkops_omap2_dflt, |
1837 | .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL, | 1759 | .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL, |
1838 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1760 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
@@ -2005,6 +1927,16 @@ static struct clk mcbsp4_fck = { | |||
2005 | .clkdm_name = "l4_per_clkdm", | 1927 | .clkdm_name = "l4_per_clkdm", |
2006 | }; | 1928 | }; |
2007 | 1929 | ||
1930 | static struct clk mcpdm_fck = { | ||
1931 | .name = "mcpdm_fck", | ||
1932 | .ops = &clkops_omap2_dflt, | ||
1933 | .enable_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL, | ||
1934 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
1935 | .clkdm_name = "abe_clkdm", | ||
1936 | .parent = &pad_clks_ck, | ||
1937 | .recalc = &followparent_recalc, | ||
1938 | }; | ||
1939 | |||
2008 | static struct clk mcspi1_fck = { | 1940 | static struct clk mcspi1_fck = { |
2009 | .name = "mcspi1_fck", | 1941 | .name = "mcspi1_fck", |
2010 | .ops = &clkops_omap2_dflt, | 1942 | .ops = &clkops_omap2_dflt, |
@@ -2105,33 +2037,33 @@ static struct clk mmc5_fck = { | |||
2105 | .recalc = &followparent_recalc, | 2037 | .recalc = &followparent_recalc, |
2106 | }; | 2038 | }; |
2107 | 2039 | ||
2108 | static struct clk ocp_wp1_ick = { | 2040 | static struct clk ocp2scp_usb_phy_phy_48m = { |
2109 | .name = "ocp_wp1_ick", | 2041 | .name = "ocp2scp_usb_phy_phy_48m", |
2110 | .ops = &clkops_omap2_dflt, | 2042 | .ops = &clkops_omap2_dflt, |
2111 | .enable_reg = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL, | 2043 | .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, |
2112 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 2044 | .enable_bit = OMAP4430_OPTFCLKEN_PHY_48M_SHIFT, |
2113 | .clkdm_name = "l3_instr_clkdm", | 2045 | .clkdm_name = "l3_init_clkdm", |
2114 | .parent = &l3_div_ck, | 2046 | .parent = &func_48m_fclk, |
2115 | .recalc = &followparent_recalc, | 2047 | .recalc = &followparent_recalc, |
2116 | }; | 2048 | }; |
2117 | 2049 | ||
2118 | static struct clk pdm_fck = { | 2050 | static struct clk ocp2scp_usb_phy_ick = { |
2119 | .name = "pdm_fck", | 2051 | .name = "ocp2scp_usb_phy_ick", |
2120 | .ops = &clkops_omap2_dflt, | 2052 | .ops = &clkops_omap2_dflt, |
2121 | .enable_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL, | 2053 | .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, |
2122 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2054 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
2123 | .clkdm_name = "abe_clkdm", | 2055 | .clkdm_name = "l3_init_clkdm", |
2124 | .parent = &pad_clks_ck, | 2056 | .parent = &l4_div_ck, |
2125 | .recalc = &followparent_recalc, | 2057 | .recalc = &followparent_recalc, |
2126 | }; | 2058 | }; |
2127 | 2059 | ||
2128 | static struct clk pkaeip29_fck = { | 2060 | static struct clk ocp_wp_noc_ick = { |
2129 | .name = "pkaeip29_fck", | 2061 | .name = "ocp_wp_noc_ick", |
2130 | .ops = &clkops_omap2_dflt, | 2062 | .ops = &clkops_omap2_dflt, |
2131 | .enable_reg = OMAP4430_CM_L4SEC_PKAEIP29_CLKCTRL, | 2063 | .enable_reg = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL, |
2132 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2064 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
2133 | .clkdm_name = "l4_secure_clkdm", | 2065 | .clkdm_name = "l3_instr_clkdm", |
2134 | .parent = &l4_div_ck, | 2066 | .parent = &l3_div_ck, |
2135 | .recalc = &followparent_recalc, | 2067 | .recalc = &followparent_recalc, |
2136 | }; | 2068 | }; |
2137 | 2069 | ||
@@ -2145,8 +2077,8 @@ static struct clk rng_ick = { | |||
2145 | .recalc = &followparent_recalc, | 2077 | .recalc = &followparent_recalc, |
2146 | }; | 2078 | }; |
2147 | 2079 | ||
2148 | static struct clk sha2md51_fck = { | 2080 | static struct clk sha2md5_fck = { |
2149 | .name = "sha2md51_fck", | 2081 | .name = "sha2md5_fck", |
2150 | .ops = &clkops_omap2_dflt, | 2082 | .ops = &clkops_omap2_dflt, |
2151 | .enable_reg = OMAP4430_CM_L4SEC_SHA2MD51_CLKCTRL, | 2083 | .enable_reg = OMAP4430_CM_L4SEC_SHA2MD51_CLKCTRL, |
2152 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2084 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
@@ -2155,8 +2087,8 @@ static struct clk sha2md51_fck = { | |||
2155 | .recalc = &followparent_recalc, | 2087 | .recalc = &followparent_recalc, |
2156 | }; | 2088 | }; |
2157 | 2089 | ||
2158 | static struct clk sl2_ick = { | 2090 | static struct clk sl2if_ick = { |
2159 | .name = "sl2_ick", | 2091 | .name = "sl2if_ick", |
2160 | .ops = &clkops_omap2_dflt, | 2092 | .ops = &clkops_omap2_dflt, |
2161 | .enable_reg = OMAP4430_CM_IVAHD_SL2_CLKCTRL, | 2093 | .enable_reg = OMAP4430_CM_IVAHD_SL2_CLKCTRL, |
2162 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 2094 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
@@ -2165,6 +2097,46 @@ static struct clk sl2_ick = { | |||
2165 | .recalc = &followparent_recalc, | 2097 | .recalc = &followparent_recalc, |
2166 | }; | 2098 | }; |
2167 | 2099 | ||
2100 | static struct clk slimbus1_fclk_1 = { | ||
2101 | .name = "slimbus1_fclk_1", | ||
2102 | .ops = &clkops_omap2_dflt, | ||
2103 | .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL, | ||
2104 | .enable_bit = OMAP4430_OPTFCLKEN_FCLK1_SHIFT, | ||
2105 | .clkdm_name = "abe_clkdm", | ||
2106 | .parent = &func_24m_clk, | ||
2107 | .recalc = &followparent_recalc, | ||
2108 | }; | ||
2109 | |||
2110 | static struct clk slimbus1_fclk_0 = { | ||
2111 | .name = "slimbus1_fclk_0", | ||
2112 | .ops = &clkops_omap2_dflt, | ||
2113 | .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL, | ||
2114 | .enable_bit = OMAP4430_OPTFCLKEN_FCLK0_SHIFT, | ||
2115 | .clkdm_name = "abe_clkdm", | ||
2116 | .parent = &abe_24m_fclk, | ||
2117 | .recalc = &followparent_recalc, | ||
2118 | }; | ||
2119 | |||
2120 | static struct clk slimbus1_fclk_2 = { | ||
2121 | .name = "slimbus1_fclk_2", | ||
2122 | .ops = &clkops_omap2_dflt, | ||
2123 | .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL, | ||
2124 | .enable_bit = OMAP4430_OPTFCLKEN_FCLK2_SHIFT, | ||
2125 | .clkdm_name = "abe_clkdm", | ||
2126 | .parent = &pad_clks_ck, | ||
2127 | .recalc = &followparent_recalc, | ||
2128 | }; | ||
2129 | |||
2130 | static struct clk slimbus1_slimbus_clk = { | ||
2131 | .name = "slimbus1_slimbus_clk", | ||
2132 | .ops = &clkops_omap2_dflt, | ||
2133 | .enable_reg = OMAP4430_CM1_ABE_SLIMBUS_CLKCTRL, | ||
2134 | .enable_bit = OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT, | ||
2135 | .clkdm_name = "abe_clkdm", | ||
2136 | .parent = &slimbus_clk, | ||
2137 | .recalc = &followparent_recalc, | ||
2138 | }; | ||
2139 | |||
2168 | static struct clk slimbus1_fck = { | 2140 | static struct clk slimbus1_fck = { |
2169 | .name = "slimbus1_fck", | 2141 | .name = "slimbus1_fck", |
2170 | .ops = &clkops_omap2_dflt, | 2142 | .ops = &clkops_omap2_dflt, |
@@ -2175,6 +2147,36 @@ static struct clk slimbus1_fck = { | |||
2175 | .recalc = &followparent_recalc, | 2147 | .recalc = &followparent_recalc, |
2176 | }; | 2148 | }; |
2177 | 2149 | ||
2150 | static struct clk slimbus2_fclk_1 = { | ||
2151 | .name = "slimbus2_fclk_1", | ||
2152 | .ops = &clkops_omap2_dflt, | ||
2153 | .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL, | ||
2154 | .enable_bit = OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT, | ||
2155 | .clkdm_name = "l4_per_clkdm", | ||
2156 | .parent = &per_abe_24m_fclk, | ||
2157 | .recalc = &followparent_recalc, | ||
2158 | }; | ||
2159 | |||
2160 | static struct clk slimbus2_fclk_0 = { | ||
2161 | .name = "slimbus2_fclk_0", | ||
2162 | .ops = &clkops_omap2_dflt, | ||
2163 | .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL, | ||
2164 | .enable_bit = OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT, | ||
2165 | .clkdm_name = "l4_per_clkdm", | ||
2166 | .parent = &func_24mc_fclk, | ||
2167 | .recalc = &followparent_recalc, | ||
2168 | }; | ||
2169 | |||
2170 | static struct clk slimbus2_slimbus_clk = { | ||
2171 | .name = "slimbus2_slimbus_clk", | ||
2172 | .ops = &clkops_omap2_dflt, | ||
2173 | .enable_reg = OMAP4430_CM_L4PER_SLIMBUS2_CLKCTRL, | ||
2174 | .enable_bit = OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT, | ||
2175 | .clkdm_name = "l4_per_clkdm", | ||
2176 | .parent = &pad_slimbus_core_clks_ck, | ||
2177 | .recalc = &followparent_recalc, | ||
2178 | }; | ||
2179 | |||
2178 | static struct clk slimbus2_fck = { | 2180 | static struct clk slimbus2_fck = { |
2179 | .name = "slimbus2_fck", | 2181 | .name = "slimbus2_fck", |
2180 | .ops = &clkops_omap2_dflt, | 2182 | .ops = &clkops_omap2_dflt, |
@@ -2185,8 +2187,8 @@ static struct clk slimbus2_fck = { | |||
2185 | .recalc = &followparent_recalc, | 2187 | .recalc = &followparent_recalc, |
2186 | }; | 2188 | }; |
2187 | 2189 | ||
2188 | static struct clk sr_core_fck = { | 2190 | static struct clk smartreflex_core_fck = { |
2189 | .name = "sr_core_fck", | 2191 | .name = "smartreflex_core_fck", |
2190 | .ops = &clkops_omap2_dflt, | 2192 | .ops = &clkops_omap2_dflt, |
2191 | .enable_reg = OMAP4430_CM_ALWON_SR_CORE_CLKCTRL, | 2193 | .enable_reg = OMAP4430_CM_ALWON_SR_CORE_CLKCTRL, |
2192 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2194 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
@@ -2195,8 +2197,8 @@ static struct clk sr_core_fck = { | |||
2195 | .recalc = &followparent_recalc, | 2197 | .recalc = &followparent_recalc, |
2196 | }; | 2198 | }; |
2197 | 2199 | ||
2198 | static struct clk sr_iva_fck = { | 2200 | static struct clk smartreflex_iva_fck = { |
2199 | .name = "sr_iva_fck", | 2201 | .name = "smartreflex_iva_fck", |
2200 | .ops = &clkops_omap2_dflt, | 2202 | .ops = &clkops_omap2_dflt, |
2201 | .enable_reg = OMAP4430_CM_ALWON_SR_IVA_CLKCTRL, | 2203 | .enable_reg = OMAP4430_CM_ALWON_SR_IVA_CLKCTRL, |
2202 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2204 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
@@ -2205,8 +2207,8 @@ static struct clk sr_iva_fck = { | |||
2205 | .recalc = &followparent_recalc, | 2207 | .recalc = &followparent_recalc, |
2206 | }; | 2208 | }; |
2207 | 2209 | ||
2208 | static struct clk sr_mpu_fck = { | 2210 | static struct clk smartreflex_mpu_fck = { |
2209 | .name = "sr_mpu_fck", | 2211 | .name = "smartreflex_mpu_fck", |
2210 | .ops = &clkops_omap2_dflt, | 2212 | .ops = &clkops_omap2_dflt, |
2211 | .enable_reg = OMAP4430_CM_ALWON_SR_MPU_CLKCTRL, | 2213 | .enable_reg = OMAP4430_CM_ALWON_SR_MPU_CLKCTRL, |
2212 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2214 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
@@ -2215,14 +2217,175 @@ static struct clk sr_mpu_fck = { | |||
2215 | .recalc = &followparent_recalc, | 2217 | .recalc = &followparent_recalc, |
2216 | }; | 2218 | }; |
2217 | 2219 | ||
2218 | static struct clk tesla_ick = { | 2220 | /* Merged dmt1_clk_mux into timer1 */ |
2219 | .name = "tesla_ick", | 2221 | static struct clk timer1_fck = { |
2222 | .name = "timer1_fck", | ||
2223 | .parent = &sys_clkin_ck, | ||
2224 | .clksel = abe_dpll_bypass_clk_mux_sel, | ||
2225 | .init = &omap2_init_clksel_parent, | ||
2226 | .clksel_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL, | ||
2227 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2220 | .ops = &clkops_omap2_dflt, | 2228 | .ops = &clkops_omap2_dflt, |
2221 | .enable_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL, | 2229 | .recalc = &omap2_clksel_recalc, |
2222 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 2230 | .enable_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL, |
2223 | .clkdm_name = "tesla_clkdm", | 2231 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
2224 | .parent = &dpll_iva_m4_ck, | 2232 | .clkdm_name = "l4_wkup_clkdm", |
2225 | .recalc = &followparent_recalc, | 2233 | }; |
2234 | |||
2235 | /* Merged cm2_dm10_mux into timer10 */ | ||
2236 | static struct clk timer10_fck = { | ||
2237 | .name = "timer10_fck", | ||
2238 | .parent = &sys_clkin_ck, | ||
2239 | .clksel = abe_dpll_bypass_clk_mux_sel, | ||
2240 | .init = &omap2_init_clksel_parent, | ||
2241 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL, | ||
2242 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2243 | .ops = &clkops_omap2_dflt, | ||
2244 | .recalc = &omap2_clksel_recalc, | ||
2245 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL, | ||
2246 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2247 | .clkdm_name = "l4_per_clkdm", | ||
2248 | }; | ||
2249 | |||
2250 | /* Merged cm2_dm11_mux into timer11 */ | ||
2251 | static struct clk timer11_fck = { | ||
2252 | .name = "timer11_fck", | ||
2253 | .parent = &sys_clkin_ck, | ||
2254 | .clksel = abe_dpll_bypass_clk_mux_sel, | ||
2255 | .init = &omap2_init_clksel_parent, | ||
2256 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL, | ||
2257 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2258 | .ops = &clkops_omap2_dflt, | ||
2259 | .recalc = &omap2_clksel_recalc, | ||
2260 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL, | ||
2261 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2262 | .clkdm_name = "l4_per_clkdm", | ||
2263 | }; | ||
2264 | |||
2265 | /* Merged cm2_dm2_mux into timer2 */ | ||
2266 | static struct clk timer2_fck = { | ||
2267 | .name = "timer2_fck", | ||
2268 | .parent = &sys_clkin_ck, | ||
2269 | .clksel = abe_dpll_bypass_clk_mux_sel, | ||
2270 | .init = &omap2_init_clksel_parent, | ||
2271 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL, | ||
2272 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2273 | .ops = &clkops_omap2_dflt, | ||
2274 | .recalc = &omap2_clksel_recalc, | ||
2275 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL, | ||
2276 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2277 | .clkdm_name = "l4_per_clkdm", | ||
2278 | }; | ||
2279 | |||
2280 | /* Merged cm2_dm3_mux into timer3 */ | ||
2281 | static struct clk timer3_fck = { | ||
2282 | .name = "timer3_fck", | ||
2283 | .parent = &sys_clkin_ck, | ||
2284 | .clksel = abe_dpll_bypass_clk_mux_sel, | ||
2285 | .init = &omap2_init_clksel_parent, | ||
2286 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL, | ||
2287 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2288 | .ops = &clkops_omap2_dflt, | ||
2289 | .recalc = &omap2_clksel_recalc, | ||
2290 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL, | ||
2291 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2292 | .clkdm_name = "l4_per_clkdm", | ||
2293 | }; | ||
2294 | |||
2295 | /* Merged cm2_dm4_mux into timer4 */ | ||
2296 | static struct clk timer4_fck = { | ||
2297 | .name = "timer4_fck", | ||
2298 | .parent = &sys_clkin_ck, | ||
2299 | .clksel = abe_dpll_bypass_clk_mux_sel, | ||
2300 | .init = &omap2_init_clksel_parent, | ||
2301 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL, | ||
2302 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2303 | .ops = &clkops_omap2_dflt, | ||
2304 | .recalc = &omap2_clksel_recalc, | ||
2305 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL, | ||
2306 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2307 | .clkdm_name = "l4_per_clkdm", | ||
2308 | }; | ||
2309 | |||
2310 | static const struct clksel timer5_sync_mux_sel[] = { | ||
2311 | { .parent = &syc_clk_div_ck, .rates = div_1_0_rates }, | ||
2312 | { .parent = &sys_32k_ck, .rates = div_1_1_rates }, | ||
2313 | { .parent = NULL }, | ||
2314 | }; | ||
2315 | |||
2316 | /* Merged timer5_sync_mux into timer5 */ | ||
2317 | static struct clk timer5_fck = { | ||
2318 | .name = "timer5_fck", | ||
2319 | .parent = &syc_clk_div_ck, | ||
2320 | .clksel = timer5_sync_mux_sel, | ||
2321 | .init = &omap2_init_clksel_parent, | ||
2322 | .clksel_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL, | ||
2323 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2324 | .ops = &clkops_omap2_dflt, | ||
2325 | .recalc = &omap2_clksel_recalc, | ||
2326 | .enable_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL, | ||
2327 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2328 | .clkdm_name = "abe_clkdm", | ||
2329 | }; | ||
2330 | |||
2331 | /* Merged timer6_sync_mux into timer6 */ | ||
2332 | static struct clk timer6_fck = { | ||
2333 | .name = "timer6_fck", | ||
2334 | .parent = &syc_clk_div_ck, | ||
2335 | .clksel = timer5_sync_mux_sel, | ||
2336 | .init = &omap2_init_clksel_parent, | ||
2337 | .clksel_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL, | ||
2338 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2339 | .ops = &clkops_omap2_dflt, | ||
2340 | .recalc = &omap2_clksel_recalc, | ||
2341 | .enable_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL, | ||
2342 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2343 | .clkdm_name = "abe_clkdm", | ||
2344 | }; | ||
2345 | |||
2346 | /* Merged timer7_sync_mux into timer7 */ | ||
2347 | static struct clk timer7_fck = { | ||
2348 | .name = "timer7_fck", | ||
2349 | .parent = &syc_clk_div_ck, | ||
2350 | .clksel = timer5_sync_mux_sel, | ||
2351 | .init = &omap2_init_clksel_parent, | ||
2352 | .clksel_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL, | ||
2353 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2354 | .ops = &clkops_omap2_dflt, | ||
2355 | .recalc = &omap2_clksel_recalc, | ||
2356 | .enable_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL, | ||
2357 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2358 | .clkdm_name = "abe_clkdm", | ||
2359 | }; | ||
2360 | |||
2361 | /* Merged timer8_sync_mux into timer8 */ | ||
2362 | static struct clk timer8_fck = { | ||
2363 | .name = "timer8_fck", | ||
2364 | .parent = &syc_clk_div_ck, | ||
2365 | .clksel = timer5_sync_mux_sel, | ||
2366 | .init = &omap2_init_clksel_parent, | ||
2367 | .clksel_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL, | ||
2368 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2369 | .ops = &clkops_omap2_dflt, | ||
2370 | .recalc = &omap2_clksel_recalc, | ||
2371 | .enable_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL, | ||
2372 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2373 | .clkdm_name = "abe_clkdm", | ||
2374 | }; | ||
2375 | |||
2376 | /* Merged cm2_dm9_mux into timer9 */ | ||
2377 | static struct clk timer9_fck = { | ||
2378 | .name = "timer9_fck", | ||
2379 | .parent = &sys_clkin_ck, | ||
2380 | .clksel = abe_dpll_bypass_clk_mux_sel, | ||
2381 | .init = &omap2_init_clksel_parent, | ||
2382 | .clksel_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL, | ||
2383 | .clksel_mask = OMAP4430_CLKSEL_MASK, | ||
2384 | .ops = &clkops_omap2_dflt, | ||
2385 | .recalc = &omap2_clksel_recalc, | ||
2386 | .enable_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL, | ||
2387 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2388 | .clkdm_name = "l4_per_clkdm", | ||
2226 | }; | 2389 | }; |
2227 | 2390 | ||
2228 | static struct clk uart1_fck = { | 2391 | static struct clk uart1_fck = { |
@@ -2265,105 +2428,148 @@ static struct clk uart4_fck = { | |||
2265 | .recalc = &followparent_recalc, | 2428 | .recalc = &followparent_recalc, |
2266 | }; | 2429 | }; |
2267 | 2430 | ||
2268 | static struct clk unipro1_fck = { | 2431 | static struct clk usb_host_fs_fck = { |
2269 | .name = "unipro1_fck", | 2432 | .name = "usb_host_fs_fck", |
2270 | .ops = &clkops_omap2_dflt, | 2433 | .ops = &clkops_omap2_dflt, |
2271 | .enable_reg = OMAP4430_CM_L3INIT_UNIPRO1_CLKCTRL, | 2434 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_FS_CLKCTRL, |
2272 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2435 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
2273 | .clkdm_name = "l3_init_clkdm", | 2436 | .clkdm_name = "l3_init_clkdm", |
2274 | .parent = &func_96m_fclk, | 2437 | .parent = &func_48mc_fclk, |
2275 | .recalc = &followparent_recalc, | 2438 | .recalc = &followparent_recalc, |
2276 | }; | 2439 | }; |
2277 | 2440 | ||
2278 | static struct clk usb_host_fck = { | 2441 | static struct clk usb_host_hs_utmi_p3_clk = { |
2279 | .name = "usb_host_fck", | 2442 | .name = "usb_host_hs_utmi_p3_clk", |
2280 | .ops = &clkops_omap2_dflt, | 2443 | .ops = &clkops_omap2_dflt, |
2281 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, | 2444 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
2282 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2445 | .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT, |
2283 | .clkdm_name = "l3_init_clkdm", | 2446 | .clkdm_name = "l3_init_clkdm", |
2284 | .parent = &init_60m_fclk, | 2447 | .parent = &init_60m_fclk, |
2285 | .recalc = &followparent_recalc, | 2448 | .recalc = &followparent_recalc, |
2286 | }; | 2449 | }; |
2287 | 2450 | ||
2288 | static struct clk usb_host_fs_fck = { | 2451 | static struct clk usb_host_hs_hsic60m_p1_clk = { |
2289 | .name = "usb_host_fs_fck", | 2452 | .name = "usb_host_hs_hsic60m_p1_clk", |
2290 | .ops = &clkops_omap2_dflt, | 2453 | .ops = &clkops_omap2_dflt, |
2291 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_FS_CLKCTRL, | 2454 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
2292 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2455 | .enable_bit = OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT, |
2293 | .clkdm_name = "l3_init_clkdm", | 2456 | .clkdm_name = "l3_init_clkdm", |
2294 | .parent = &func_48mc_fclk, | 2457 | .parent = &init_60m_fclk, |
2295 | .recalc = &followparent_recalc, | 2458 | .recalc = &followparent_recalc, |
2296 | }; | 2459 | }; |
2297 | 2460 | ||
2298 | static struct clk usb_otg_ick = { | 2461 | static struct clk usb_host_hs_hsic60m_p2_clk = { |
2299 | .name = "usb_otg_ick", | 2462 | .name = "usb_host_hs_hsic60m_p2_clk", |
2300 | .ops = &clkops_omap2_dflt, | 2463 | .ops = &clkops_omap2_dflt, |
2301 | .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL, | 2464 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
2302 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 2465 | .enable_bit = OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT, |
2303 | .clkdm_name = "l3_init_clkdm", | 2466 | .clkdm_name = "l3_init_clkdm", |
2304 | .parent = &l3_div_ck, | 2467 | .parent = &init_60m_fclk, |
2305 | .recalc = &followparent_recalc, | 2468 | .recalc = &followparent_recalc, |
2306 | }; | 2469 | }; |
2307 | 2470 | ||
2308 | static struct clk usb_tll_ick = { | 2471 | static const struct clksel utmi_p1_gfclk_sel[] = { |
2309 | .name = "usb_tll_ick", | 2472 | { .parent = &init_60m_fclk, .rates = div_1_0_rates }, |
2473 | { .parent = &xclk60mhsp1_ck, .rates = div_1_1_rates }, | ||
2474 | { .parent = NULL }, | ||
2475 | }; | ||
2476 | |||
2477 | static struct clk utmi_p1_gfclk = { | ||
2478 | .name = "utmi_p1_gfclk", | ||
2479 | .parent = &init_60m_fclk, | ||
2480 | .clksel = utmi_p1_gfclk_sel, | ||
2481 | .init = &omap2_init_clksel_parent, | ||
2482 | .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, | ||
2483 | .clksel_mask = OMAP4430_CLKSEL_UTMI_P1_MASK, | ||
2484 | .ops = &clkops_null, | ||
2485 | .recalc = &omap2_clksel_recalc, | ||
2486 | }; | ||
2487 | |||
2488 | static struct clk usb_host_hs_utmi_p1_clk = { | ||
2489 | .name = "usb_host_hs_utmi_p1_clk", | ||
2310 | .ops = &clkops_omap2_dflt, | 2490 | .ops = &clkops_omap2_dflt, |
2311 | .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL, | 2491 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
2312 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 2492 | .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT, |
2313 | .clkdm_name = "l3_init_clkdm", | 2493 | .clkdm_name = "l3_init_clkdm", |
2314 | .parent = &l4_div_ck, | 2494 | .parent = &utmi_p1_gfclk, |
2315 | .recalc = &followparent_recalc, | 2495 | .recalc = &followparent_recalc, |
2316 | }; | 2496 | }; |
2317 | 2497 | ||
2318 | static struct clk usbphyocp2scp_ick = { | 2498 | static const struct clksel utmi_p2_gfclk_sel[] = { |
2319 | .name = "usbphyocp2scp_ick", | 2499 | { .parent = &init_60m_fclk, .rates = div_1_0_rates }, |
2500 | { .parent = &xclk60mhsp2_ck, .rates = div_1_1_rates }, | ||
2501 | { .parent = NULL }, | ||
2502 | }; | ||
2503 | |||
2504 | static struct clk utmi_p2_gfclk = { | ||
2505 | .name = "utmi_p2_gfclk", | ||
2506 | .parent = &init_60m_fclk, | ||
2507 | .clksel = utmi_p2_gfclk_sel, | ||
2508 | .init = &omap2_init_clksel_parent, | ||
2509 | .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, | ||
2510 | .clksel_mask = OMAP4430_CLKSEL_UTMI_P2_MASK, | ||
2511 | .ops = &clkops_null, | ||
2512 | .recalc = &omap2_clksel_recalc, | ||
2513 | }; | ||
2514 | |||
2515 | static struct clk usb_host_hs_utmi_p2_clk = { | ||
2516 | .name = "usb_host_hs_utmi_p2_clk", | ||
2320 | .ops = &clkops_omap2_dflt, | 2517 | .ops = &clkops_omap2_dflt, |
2321 | .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, | 2518 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
2322 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 2519 | .enable_bit = OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT, |
2323 | .clkdm_name = "l3_init_clkdm", | 2520 | .clkdm_name = "l3_init_clkdm", |
2324 | .parent = &l4_div_ck, | 2521 | .parent = &utmi_p2_gfclk, |
2325 | .recalc = &followparent_recalc, | 2522 | .recalc = &followparent_recalc, |
2326 | }; | 2523 | }; |
2327 | 2524 | ||
2328 | static struct clk usim_fck = { | 2525 | static struct clk usb_host_hs_hsic480m_p1_clk = { |
2329 | .name = "usim_fck", | 2526 | .name = "usb_host_hs_hsic480m_p1_clk", |
2330 | .ops = &clkops_omap2_dflt, | 2527 | .ops = &clkops_omap2_dflt, |
2331 | .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, | 2528 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
2332 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2529 | .enable_bit = OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT, |
2333 | .clkdm_name = "l4_wkup_clkdm", | 2530 | .clkdm_name = "l3_init_clkdm", |
2334 | .parent = &sys_32k_ck, | 2531 | .parent = &dpll_usb_m2_ck, |
2335 | .recalc = &followparent_recalc, | 2532 | .recalc = &followparent_recalc, |
2336 | }; | 2533 | }; |
2337 | 2534 | ||
2338 | static struct clk wdt2_fck = { | 2535 | static struct clk usb_host_hs_hsic480m_p2_clk = { |
2339 | .name = "wdt2_fck", | 2536 | .name = "usb_host_hs_hsic480m_p2_clk", |
2340 | .ops = &clkops_omap2_dflt, | 2537 | .ops = &clkops_omap2_dflt, |
2341 | .enable_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL, | 2538 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
2342 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2539 | .enable_bit = OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT, |
2343 | .clkdm_name = "l4_wkup_clkdm", | 2540 | .clkdm_name = "l3_init_clkdm", |
2344 | .parent = &sys_32k_ck, | 2541 | .parent = &dpll_usb_m2_ck, |
2345 | .recalc = &followparent_recalc, | 2542 | .recalc = &followparent_recalc, |
2346 | }; | 2543 | }; |
2347 | 2544 | ||
2348 | static struct clk wdt3_fck = { | 2545 | static struct clk usb_host_hs_func48mclk = { |
2349 | .name = "wdt3_fck", | 2546 | .name = "usb_host_hs_func48mclk", |
2350 | .ops = &clkops_omap2_dflt, | 2547 | .ops = &clkops_omap2_dflt, |
2351 | .enable_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL, | 2548 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, |
2549 | .enable_bit = OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT, | ||
2550 | .clkdm_name = "l3_init_clkdm", | ||
2551 | .parent = &func_48mc_fclk, | ||
2552 | .recalc = &followparent_recalc, | ||
2553 | }; | ||
2554 | |||
2555 | static struct clk usb_host_hs_fck = { | ||
2556 | .name = "usb_host_hs_fck", | ||
2557 | .ops = &clkops_omap2_dflt, | ||
2558 | .enable_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, | ||
2352 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | 2559 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, |
2353 | .clkdm_name = "abe_clkdm", | 2560 | .clkdm_name = "l3_init_clkdm", |
2354 | .parent = &sys_32k_ck, | 2561 | .parent = &init_60m_fclk, |
2355 | .recalc = &followparent_recalc, | 2562 | .recalc = &followparent_recalc, |
2356 | }; | 2563 | }; |
2357 | 2564 | ||
2358 | /* Remaining optional clocks */ | ||
2359 | static const struct clksel otg_60m_gfclk_sel[] = { | 2565 | static const struct clksel otg_60m_gfclk_sel[] = { |
2360 | { .parent = &utmi_phy_clkout_ck, .rates = div_1_0_rates }, | 2566 | { .parent = &utmi_phy_clkout_ck, .rates = div_1_0_rates }, |
2361 | { .parent = &xclk60motg_ck, .rates = div_1_1_rates }, | 2567 | { .parent = &xclk60motg_ck, .rates = div_1_1_rates }, |
2362 | { .parent = NULL }, | 2568 | { .parent = NULL }, |
2363 | }; | 2569 | }; |
2364 | 2570 | ||
2365 | static struct clk otg_60m_gfclk_ck = { | 2571 | static struct clk otg_60m_gfclk = { |
2366 | .name = "otg_60m_gfclk_ck", | 2572 | .name = "otg_60m_gfclk", |
2367 | .parent = &utmi_phy_clkout_ck, | 2573 | .parent = &utmi_phy_clkout_ck, |
2368 | .clksel = otg_60m_gfclk_sel, | 2574 | .clksel = otg_60m_gfclk_sel, |
2369 | .init = &omap2_init_clksel_parent, | 2575 | .init = &omap2_init_clksel_parent, |
@@ -2373,38 +2579,74 @@ static struct clk otg_60m_gfclk_ck = { | |||
2373 | .recalc = &omap2_clksel_recalc, | 2579 | .recalc = &omap2_clksel_recalc, |
2374 | }; | 2580 | }; |
2375 | 2581 | ||
2376 | static const struct clksel stm_clk_div_div[] = { | 2582 | static struct clk usb_otg_hs_xclk = { |
2377 | { .parent = &pmd_stm_clock_mux_ck, .rates = div3_1to4_rates }, | 2583 | .name = "usb_otg_hs_xclk", |
2378 | { .parent = NULL }, | 2584 | .ops = &clkops_omap2_dflt, |
2585 | .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL, | ||
2586 | .enable_bit = OMAP4430_OPTFCLKEN_XCLK_SHIFT, | ||
2587 | .clkdm_name = "l3_init_clkdm", | ||
2588 | .parent = &otg_60m_gfclk, | ||
2589 | .recalc = &followparent_recalc, | ||
2379 | }; | 2590 | }; |
2380 | 2591 | ||
2381 | static struct clk stm_clk_div_ck = { | 2592 | static struct clk usb_otg_hs_ick = { |
2382 | .name = "stm_clk_div_ck", | 2593 | .name = "usb_otg_hs_ick", |
2383 | .parent = &pmd_stm_clock_mux_ck, | 2594 | .ops = &clkops_omap2_dflt, |
2384 | .clksel = stm_clk_div_div, | 2595 | .enable_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL, |
2385 | .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL, | 2596 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
2386 | .clksel_mask = OMAP4430_CLKSEL_PMD_STM_CLK_MASK, | 2597 | .clkdm_name = "l3_init_clkdm", |
2387 | .ops = &clkops_null, | 2598 | .parent = &l3_div_ck, |
2388 | .recalc = &omap2_clksel_recalc, | 2599 | .recalc = &followparent_recalc, |
2389 | .round_rate = &omap2_clksel_round_rate, | ||
2390 | .set_rate = &omap2_clksel_set_rate, | ||
2391 | }; | 2600 | }; |
2392 | 2601 | ||
2393 | static const struct clksel trace_clk_div_div[] = { | 2602 | static struct clk usb_phy_cm_clk32k = { |
2394 | { .parent = &pmd_trace_clk_mux_ck, .rates = div3_1to4_rates }, | 2603 | .name = "usb_phy_cm_clk32k", |
2395 | { .parent = NULL }, | 2604 | .ops = &clkops_omap2_dflt, |
2605 | .enable_reg = OMAP4430_CM_ALWON_USBPHY_CLKCTRL, | ||
2606 | .enable_bit = OMAP4430_OPTFCLKEN_CLK32K_SHIFT, | ||
2607 | .clkdm_name = "l4_ao_clkdm", | ||
2608 | .parent = &sys_32k_ck, | ||
2609 | .recalc = &followparent_recalc, | ||
2396 | }; | 2610 | }; |
2397 | 2611 | ||
2398 | static struct clk trace_clk_div_ck = { | 2612 | static struct clk usb_tll_hs_usb_ch2_clk = { |
2399 | .name = "trace_clk_div_ck", | 2613 | .name = "usb_tll_hs_usb_ch2_clk", |
2400 | .parent = &pmd_trace_clk_mux_ck, | 2614 | .ops = &clkops_omap2_dflt, |
2401 | .clksel = trace_clk_div_div, | 2615 | .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL, |
2402 | .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL, | 2616 | .enable_bit = OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT, |
2403 | .clksel_mask = OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK, | 2617 | .clkdm_name = "l3_init_clkdm", |
2404 | .ops = &clkops_null, | 2618 | .parent = &init_60m_fclk, |
2405 | .recalc = &omap2_clksel_recalc, | 2619 | .recalc = &followparent_recalc, |
2406 | .round_rate = &omap2_clksel_round_rate, | 2620 | }; |
2407 | .set_rate = &omap2_clksel_set_rate, | 2621 | |
2622 | static struct clk usb_tll_hs_usb_ch0_clk = { | ||
2623 | .name = "usb_tll_hs_usb_ch0_clk", | ||
2624 | .ops = &clkops_omap2_dflt, | ||
2625 | .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL, | ||
2626 | .enable_bit = OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT, | ||
2627 | .clkdm_name = "l3_init_clkdm", | ||
2628 | .parent = &init_60m_fclk, | ||
2629 | .recalc = &followparent_recalc, | ||
2630 | }; | ||
2631 | |||
2632 | static struct clk usb_tll_hs_usb_ch1_clk = { | ||
2633 | .name = "usb_tll_hs_usb_ch1_clk", | ||
2634 | .ops = &clkops_omap2_dflt, | ||
2635 | .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL, | ||
2636 | .enable_bit = OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT, | ||
2637 | .clkdm_name = "l3_init_clkdm", | ||
2638 | .parent = &init_60m_fclk, | ||
2639 | .recalc = &followparent_recalc, | ||
2640 | }; | ||
2641 | |||
2642 | static struct clk usb_tll_hs_ick = { | ||
2643 | .name = "usb_tll_hs_ick", | ||
2644 | .ops = &clkops_omap2_dflt, | ||
2645 | .enable_reg = OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL, | ||
2646 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | ||
2647 | .clkdm_name = "l3_init_clkdm", | ||
2648 | .parent = &l4_div_ck, | ||
2649 | .recalc = &followparent_recalc, | ||
2408 | }; | 2650 | }; |
2409 | 2651 | ||
2410 | static const struct clksel_rate div2_14to18_rates[] = { | 2652 | static const struct clksel_rate div2_14to18_rates[] = { |
@@ -2418,8 +2660,8 @@ static const struct clksel usim_fclk_div[] = { | |||
2418 | { .parent = NULL }, | 2660 | { .parent = NULL }, |
2419 | }; | 2661 | }; |
2420 | 2662 | ||
2421 | static struct clk usim_fclk = { | 2663 | static struct clk usim_ck = { |
2422 | .name = "usim_fclk", | 2664 | .name = "usim_ck", |
2423 | .parent = &dpll_per_m4_ck, | 2665 | .parent = &dpll_per_m4_ck, |
2424 | .clksel = usim_fclk_div, | 2666 | .clksel = usim_fclk_div, |
2425 | .clksel_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, | 2667 | .clksel_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, |
@@ -2430,38 +2672,79 @@ static struct clk usim_fclk = { | |||
2430 | .set_rate = &omap2_clksel_set_rate, | 2672 | .set_rate = &omap2_clksel_set_rate, |
2431 | }; | 2673 | }; |
2432 | 2674 | ||
2433 | static const struct clksel utmi_p1_gfclk_sel[] = { | 2675 | static struct clk usim_fclk = { |
2434 | { .parent = &init_60m_fclk, .rates = div_1_0_rates }, | 2676 | .name = "usim_fclk", |
2435 | { .parent = &xclk60mhsp1_ck, .rates = div_1_1_rates }, | 2677 | .ops = &clkops_omap2_dflt, |
2678 | .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, | ||
2679 | .enable_bit = OMAP4430_OPTFCLKEN_FCLK_SHIFT, | ||
2680 | .clkdm_name = "l4_wkup_clkdm", | ||
2681 | .parent = &usim_ck, | ||
2682 | .recalc = &followparent_recalc, | ||
2683 | }; | ||
2684 | |||
2685 | static struct clk usim_fck = { | ||
2686 | .name = "usim_fck", | ||
2687 | .ops = &clkops_omap2_dflt, | ||
2688 | .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, | ||
2689 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | ||
2690 | .clkdm_name = "l4_wkup_clkdm", | ||
2691 | .parent = &sys_32k_ck, | ||
2692 | .recalc = &followparent_recalc, | ||
2693 | }; | ||
2694 | |||
2695 | static struct clk wd_timer2_fck = { | ||
2696 | .name = "wd_timer2_fck", | ||
2697 | .ops = &clkops_omap2_dflt, | ||
2698 | .enable_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL, | ||
2699 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2700 | .clkdm_name = "l4_wkup_clkdm", | ||
2701 | .parent = &sys_32k_ck, | ||
2702 | .recalc = &followparent_recalc, | ||
2703 | }; | ||
2704 | |||
2705 | static struct clk wd_timer3_fck = { | ||
2706 | .name = "wd_timer3_fck", | ||
2707 | .ops = &clkops_omap2_dflt, | ||
2708 | .enable_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL, | ||
2709 | .enable_bit = OMAP4430_MODULEMODE_SWCTRL, | ||
2710 | .clkdm_name = "abe_clkdm", | ||
2711 | .parent = &sys_32k_ck, | ||
2712 | .recalc = &followparent_recalc, | ||
2713 | }; | ||
2714 | |||
2715 | /* Remaining optional clocks */ | ||
2716 | static const struct clksel stm_clk_div_div[] = { | ||
2717 | { .parent = &pmd_stm_clock_mux_ck, .rates = div3_1to4_rates }, | ||
2436 | { .parent = NULL }, | 2718 | { .parent = NULL }, |
2437 | }; | 2719 | }; |
2438 | 2720 | ||
2439 | static struct clk utmi_p1_gfclk_ck = { | 2721 | static struct clk stm_clk_div_ck = { |
2440 | .name = "utmi_p1_gfclk_ck", | 2722 | .name = "stm_clk_div_ck", |
2441 | .parent = &init_60m_fclk, | 2723 | .parent = &pmd_stm_clock_mux_ck, |
2442 | .clksel = utmi_p1_gfclk_sel, | 2724 | .clksel = stm_clk_div_div, |
2443 | .init = &omap2_init_clksel_parent, | 2725 | .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL, |
2444 | .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, | 2726 | .clksel_mask = OMAP4430_CLKSEL_PMD_STM_CLK_MASK, |
2445 | .clksel_mask = OMAP4430_CLKSEL_UTMI_P1_MASK, | ||
2446 | .ops = &clkops_null, | 2727 | .ops = &clkops_null, |
2447 | .recalc = &omap2_clksel_recalc, | 2728 | .recalc = &omap2_clksel_recalc, |
2729 | .round_rate = &omap2_clksel_round_rate, | ||
2730 | .set_rate = &omap2_clksel_set_rate, | ||
2448 | }; | 2731 | }; |
2449 | 2732 | ||
2450 | static const struct clksel utmi_p2_gfclk_sel[] = { | 2733 | static const struct clksel trace_clk_div_div[] = { |
2451 | { .parent = &init_60m_fclk, .rates = div_1_0_rates }, | 2734 | { .parent = &pmd_trace_clk_mux_ck, .rates = div3_1to4_rates }, |
2452 | { .parent = &xclk60mhsp2_ck, .rates = div_1_1_rates }, | ||
2453 | { .parent = NULL }, | 2735 | { .parent = NULL }, |
2454 | }; | 2736 | }; |
2455 | 2737 | ||
2456 | static struct clk utmi_p2_gfclk_ck = { | 2738 | static struct clk trace_clk_div_ck = { |
2457 | .name = "utmi_p2_gfclk_ck", | 2739 | .name = "trace_clk_div_ck", |
2458 | .parent = &init_60m_fclk, | 2740 | .parent = &pmd_trace_clk_mux_ck, |
2459 | .clksel = utmi_p2_gfclk_sel, | 2741 | .clksel = trace_clk_div_div, |
2460 | .init = &omap2_init_clksel_parent, | 2742 | .clksel_reg = OMAP4430_CM_EMU_DEBUGSS_CLKCTRL, |
2461 | .clksel_reg = OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL, | 2743 | .clksel_mask = OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK, |
2462 | .clksel_mask = OMAP4430_CLKSEL_UTMI_P2_MASK, | ||
2463 | .ops = &clkops_null, | 2744 | .ops = &clkops_null, |
2464 | .recalc = &omap2_clksel_recalc, | 2745 | .recalc = &omap2_clksel_recalc, |
2746 | .round_rate = &omap2_clksel_round_rate, | ||
2747 | .set_rate = &omap2_clksel_set_rate, | ||
2465 | }; | 2748 | }; |
2466 | 2749 | ||
2467 | /* | 2750 | /* |
@@ -2483,11 +2766,12 @@ static struct omap_clk omap44xx_clks[] = { | |||
2483 | CLK(NULL, "virt_27000000_ck", &virt_27000000_ck, CK_443X), | 2766 | CLK(NULL, "virt_27000000_ck", &virt_27000000_ck, CK_443X), |
2484 | CLK(NULL, "virt_38400000_ck", &virt_38400000_ck, CK_443X), | 2767 | CLK(NULL, "virt_38400000_ck", &virt_38400000_ck, CK_443X), |
2485 | CLK(NULL, "sys_clkin_ck", &sys_clkin_ck, CK_443X), | 2768 | CLK(NULL, "sys_clkin_ck", &sys_clkin_ck, CK_443X), |
2769 | CLK(NULL, "tie_low_clock_ck", &tie_low_clock_ck, CK_443X), | ||
2486 | CLK(NULL, "utmi_phy_clkout_ck", &utmi_phy_clkout_ck, CK_443X), | 2770 | CLK(NULL, "utmi_phy_clkout_ck", &utmi_phy_clkout_ck, CK_443X), |
2487 | CLK(NULL, "xclk60mhsp1_ck", &xclk60mhsp1_ck, CK_443X), | 2771 | CLK(NULL, "xclk60mhsp1_ck", &xclk60mhsp1_ck, CK_443X), |
2488 | CLK(NULL, "xclk60mhsp2_ck", &xclk60mhsp2_ck, CK_443X), | 2772 | CLK(NULL, "xclk60mhsp2_ck", &xclk60mhsp2_ck, CK_443X), |
2489 | CLK(NULL, "xclk60motg_ck", &xclk60motg_ck, CK_443X), | 2773 | CLK(NULL, "xclk60motg_ck", &xclk60motg_ck, CK_443X), |
2490 | CLK(NULL, "dpll_sys_ref_clk", &dpll_sys_ref_clk, CK_443X), | 2774 | CLK(NULL, "abe_dpll_bypass_clk_mux_ck", &abe_dpll_bypass_clk_mux_ck, CK_443X), |
2491 | CLK(NULL, "abe_dpll_refclk_mux_ck", &abe_dpll_refclk_mux_ck, CK_443X), | 2775 | CLK(NULL, "abe_dpll_refclk_mux_ck", &abe_dpll_refclk_mux_ck, CK_443X), |
2492 | CLK(NULL, "dpll_abe_ck", &dpll_abe_ck, CK_443X), | 2776 | CLK(NULL, "dpll_abe_ck", &dpll_abe_ck, CK_443X), |
2493 | CLK(NULL, "dpll_abe_m2x2_ck", &dpll_abe_m2x2_ck, CK_443X), | 2777 | CLK(NULL, "dpll_abe_m2x2_ck", &dpll_abe_m2x2_ck, CK_443X), |
@@ -2557,46 +2841,48 @@ static struct omap_clk omap44xx_clks[] = { | |||
2557 | CLK(NULL, "aes1_fck", &aes1_fck, CK_443X), | 2841 | CLK(NULL, "aes1_fck", &aes1_fck, CK_443X), |
2558 | CLK(NULL, "aes2_fck", &aes2_fck, CK_443X), | 2842 | CLK(NULL, "aes2_fck", &aes2_fck, CK_443X), |
2559 | CLK(NULL, "aess_fck", &aess_fck, CK_443X), | 2843 | CLK(NULL, "aess_fck", &aess_fck, CK_443X), |
2560 | CLK(NULL, "cust_efuse_fck", &cust_efuse_fck, CK_443X), | 2844 | CLK(NULL, "bandgap_fclk", &bandgap_fclk, CK_443X), |
2561 | CLK(NULL, "des3des_fck", &des3des_fck, CK_443X), | 2845 | CLK(NULL, "des3des_fck", &des3des_fck, CK_443X), |
2562 | CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X), | 2846 | CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X), |
2563 | CLK(NULL, "dmic_fck", &dmic_fck, CK_443X), | 2847 | CLK(NULL, "dmic_fck", &dmic_fck, CK_443X), |
2848 | CLK(NULL, "dsp_fck", &dsp_fck, CK_443X), | ||
2849 | CLK(NULL, "dss_sys_clk", &dss_sys_clk, CK_443X), | ||
2850 | CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X), | ||
2851 | CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X), | ||
2852 | CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X), | ||
2564 | CLK(NULL, "dss_fck", &dss_fck, CK_443X), | 2853 | CLK(NULL, "dss_fck", &dss_fck, CK_443X), |
2565 | CLK(NULL, "ducati_ick", &ducati_ick, CK_443X), | 2854 | CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X), |
2566 | CLK(NULL, "emif1_ick", &emif1_ick, CK_443X), | 2855 | CLK(NULL, "emif1_fck", &emif1_fck, CK_443X), |
2567 | CLK(NULL, "emif2_ick", &emif2_ick, CK_443X), | 2856 | CLK(NULL, "emif2_fck", &emif2_fck, CK_443X), |
2568 | CLK(NULL, "fdif_fck", &fdif_fck, CK_443X), | 2857 | CLK(NULL, "fdif_fck", &fdif_fck, CK_443X), |
2569 | CLK(NULL, "per_sgx_fclk", &per_sgx_fclk, CK_443X), | 2858 | CLK(NULL, "fpka_fck", &fpka_fck, CK_443X), |
2570 | CLK(NULL, "gfx_fck", &gfx_fck, CK_443X), | 2859 | CLK(NULL, "gpio1_dbck", &gpio1_dbclk, CK_443X), |
2571 | CLK(NULL, "gpio1_ick", &gpio1_ick, CK_443X), | 2860 | CLK(NULL, "gpio1_ick", &gpio1_ick, CK_443X), |
2861 | CLK(NULL, "gpio2_dbck", &gpio2_dbclk, CK_443X), | ||
2572 | CLK(NULL, "gpio2_ick", &gpio2_ick, CK_443X), | 2862 | CLK(NULL, "gpio2_ick", &gpio2_ick, CK_443X), |
2863 | CLK(NULL, "gpio3_dbck", &gpio3_dbclk, CK_443X), | ||
2573 | CLK(NULL, "gpio3_ick", &gpio3_ick, CK_443X), | 2864 | CLK(NULL, "gpio3_ick", &gpio3_ick, CK_443X), |
2865 | CLK(NULL, "gpio4_dbck", &gpio4_dbclk, CK_443X), | ||
2574 | CLK(NULL, "gpio4_ick", &gpio4_ick, CK_443X), | 2866 | CLK(NULL, "gpio4_ick", &gpio4_ick, CK_443X), |
2867 | CLK(NULL, "gpio5_dbck", &gpio5_dbclk, CK_443X), | ||
2575 | CLK(NULL, "gpio5_ick", &gpio5_ick, CK_443X), | 2868 | CLK(NULL, "gpio5_ick", &gpio5_ick, CK_443X), |
2869 | CLK(NULL, "gpio6_dbck", &gpio6_dbclk, CK_443X), | ||
2576 | CLK(NULL, "gpio6_ick", &gpio6_ick, CK_443X), | 2870 | CLK(NULL, "gpio6_ick", &gpio6_ick, CK_443X), |
2577 | CLK(NULL, "gpmc_ick", &gpmc_ick, CK_443X), | 2871 | CLK(NULL, "gpmc_ick", &gpmc_ick, CK_443X), |
2578 | CLK(NULL, "gpt1_fck", &gpt1_fck, CK_443X), | 2872 | CLK(NULL, "gpu_fck", &gpu_fck, CK_443X), |
2579 | CLK(NULL, "gpt10_fck", &gpt10_fck, CK_443X), | ||
2580 | CLK(NULL, "gpt11_fck", &gpt11_fck, CK_443X), | ||
2581 | CLK(NULL, "gpt2_fck", &gpt2_fck, CK_443X), | ||
2582 | CLK(NULL, "gpt3_fck", &gpt3_fck, CK_443X), | ||
2583 | CLK(NULL, "gpt4_fck", &gpt4_fck, CK_443X), | ||
2584 | CLK(NULL, "gpt5_fck", &gpt5_fck, CK_443X), | ||
2585 | CLK(NULL, "gpt6_fck", &gpt6_fck, CK_443X), | ||
2586 | CLK(NULL, "gpt7_fck", &gpt7_fck, CK_443X), | ||
2587 | CLK(NULL, "gpt8_fck", &gpt8_fck, CK_443X), | ||
2588 | CLK(NULL, "gpt9_fck", &gpt9_fck, CK_443X), | ||
2589 | CLK("omap2_hdq.0", "fck", &hdq1w_fck, CK_443X), | 2873 | CLK("omap2_hdq.0", "fck", &hdq1w_fck, CK_443X), |
2590 | CLK(NULL, "hsi_ick", &hsi_ick, CK_443X), | 2874 | CLK(NULL, "hsi_fck", &hsi_fck, CK_443X), |
2591 | CLK("i2c_omap.1", "fck", &i2c1_fck, CK_443X), | 2875 | CLK("i2c_omap.1", "fck", &i2c1_fck, CK_443X), |
2592 | CLK("i2c_omap.2", "fck", &i2c2_fck, CK_443X), | 2876 | CLK("i2c_omap.2", "fck", &i2c2_fck, CK_443X), |
2593 | CLK("i2c_omap.3", "fck", &i2c3_fck, CK_443X), | 2877 | CLK("i2c_omap.3", "fck", &i2c3_fck, CK_443X), |
2594 | CLK("i2c_omap.4", "fck", &i2c4_fck, CK_443X), | 2878 | CLK("i2c_omap.4", "fck", &i2c4_fck, CK_443X), |
2879 | CLK(NULL, "ipu_fck", &ipu_fck, CK_443X), | ||
2880 | CLK(NULL, "iss_ctrlclk", &iss_ctrlclk, CK_443X), | ||
2595 | CLK(NULL, "iss_fck", &iss_fck, CK_443X), | 2881 | CLK(NULL, "iss_fck", &iss_fck, CK_443X), |
2596 | CLK(NULL, "ivahd_ick", &ivahd_ick, CK_443X), | 2882 | CLK(NULL, "iva_fck", &iva_fck, CK_443X), |
2597 | CLK(NULL, "keyboard_fck", &keyboard_fck, CK_443X), | 2883 | CLK(NULL, "kbd_fck", &kbd_fck, CK_443X), |
2598 | CLK(NULL, "l3_instr_interconnect_ick", &l3_instr_interconnect_ick, CK_443X), | 2884 | CLK(NULL, "l3_instr_ick", &l3_instr_ick, CK_443X), |
2599 | CLK(NULL, "l3_interconnect_3_ick", &l3_interconnect_3_ick, CK_443X), | 2885 | CLK(NULL, "l3_main_3_ick", &l3_main_3_ick, CK_443X), |
2600 | CLK(NULL, "mcasp_sync_mux_ck", &mcasp_sync_mux_ck, CK_443X), | 2886 | CLK(NULL, "mcasp_sync_mux_ck", &mcasp_sync_mux_ck, CK_443X), |
2601 | CLK(NULL, "mcasp_fck", &mcasp_fck, CK_443X), | 2887 | CLK(NULL, "mcasp_fck", &mcasp_fck, CK_443X), |
2602 | CLK(NULL, "mcbsp1_sync_mux_ck", &mcbsp1_sync_mux_ck, CK_443X), | 2888 | CLK(NULL, "mcbsp1_sync_mux_ck", &mcbsp1_sync_mux_ck, CK_443X), |
@@ -2607,6 +2893,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
2607 | CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_443X), | 2893 | CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_443X), |
2608 | CLK(NULL, "mcbsp4_sync_mux_ck", &mcbsp4_sync_mux_ck, CK_443X), | 2894 | CLK(NULL, "mcbsp4_sync_mux_ck", &mcbsp4_sync_mux_ck, CK_443X), |
2609 | CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_443X), | 2895 | CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_443X), |
2896 | CLK(NULL, "mcpdm_fck", &mcpdm_fck, CK_443X), | ||
2610 | CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_443X), | 2897 | CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_443X), |
2611 | CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_443X), | 2898 | CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_443X), |
2612 | CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_443X), | 2899 | CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_443X), |
@@ -2616,43 +2903,66 @@ static struct omap_clk omap44xx_clks[] = { | |||
2616 | CLK("mmci-omap-hs.2", "fck", &mmc3_fck, CK_443X), | 2903 | CLK("mmci-omap-hs.2", "fck", &mmc3_fck, CK_443X), |
2617 | CLK("mmci-omap-hs.3", "fck", &mmc4_fck, CK_443X), | 2904 | CLK("mmci-omap-hs.3", "fck", &mmc4_fck, CK_443X), |
2618 | CLK("mmci-omap-hs.4", "fck", &mmc5_fck, CK_443X), | 2905 | CLK("mmci-omap-hs.4", "fck", &mmc5_fck, CK_443X), |
2619 | CLK(NULL, "ocp_wp1_ick", &ocp_wp1_ick, CK_443X), | 2906 | CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), |
2620 | CLK(NULL, "pdm_fck", &pdm_fck, CK_443X), | 2907 | CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X), |
2621 | CLK(NULL, "pkaeip29_fck", &pkaeip29_fck, CK_443X), | 2908 | CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X), |
2622 | CLK("omap_rng", "ick", &rng_ick, CK_443X), | 2909 | CLK("omap_rng", "ick", &rng_ick, CK_443X), |
2623 | CLK(NULL, "sha2md51_fck", &sha2md51_fck, CK_443X), | 2910 | CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X), |
2624 | CLK(NULL, "sl2_ick", &sl2_ick, CK_443X), | 2911 | CLK(NULL, "sl2if_ick", &sl2if_ick, CK_443X), |
2912 | CLK(NULL, "slimbus1_fclk_1", &slimbus1_fclk_1, CK_443X), | ||
2913 | CLK(NULL, "slimbus1_fclk_0", &slimbus1_fclk_0, CK_443X), | ||
2914 | CLK(NULL, "slimbus1_fclk_2", &slimbus1_fclk_2, CK_443X), | ||
2915 | CLK(NULL, "slimbus1_slimbus_clk", &slimbus1_slimbus_clk, CK_443X), | ||
2625 | CLK(NULL, "slimbus1_fck", &slimbus1_fck, CK_443X), | 2916 | CLK(NULL, "slimbus1_fck", &slimbus1_fck, CK_443X), |
2917 | CLK(NULL, "slimbus2_fclk_1", &slimbus2_fclk_1, CK_443X), | ||
2918 | CLK(NULL, "slimbus2_fclk_0", &slimbus2_fclk_0, CK_443X), | ||
2919 | CLK(NULL, "slimbus2_slimbus_clk", &slimbus2_slimbus_clk, CK_443X), | ||
2626 | CLK(NULL, "slimbus2_fck", &slimbus2_fck, CK_443X), | 2920 | CLK(NULL, "slimbus2_fck", &slimbus2_fck, CK_443X), |
2627 | CLK(NULL, "sr_core_fck", &sr_core_fck, CK_443X), | 2921 | CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_443X), |
2628 | CLK(NULL, "sr_iva_fck", &sr_iva_fck, CK_443X), | 2922 | CLK(NULL, "smartreflex_iva_fck", &smartreflex_iva_fck, CK_443X), |
2629 | CLK(NULL, "sr_mpu_fck", &sr_mpu_fck, CK_443X), | 2923 | CLK(NULL, "smartreflex_mpu_fck", &smartreflex_mpu_fck, CK_443X), |
2630 | CLK(NULL, "tesla_ick", &tesla_ick, CK_443X), | 2924 | CLK(NULL, "gpt1_fck", &timer1_fck, CK_443X), |
2925 | CLK(NULL, "gpt10_fck", &timer10_fck, CK_443X), | ||
2926 | CLK(NULL, "gpt11_fck", &timer11_fck, CK_443X), | ||
2927 | CLK(NULL, "gpt2_fck", &timer2_fck, CK_443X), | ||
2928 | CLK(NULL, "gpt3_fck", &timer3_fck, CK_443X), | ||
2929 | CLK(NULL, "gpt4_fck", &timer4_fck, CK_443X), | ||
2930 | CLK(NULL, "gpt5_fck", &timer5_fck, CK_443X), | ||
2931 | CLK(NULL, "gpt6_fck", &timer6_fck, CK_443X), | ||
2932 | CLK(NULL, "gpt7_fck", &timer7_fck, CK_443X), | ||
2933 | CLK(NULL, "gpt8_fck", &timer8_fck, CK_443X), | ||
2934 | CLK(NULL, "gpt9_fck", &timer9_fck, CK_443X), | ||
2631 | CLK(NULL, "uart1_fck", &uart1_fck, CK_443X), | 2935 | CLK(NULL, "uart1_fck", &uart1_fck, CK_443X), |
2632 | CLK(NULL, "uart2_fck", &uart2_fck, CK_443X), | 2936 | CLK(NULL, "uart2_fck", &uart2_fck, CK_443X), |
2633 | CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), | 2937 | CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), |
2634 | CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), | 2938 | CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), |
2635 | CLK(NULL, "unipro1_fck", &unipro1_fck, CK_443X), | ||
2636 | CLK(NULL, "usb_host_fck", &usb_host_fck, CK_443X), | ||
2637 | CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X), | 2939 | CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X), |
2638 | CLK("musb_hdrc", "ick", &usb_otg_ick, CK_443X), | 2940 | CLK(NULL, "usb_host_hs_utmi_p3_clk", &usb_host_hs_utmi_p3_clk, CK_443X), |
2639 | CLK(NULL, "usb_tll_ick", &usb_tll_ick, CK_443X), | 2941 | CLK(NULL, "usb_host_hs_hsic60m_p1_clk", &usb_host_hs_hsic60m_p1_clk, CK_443X), |
2640 | CLK(NULL, "usbphyocp2scp_ick", &usbphyocp2scp_ick, CK_443X), | 2942 | CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X), |
2943 | CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), | ||
2944 | CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), | ||
2945 | CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X), | ||
2946 | CLK(NULL, "usb_host_hs_utmi_p2_clk", &usb_host_hs_utmi_p2_clk, CK_443X), | ||
2947 | CLK(NULL, "usb_host_hs_hsic480m_p1_clk", &usb_host_hs_hsic480m_p1_clk, CK_443X), | ||
2948 | CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), | ||
2949 | CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), | ||
2950 | CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X), | ||
2951 | CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), | ||
2952 | CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), | ||
2953 | CLK("musb_hdrc", "ick", &usb_otg_hs_ick, CK_443X), | ||
2954 | CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X), | ||
2955 | CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), | ||
2956 | CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), | ||
2957 | CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), | ||
2958 | CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X), | ||
2959 | CLK(NULL, "usim_ck", &usim_ck, CK_443X), | ||
2960 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), | ||
2641 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), | 2961 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), |
2642 | CLK("omap_wdt", "fck", &wdt2_fck, CK_443X), | 2962 | CLK("omap_wdt", "fck", &wd_timer2_fck, CK_443X), |
2643 | CLK(NULL, "wdt3_fck", &wdt3_fck, CK_443X), | 2963 | CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X), |
2644 | CLK(NULL, "otg_60m_gfclk_ck", &otg_60m_gfclk_ck, CK_443X), | ||
2645 | CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X), | 2964 | CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X), |
2646 | CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X), | 2965 | CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X), |
2647 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), | ||
2648 | CLK(NULL, "utmi_p1_gfclk_ck", &utmi_p1_gfclk_ck, CK_443X), | ||
2649 | CLK(NULL, "utmi_p2_gfclk_ck", &utmi_p2_gfclk_ck, CK_443X), | ||
2650 | CLK(NULL, "gpio1_dbck", &dummy_ck, CK_443X), | ||
2651 | CLK(NULL, "gpio2_dbck", &dummy_ck, CK_443X), | ||
2652 | CLK(NULL, "gpio3_dbck", &dummy_ck, CK_443X), | ||
2653 | CLK(NULL, "gpio4_dbck", &dummy_ck, CK_443X), | ||
2654 | CLK(NULL, "gpio5_dbck", &dummy_ck, CK_443X), | ||
2655 | CLK(NULL, "gpio6_dbck", &dummy_ck, CK_443X), | ||
2656 | CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), | 2966 | CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), |
2657 | CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X), | 2967 | CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X), |
2658 | CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X), | 2968 | CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X), |
@@ -2669,19 +2979,19 @@ static struct omap_clk omap44xx_clks[] = { | |||
2669 | CLK("i2c_omap.2", "ick", &dummy_ck, CK_443X), | 2979 | CLK("i2c_omap.2", "ick", &dummy_ck, CK_443X), |
2670 | CLK("i2c_omap.3", "ick", &dummy_ck, CK_443X), | 2980 | CLK("i2c_omap.3", "ick", &dummy_ck, CK_443X), |
2671 | CLK("i2c_omap.4", "ick", &dummy_ck, CK_443X), | 2981 | CLK("i2c_omap.4", "ick", &dummy_ck, CK_443X), |
2982 | CLK("mmci-omap-hs.0", "ick", &dummy_ck, CK_443X), | ||
2983 | CLK("mmci-omap-hs.1", "ick", &dummy_ck, CK_443X), | ||
2984 | CLK("mmci-omap-hs.2", "ick", &dummy_ck, CK_443X), | ||
2985 | CLK("mmci-omap-hs.3", "ick", &dummy_ck, CK_443X), | ||
2986 | CLK("mmci-omap-hs.4", "ick", &dummy_ck, CK_443X), | ||
2672 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_443X), | 2987 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_443X), |
2673 | CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X), | 2988 | CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X), |
2674 | CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X), | 2989 | CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X), |
2675 | CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X), | 2990 | CLK("omap-mcbsp.4", "ick", &dummy_ck, CK_443X), |
2676 | CLK("omap2_mcspi.1", "ick", &dummy_ck, CK_443X), | 2991 | CLK("omap2_mcspi.1", "ick", &dummy_ck, CK_443X), |
2677 | CLK("omap2_mcspi.2", "ick", &dummy_ck, CK_443X), | 2992 | CLK("omap2_mcspi.2", "ick", &dummy_ck, CK_443X), |
2678 | CLK("omap2_mcspi.3", "ick", &dummy_ck, CK_443X), | 2993 | CLK("omap2_mcspi.3", "ick", &dummy_ck, CK_443X), |
2679 | CLK("omap2_mcspi.4", "ick", &dummy_ck, CK_443X), | 2994 | CLK("omap2_mcspi.4", "ick", &dummy_ck, CK_443X), |
2680 | CLK("mmci-omap-hs.0", "ick", &dummy_ck, CK_443X), | ||
2681 | CLK("mmci-omap-hs.1", "ick", &dummy_ck, CK_443X), | ||
2682 | CLK("mmci-omap-hs.2", "ick", &dummy_ck, CK_443X), | ||
2683 | CLK("mmci-omap-hs.3", "ick", &dummy_ck, CK_443X), | ||
2684 | CLK("mmci-omap-hs.4", "ick", &dummy_ck, CK_443X), | ||
2685 | CLK(NULL, "uart1_ick", &dummy_ck, CK_443X), | 2995 | CLK(NULL, "uart1_ick", &dummy_ck, CK_443X), |
2686 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), | 2996 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), |
2687 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), | 2997 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 5d80cb897489..6fb61b1a0d46 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -258,97 +258,6 @@ static void _omap2_clkdm_set_hwsup(struct clockdomain *clkdm, int enable) | |||
258 | 258 | ||
259 | } | 259 | } |
260 | 260 | ||
261 | /** | ||
262 | * _init_wkdep_usecount - initialize wkdep usecounts to match hardware | ||
263 | * @clkdm: clockdomain to initialize wkdep usecounts | ||
264 | * | ||
265 | * Initialize the wakeup dependency usecount variables for clockdomain @clkdm. | ||
266 | * If a wakeup dependency is present in the hardware, the usecount will be | ||
267 | * set to 1; otherwise, it will be set to 0. Software should clear all | ||
268 | * software wakeup dependencies prior to calling this function if it wishes | ||
269 | * to ensure that all usecounts start at 0. No return value. | ||
270 | */ | ||
271 | static void _init_wkdep_usecount(struct clockdomain *clkdm) | ||
272 | { | ||
273 | u32 v; | ||
274 | struct clkdm_dep *cd; | ||
275 | |||
276 | if (!clkdm->wkdep_srcs) | ||
277 | return; | ||
278 | |||
279 | for (cd = clkdm->wkdep_srcs; cd->clkdm_name; cd++) { | ||
280 | if (!omap_chip_is(cd->omap_chip)) | ||
281 | continue; | ||
282 | |||
283 | if (!cd->clkdm && cd->clkdm_name) | ||
284 | cd->clkdm = _clkdm_lookup(cd->clkdm_name); | ||
285 | |||
286 | if (!cd->clkdm) { | ||
287 | WARN(!cd->clkdm, "clockdomain: %s: wkdep clkdm %s not " | ||
288 | "found\n", clkdm->name, cd->clkdm_name); | ||
289 | continue; | ||
290 | } | ||
291 | |||
292 | v = prm_read_mod_bits_shift(clkdm->pwrdm.ptr->prcm_offs, | ||
293 | PM_WKDEP, | ||
294 | (1 << cd->clkdm->dep_bit)); | ||
295 | |||
296 | if (v) | ||
297 | pr_debug("clockdomain: %s: wakeup dependency already " | ||
298 | "set to wake up when %s wakes\n", | ||
299 | clkdm->name, cd->clkdm->name); | ||
300 | |||
301 | atomic_set(&cd->wkdep_usecount, (v) ? 1 : 0); | ||
302 | } | ||
303 | } | ||
304 | |||
305 | /** | ||
306 | * _init_sleepdep_usecount - initialize sleepdep usecounts to match hardware | ||
307 | * @clkdm: clockdomain to initialize sleepdep usecounts | ||
308 | * | ||
309 | * Initialize the sleep dependency usecount variables for clockdomain @clkdm. | ||
310 | * If a sleep dependency is present in the hardware, the usecount will be | ||
311 | * set to 1; otherwise, it will be set to 0. Software should clear all | ||
312 | * software sleep dependencies prior to calling this function if it wishes | ||
313 | * to ensure that all usecounts start at 0. No return value. | ||
314 | */ | ||
315 | static void _init_sleepdep_usecount(struct clockdomain *clkdm) | ||
316 | { | ||
317 | u32 v; | ||
318 | struct clkdm_dep *cd; | ||
319 | |||
320 | if (!cpu_is_omap34xx()) | ||
321 | return; | ||
322 | |||
323 | if (!clkdm->sleepdep_srcs) | ||
324 | return; | ||
325 | |||
326 | for (cd = clkdm->sleepdep_srcs; cd->clkdm_name; cd++) { | ||
327 | if (!omap_chip_is(cd->omap_chip)) | ||
328 | continue; | ||
329 | |||
330 | if (!cd->clkdm && cd->clkdm_name) | ||
331 | cd->clkdm = _clkdm_lookup(cd->clkdm_name); | ||
332 | |||
333 | if (!cd->clkdm) { | ||
334 | WARN(!cd->clkdm, "clockdomain: %s: sleepdep clkdm %s " | ||
335 | "not found\n", clkdm->name, cd->clkdm_name); | ||
336 | continue; | ||
337 | } | ||
338 | |||
339 | v = prm_read_mod_bits_shift(clkdm->pwrdm.ptr->prcm_offs, | ||
340 | OMAP3430_CM_SLEEPDEP, | ||
341 | (1 << cd->clkdm->dep_bit)); | ||
342 | |||
343 | if (v) | ||
344 | pr_debug("clockdomain: %s: sleep dependency already " | ||
345 | "set to prevent from idling until %s " | ||
346 | "idles\n", clkdm->name, cd->clkdm->name); | ||
347 | |||
348 | atomic_set(&cd->sleepdep_usecount, (v) ? 1 : 0); | ||
349 | } | ||
350 | }; | ||
351 | |||
352 | /* Public functions */ | 261 | /* Public functions */ |
353 | 262 | ||
354 | /** | 263 | /** |
@@ -379,12 +288,17 @@ void clkdm_init(struct clockdomain **clkdms, | |||
379 | _autodep_lookup(autodep); | 288 | _autodep_lookup(autodep); |
380 | 289 | ||
381 | /* | 290 | /* |
382 | * Ensure that the *dep_usecount registers reflect the current | 291 | * Put all clockdomains into software-supervised mode; PM code |
383 | * state of the PRCM. | 292 | * should later enable hardware-supervised mode as appropriate |
384 | */ | 293 | */ |
385 | list_for_each_entry(clkdm, &clkdm_list, node) { | 294 | list_for_each_entry(clkdm, &clkdm_list, node) { |
386 | _init_wkdep_usecount(clkdm); | 295 | if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) |
387 | _init_sleepdep_usecount(clkdm); | 296 | omap2_clkdm_wakeup(clkdm); |
297 | else if (clkdm->flags & CLKDM_CAN_DISABLE_AUTO) | ||
298 | omap2_clkdm_deny_idle(clkdm); | ||
299 | |||
300 | clkdm_clear_all_wkdeps(clkdm); | ||
301 | clkdm_clear_all_sleepdeps(clkdm); | ||
388 | } | 302 | } |
389 | } | 303 | } |
390 | 304 | ||
@@ -592,6 +506,9 @@ int clkdm_clear_all_wkdeps(struct clockdomain *clkdm) | |||
592 | if (!omap_chip_is(cd->omap_chip)) | 506 | if (!omap_chip_is(cd->omap_chip)) |
593 | continue; | 507 | continue; |
594 | 508 | ||
509 | if (!cd->clkdm && cd->clkdm_name) | ||
510 | cd->clkdm = _clkdm_lookup(cd->clkdm_name); | ||
511 | |||
595 | /* PRM accesses are slow, so minimize them */ | 512 | /* PRM accesses are slow, so minimize them */ |
596 | mask |= 1 << cd->clkdm->dep_bit; | 513 | mask |= 1 << cd->clkdm->dep_bit; |
597 | atomic_set(&cd->wkdep_usecount, 0); | 514 | atomic_set(&cd->wkdep_usecount, 0); |
@@ -752,6 +669,9 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm) | |||
752 | if (!omap_chip_is(cd->omap_chip)) | 669 | if (!omap_chip_is(cd->omap_chip)) |
753 | continue; | 670 | continue; |
754 | 671 | ||
672 | if (!cd->clkdm && cd->clkdm_name) | ||
673 | cd->clkdm = _clkdm_lookup(cd->clkdm_name); | ||
674 | |||
755 | /* PRM accesses are slow, so minimize them */ | 675 | /* PRM accesses are slow, so minimize them */ |
756 | mask |= 1 << cd->clkdm->dep_bit; | 676 | mask |= 1 << cd->clkdm->dep_bit; |
757 | atomic_set(&cd->sleepdep_usecount, 0); | 677 | atomic_set(&cd->sleepdep_usecount, 0); |
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h index fe82b79d5f3b..4f959a7d881c 100644 --- a/arch/arm/mach-omap2/cm-regbits-34xx.h +++ b/arch/arm/mach-omap2/cm-regbits-34xx.h | |||
@@ -649,6 +649,8 @@ | |||
649 | #define OMAP3430_ST_MCBSP2_MASK (1 << 0) | 649 | #define OMAP3430_ST_MCBSP2_MASK (1 << 0) |
650 | 650 | ||
651 | /* CM_AUTOIDLE_PER */ | 651 | /* CM_AUTOIDLE_PER */ |
652 | #define OMAP3630_AUTO_UART4_MASK (1 << 18) | ||
653 | #define OMAP3630_AUTO_UART4_SHIFT 18 | ||
652 | #define OMAP3430_AUTO_GPIO6_MASK (1 << 17) | 654 | #define OMAP3430_AUTO_GPIO6_MASK (1 << 17) |
653 | #define OMAP3430_AUTO_GPIO6_SHIFT 17 | 655 | #define OMAP3430_AUTO_GPIO6_SHIFT 17 |
654 | #define OMAP3430_AUTO_GPIO5_MASK (1 << 16) | 656 | #define OMAP3430_AUTO_GPIO5_MASK (1 << 16) |
diff --git a/arch/arm/mach-omap2/cm-regbits-44xx.h b/arch/arm/mach-omap2/cm-regbits-44xx.h index ac8458e43252..0b72be433776 100644 --- a/arch/arm/mach-omap2/cm-regbits-44xx.h +++ b/arch/arm/mach-omap2/cm-regbits-44xx.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP44xx Clock Management register bits | 2 | * OMAP44xx Clock Management register bits |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. |
5 | * Copyright (C) 2009 Nokia Corporation | 5 | * Copyright (C) 2009-2010 Nokia Corporation |
6 | * | 6 | * |
7 | * Paul Walmsley (paul@pwsan.com) | 7 | * Paul Walmsley (paul@pwsan.com) |
8 | * Rajendra Nayak (rnayak@ti.com) | 8 | * Rajendra Nayak (rnayak@ti.com) |
@@ -25,453 +25,459 @@ | |||
25 | #include "cm.h" | 25 | #include "cm.h" |
26 | 26 | ||
27 | 27 | ||
28 | /* Used by CM_L3_1_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP */ | 28 | /* |
29 | * Used by CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP, | ||
30 | * CM_TESLA_DYNAMICDEP | ||
31 | */ | ||
29 | #define OMAP4430_ABE_DYNDEP_SHIFT 3 | 32 | #define OMAP4430_ABE_DYNDEP_SHIFT 3 |
30 | #define OMAP4430_ABE_DYNDEP_MASK BITFIELD(3, 3) | 33 | #define OMAP4430_ABE_DYNDEP_MASK (1 << 3) |
31 | 34 | ||
32 | /* | 35 | /* |
33 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, | 36 | * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, |
34 | * CM_L3INIT_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP, | 37 | * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, |
35 | * CM_TESLA_STATICDEP | 38 | * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP |
36 | */ | 39 | */ |
37 | #define OMAP4430_ABE_STATDEP_SHIFT 3 | 40 | #define OMAP4430_ABE_STATDEP_SHIFT 3 |
38 | #define OMAP4430_ABE_STATDEP_MASK BITFIELD(3, 3) | 41 | #define OMAP4430_ABE_STATDEP_MASK (1 << 3) |
39 | 42 | ||
40 | /* Used by CM_L4CFG_DYNAMICDEP */ | 43 | /* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ |
41 | #define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16 | 44 | #define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16 |
42 | #define OMAP4430_ALWONCORE_DYNDEP_MASK BITFIELD(16, 16) | 45 | #define OMAP4430_ALWONCORE_DYNDEP_MASK (1 << 16) |
43 | 46 | ||
44 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */ | 47 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */ |
45 | #define OMAP4430_ALWONCORE_STATDEP_SHIFT 16 | 48 | #define OMAP4430_ALWONCORE_STATDEP_SHIFT 16 |
46 | #define OMAP4430_ALWONCORE_STATDEP_MASK BITFIELD(16, 16) | 49 | #define OMAP4430_ALWONCORE_STATDEP_MASK (1 << 16) |
47 | 50 | ||
48 | /* | 51 | /* |
49 | * Used by CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB, | 52 | * Used by CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE, |
50 | * CM_AUTOIDLE_DPLL_CORE_RESTORE, CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE, | 53 | * CM_AUTOIDLE_DPLL_CORE_RESTORE, CM_AUTOIDLE_DPLL_DDRPHY, |
51 | * CM_AUTOIDLE_DPLL_DDRPHY, CM_AUTOIDLE_DPLL_IVA, CM_AUTOIDLE_DPLL_MPU | 54 | * CM_AUTOIDLE_DPLL_IVA, CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER, |
55 | * CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB | ||
52 | */ | 56 | */ |
53 | #define OMAP4430_AUTO_DPLL_MODE_SHIFT 0 | 57 | #define OMAP4430_AUTO_DPLL_MODE_SHIFT 0 |
54 | #define OMAP4430_AUTO_DPLL_MODE_MASK BITFIELD(0, 2) | 58 | #define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0) |
55 | 59 | ||
56 | /* Used by CM_L4CFG_DYNAMICDEP */ | 60 | /* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ |
57 | #define OMAP4430_CEFUSE_DYNDEP_SHIFT 17 | 61 | #define OMAP4430_CEFUSE_DYNDEP_SHIFT 17 |
58 | #define OMAP4430_CEFUSE_DYNDEP_MASK BITFIELD(17, 17) | 62 | #define OMAP4430_CEFUSE_DYNDEP_MASK (1 << 17) |
59 | 63 | ||
60 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */ | 64 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_TESLA_STATICDEP */ |
61 | #define OMAP4430_CEFUSE_STATDEP_SHIFT 17 | 65 | #define OMAP4430_CEFUSE_STATDEP_SHIFT 17 |
62 | #define OMAP4430_CEFUSE_STATDEP_MASK BITFIELD(17, 17) | 66 | #define OMAP4430_CEFUSE_STATDEP_MASK (1 << 17) |
63 | 67 | ||
64 | /* Used by CM1_ABE_CLKSTCTRL */ | 68 | /* Used by CM1_ABE_CLKSTCTRL */ |
65 | #define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_SHIFT 13 | 69 | #define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_SHIFT 13 |
66 | #define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_MASK BITFIELD(13, 13) | 70 | #define OMAP4430_CLKACTIVITY_ABE_24M_GFCLK_MASK (1 << 13) |
67 | 71 | ||
68 | /* Used by CM1_ABE_CLKSTCTRL */ | 72 | /* Used by CM1_ABE_CLKSTCTRL */ |
69 | #define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_SHIFT 12 | 73 | #define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_SHIFT 12 |
70 | #define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_MASK BITFIELD(12, 12) | 74 | #define OMAP4430_CLKACTIVITY_ABE_ALWON_32K_CLK_MASK (1 << 12) |
71 | 75 | ||
72 | /* Used by CM_WKUP_CLKSTCTRL */ | 76 | /* Used by CM_WKUP_CLKSTCTRL */ |
73 | #define OMAP4430_CLKACTIVITY_ABE_LP_CLK_SHIFT 9 | 77 | #define OMAP4430_CLKACTIVITY_ABE_LP_CLK_SHIFT 9 |
74 | #define OMAP4430_CLKACTIVITY_ABE_LP_CLK_MASK BITFIELD(9, 9) | 78 | #define OMAP4430_CLKACTIVITY_ABE_LP_CLK_MASK (1 << 9) |
75 | 79 | ||
76 | /* Used by CM1_ABE_CLKSTCTRL */ | 80 | /* Used by CM1_ABE_CLKSTCTRL */ |
77 | #define OMAP4430_CLKACTIVITY_ABE_SYSCLK_SHIFT 11 | 81 | #define OMAP4430_CLKACTIVITY_ABE_SYSCLK_SHIFT 11 |
78 | #define OMAP4430_CLKACTIVITY_ABE_SYSCLK_MASK BITFIELD(11, 11) | 82 | #define OMAP4430_CLKACTIVITY_ABE_SYSCLK_MASK (1 << 11) |
79 | 83 | ||
80 | /* Used by CM1_ABE_CLKSTCTRL */ | 84 | /* Used by CM1_ABE_CLKSTCTRL */ |
81 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8 | 85 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8 |
82 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK BITFIELD(8, 8) | 86 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8) |
83 | 87 | ||
84 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 88 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ |
85 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11 | 89 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11 |
86 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK BITFIELD(11, 11) | 90 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK (1 << 11) |
87 | 91 | ||
88 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 92 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ |
89 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12 | 93 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12 |
90 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK BITFIELD(12, 12) | 94 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK (1 << 12) |
91 | 95 | ||
92 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 96 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ |
93 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13 | 97 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13 |
94 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK BITFIELD(13, 13) | 98 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK (1 << 13) |
95 | 99 | ||
96 | /* Used by CM_CAM_CLKSTCTRL */ | 100 | /* Used by CM_CAM_CLKSTCTRL */ |
97 | #define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_SHIFT 9 | 101 | #define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_SHIFT 9 |
98 | #define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_MASK BITFIELD(9, 9) | 102 | #define OMAP4430_CLKACTIVITY_CAM_PHY_CTRL_GCLK_MASK (1 << 9) |
103 | |||
104 | /* Used by CM_ALWON_CLKSTCTRL */ | ||
105 | #define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_SHIFT 12 | ||
106 | #define OMAP4430_CLKACTIVITY_CORE_ALWON_32K_GFCLK_MASK (1 << 12) | ||
99 | 107 | ||
100 | /* Used by CM_EMU_CLKSTCTRL */ | 108 | /* Used by CM_EMU_CLKSTCTRL */ |
101 | #define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_SHIFT 9 | 109 | #define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_SHIFT 9 |
102 | #define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_MASK BITFIELD(9, 9) | 110 | #define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_MASK (1 << 9) |
103 | 111 | ||
104 | /* Used by CM_CEFUSE_CLKSTCTRL */ | 112 | /* Used by CM_CEFUSE_CLKSTCTRL */ |
105 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 | 113 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 |
106 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK BITFIELD(9, 9) | 114 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9) |
107 | 115 | ||
108 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 116 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ |
109 | #define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9 | 117 | #define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9 |
110 | #define OMAP4430_CLKACTIVITY_DLL_CLK_MASK BITFIELD(9, 9) | 118 | #define OMAP4430_CLKACTIVITY_DLL_CLK_MASK (1 << 9) |
111 | 119 | ||
112 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 120 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
113 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9 | 121 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9 |
114 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK BITFIELD(9, 9) | 122 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK (1 << 9) |
115 | 123 | ||
116 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 124 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
117 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10 | 125 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10 |
118 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK BITFIELD(10, 10) | 126 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK (1 << 10) |
119 | 127 | ||
120 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 128 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
121 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11 | 129 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11 |
122 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK BITFIELD(11, 11) | 130 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK (1 << 11) |
123 | 131 | ||
124 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 132 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
125 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12 | 133 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12 |
126 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK BITFIELD(12, 12) | 134 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK (1 << 12) |
127 | 135 | ||
128 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 136 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
129 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13 | 137 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13 |
130 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK BITFIELD(13, 13) | 138 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK (1 << 13) |
131 | 139 | ||
132 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 140 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
133 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14 | 141 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14 |
134 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK BITFIELD(14, 14) | 142 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK (1 << 14) |
135 | 143 | ||
136 | /* Used by CM_DSS_CLKSTCTRL */ | 144 | /* Used by CM_DSS_CLKSTCTRL */ |
137 | #define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_SHIFT 10 | 145 | #define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_SHIFT 10 |
138 | #define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_MASK BITFIELD(10, 10) | 146 | #define OMAP4430_CLKACTIVITY_DSS_ALWON_SYS_CLK_MASK (1 << 10) |
139 | 147 | ||
140 | /* Used by CM_DSS_CLKSTCTRL */ | 148 | /* Used by CM_DSS_CLKSTCTRL */ |
141 | #define OMAP4430_CLKACTIVITY_DSS_FCLK_SHIFT 9 | 149 | #define OMAP4430_CLKACTIVITY_DSS_FCLK_SHIFT 9 |
142 | #define OMAP4430_CLKACTIVITY_DSS_FCLK_MASK BITFIELD(9, 9) | 150 | #define OMAP4430_CLKACTIVITY_DSS_FCLK_MASK (1 << 9) |
143 | 151 | ||
144 | /* Used by CM_DUCATI_CLKSTCTRL */ | 152 | /* Used by CM_DUCATI_CLKSTCTRL */ |
145 | #define OMAP4430_CLKACTIVITY_DUCATI_GCLK_SHIFT 8 | 153 | #define OMAP4430_CLKACTIVITY_DUCATI_GCLK_SHIFT 8 |
146 | #define OMAP4430_CLKACTIVITY_DUCATI_GCLK_MASK BITFIELD(8, 8) | 154 | #define OMAP4430_CLKACTIVITY_DUCATI_GCLK_MASK (1 << 8) |
147 | |||
148 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | ||
149 | #define OMAP4430_CLKACTIVITY_EMAC_50MHZ_CLK_SHIFT 10 | ||
150 | #define OMAP4430_CLKACTIVITY_EMAC_50MHZ_CLK_MASK BITFIELD(10, 10) | ||
151 | 155 | ||
152 | /* Used by CM_EMU_CLKSTCTRL */ | 156 | /* Used by CM_EMU_CLKSTCTRL */ |
153 | #define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_SHIFT 8 | 157 | #define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_SHIFT 8 |
154 | #define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_MASK BITFIELD(8, 8) | 158 | #define OMAP4430_CLKACTIVITY_EMU_SYS_CLK_MASK (1 << 8) |
155 | 159 | ||
156 | /* Used by CM_CAM_CLKSTCTRL */ | 160 | /* Used by CM_CAM_CLKSTCTRL */ |
157 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10 | 161 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10 |
158 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK BITFIELD(10, 10) | 162 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK (1 << 10) |
159 | 163 | ||
160 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 164 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
161 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15 | 165 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15 |
162 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK BITFIELD(15, 15) | 166 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK (1 << 15) |
163 | 167 | ||
164 | /* Used by CM1_ABE_CLKSTCTRL */ | 168 | /* Used by CM1_ABE_CLKSTCTRL */ |
165 | #define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_SHIFT 10 | 169 | #define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_SHIFT 10 |
166 | #define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_MASK BITFIELD(10, 10) | 170 | #define OMAP4430_CLKACTIVITY_FUNC_24M_GFCLK_MASK (1 << 10) |
167 | 171 | ||
168 | /* Used by CM_DSS_CLKSTCTRL */ | 172 | /* Used by CM_DSS_CLKSTCTRL */ |
169 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11 | 173 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11 |
170 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK BITFIELD(11, 11) | 174 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK (1 << 11) |
171 | 175 | ||
172 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 176 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
173 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20 | 177 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20 |
174 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK BITFIELD(20, 20) | 178 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20) |
175 | 179 | ||
176 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 180 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
177 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26 | 181 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26 |
178 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK BITFIELD(26, 26) | 182 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26) |
179 | 183 | ||
180 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 184 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
181 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21 | 185 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21 |
182 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK BITFIELD(21, 21) | 186 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21) |
183 | 187 | ||
184 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 188 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
185 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27 | 189 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27 |
186 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK BITFIELD(27, 27) | 190 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27) |
187 | |||
188 | /* Used by CM_L3INIT_CLKSTCTRL */ | ||
189 | #define OMAP4430_CLKACTIVITY_INIT_32K_GFCLK_SHIFT 31 | ||
190 | #define OMAP4430_CLKACTIVITY_INIT_32K_GFCLK_MASK BITFIELD(31, 31) | ||
191 | 191 | ||
192 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 192 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
193 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13 | 193 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13 |
194 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK BITFIELD(13, 13) | 194 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK (1 << 13) |
195 | 195 | ||
196 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 196 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
197 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12 | 197 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12 |
198 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK BITFIELD(12, 12) | 198 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK (1 << 12) |
199 | 199 | ||
200 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 200 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
201 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28 | 201 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28 |
202 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK BITFIELD(28, 28) | 202 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK (1 << 28) |
203 | 203 | ||
204 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 204 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
205 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29 | 205 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29 |
206 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK BITFIELD(29, 29) | 206 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK (1 << 29) |
207 | 207 | ||
208 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 208 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
209 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11 | 209 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11 |
210 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK BITFIELD(11, 11) | 210 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK (1 << 11) |
211 | 211 | ||
212 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 212 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
213 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16 | 213 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16 |
214 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK BITFIELD(16, 16) | 214 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK (1 << 16) |
215 | 215 | ||
216 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 216 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
217 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17 | 217 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17 |
218 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK BITFIELD(17, 17) | 218 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK (1 << 17) |
219 | 219 | ||
220 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 220 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
221 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18 | 221 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18 |
222 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK BITFIELD(18, 18) | 222 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK (1 << 18) |
223 | 223 | ||
224 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 224 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
225 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19 | 225 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19 |
226 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK BITFIELD(19, 19) | 226 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK (1 << 19) |
227 | 227 | ||
228 | /* Used by CM_CAM_CLKSTCTRL */ | 228 | /* Used by CM_CAM_CLKSTCTRL */ |
229 | #define OMAP4430_CLKACTIVITY_ISS_GCLK_SHIFT 8 | 229 | #define OMAP4430_CLKACTIVITY_ISS_GCLK_SHIFT 8 |
230 | #define OMAP4430_CLKACTIVITY_ISS_GCLK_MASK BITFIELD(8, 8) | 230 | #define OMAP4430_CLKACTIVITY_ISS_GCLK_MASK (1 << 8) |
231 | 231 | ||
232 | /* Used by CM_IVAHD_CLKSTCTRL */ | 232 | /* Used by CM_IVAHD_CLKSTCTRL */ |
233 | #define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_SHIFT 8 | 233 | #define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_SHIFT 8 |
234 | #define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_MASK BITFIELD(8, 8) | 234 | #define OMAP4430_CLKACTIVITY_IVAHD_ROOT_CLK_MASK (1 << 8) |
235 | 235 | ||
236 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 236 | /* Used by CM_D2D_CLKSTCTRL */ |
237 | #define OMAP4430_CLKACTIVITY_L3INIT_DPLL_ALWON_CLK_SHIFT 14 | 237 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT 10 |
238 | #define OMAP4430_CLKACTIVITY_L3INIT_DPLL_ALWON_CLK_MASK BITFIELD(14, 14) | 238 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK (1 << 10) |
239 | 239 | ||
240 | /* Used by CM_L3_1_CLKSTCTRL, CM_L3_1_CLKSTCTRL_RESTORE */ | 240 | /* Used by CM_L3_1_CLKSTCTRL, CM_L3_1_CLKSTCTRL_RESTORE */ |
241 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8 | 241 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8 |
242 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK BITFIELD(8, 8) | 242 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK (1 << 8) |
243 | 243 | ||
244 | /* Used by CM_L3_2_CLKSTCTRL, CM_L3_2_CLKSTCTRL_RESTORE */ | 244 | /* Used by CM_L3_2_CLKSTCTRL, CM_L3_2_CLKSTCTRL_RESTORE */ |
245 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8 | 245 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8 |
246 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK BITFIELD(8, 8) | 246 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK (1 << 8) |
247 | 247 | ||
248 | /* Used by CM_D2D_CLKSTCTRL */ | 248 | /* Used by CM_D2D_CLKSTCTRL */ |
249 | #define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_SHIFT 8 | 249 | #define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_SHIFT 8 |
250 | #define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_MASK BITFIELD(8, 8) | 250 | #define OMAP4430_CLKACTIVITY_L3_D2D_GICLK_MASK (1 << 8) |
251 | 251 | ||
252 | /* Used by CM_SDMA_CLKSTCTRL */ | 252 | /* Used by CM_SDMA_CLKSTCTRL */ |
253 | #define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_SHIFT 8 | 253 | #define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_SHIFT 8 |
254 | #define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_MASK BITFIELD(8, 8) | 254 | #define OMAP4430_CLKACTIVITY_L3_DMA_GICLK_MASK (1 << 8) |
255 | 255 | ||
256 | /* Used by CM_DSS_CLKSTCTRL */ | 256 | /* Used by CM_DSS_CLKSTCTRL */ |
257 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8 | 257 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8 |
258 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK BITFIELD(8, 8) | 258 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK (1 << 8) |
259 | 259 | ||
260 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 260 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ |
261 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8 | 261 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8 |
262 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK BITFIELD(8, 8) | 262 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK (1 << 8) |
263 | 263 | ||
264 | /* Used by CM_GFX_CLKSTCTRL */ | 264 | /* Used by CM_GFX_CLKSTCTRL */ |
265 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8 | 265 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8 |
266 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK BITFIELD(8, 8) | 266 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK (1 << 8) |
267 | 267 | ||
268 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 268 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
269 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8 | 269 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8 |
270 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK BITFIELD(8, 8) | 270 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK (1 << 8) |
271 | 271 | ||
272 | /* Used by CM_L3INSTR_CLKSTCTRL */ | 272 | /* Used by CM_L3INSTR_CLKSTCTRL */ |
273 | #define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_SHIFT 8 | 273 | #define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_SHIFT 8 |
274 | #define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_MASK BITFIELD(8, 8) | 274 | #define OMAP4430_CLKACTIVITY_L3_INSTR_GICLK_MASK (1 << 8) |
275 | 275 | ||
276 | /* Used by CM_L4SEC_CLKSTCTRL */ | 276 | /* Used by CM_L4SEC_CLKSTCTRL */ |
277 | #define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_SHIFT 8 | 277 | #define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_SHIFT 8 |
278 | #define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_MASK BITFIELD(8, 8) | 278 | #define OMAP4430_CLKACTIVITY_L3_SECURE_GICLK_MASK (1 << 8) |
279 | 279 | ||
280 | /* Used by CM_ALWON_CLKSTCTRL */ | 280 | /* Used by CM_ALWON_CLKSTCTRL */ |
281 | #define OMAP4430_CLKACTIVITY_L4_AO_ICLK_SHIFT 8 | 281 | #define OMAP4430_CLKACTIVITY_L4_AO_ICLK_SHIFT 8 |
282 | #define OMAP4430_CLKACTIVITY_L4_AO_ICLK_MASK BITFIELD(8, 8) | 282 | #define OMAP4430_CLKACTIVITY_L4_AO_ICLK_MASK (1 << 8) |
283 | 283 | ||
284 | /* Used by CM_CEFUSE_CLKSTCTRL */ | 284 | /* Used by CM_CEFUSE_CLKSTCTRL */ |
285 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 | 285 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 |
286 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK BITFIELD(8, 8) | 286 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8) |
287 | 287 | ||
288 | /* Used by CM_L4CFG_CLKSTCTRL, CM_L4CFG_CLKSTCTRL_RESTORE */ | 288 | /* Used by CM_L4CFG_CLKSTCTRL, CM_L4CFG_CLKSTCTRL_RESTORE */ |
289 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8 | 289 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8 |
290 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK BITFIELD(8, 8) | 290 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK (1 << 8) |
291 | 291 | ||
292 | /* Used by CM_D2D_CLKSTCTRL */ | 292 | /* Used by CM_D2D_CLKSTCTRL */ |
293 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9 | 293 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9 |
294 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK BITFIELD(9, 9) | 294 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK (1 << 9) |
295 | 295 | ||
296 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 296 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
297 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9 | 297 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9 |
298 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK BITFIELD(9, 9) | 298 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK (1 << 9) |
299 | 299 | ||
300 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 300 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
301 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8 | 301 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8 |
302 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK BITFIELD(8, 8) | 302 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK (1 << 8) |
303 | 303 | ||
304 | /* Used by CM_L4SEC_CLKSTCTRL */ | 304 | /* Used by CM_L4SEC_CLKSTCTRL */ |
305 | #define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_SHIFT 9 | 305 | #define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_SHIFT 9 |
306 | #define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_MASK BITFIELD(9, 9) | 306 | #define OMAP4430_CLKACTIVITY_L4_SECURE_GICLK_MASK (1 << 9) |
307 | 307 | ||
308 | /* Used by CM_WKUP_CLKSTCTRL */ | 308 | /* Used by CM_WKUP_CLKSTCTRL */ |
309 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12 | 309 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12 |
310 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK BITFIELD(12, 12) | 310 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK (1 << 12) |
311 | 311 | ||
312 | /* Used by CM_MPU_CLKSTCTRL, CM_MPU_CLKSTCTRL_RESTORE */ | 312 | /* Used by CM_MPU_CLKSTCTRL, CM_MPU_CLKSTCTRL_RESTORE */ |
313 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8 | 313 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8 |
314 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK BITFIELD(8, 8) | 314 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK (1 << 8) |
315 | 315 | ||
316 | /* Used by CM1_ABE_CLKSTCTRL */ | 316 | /* Used by CM1_ABE_CLKSTCTRL */ |
317 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9 | 317 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9 |
318 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK BITFIELD(9, 9) | 318 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK (1 << 9) |
319 | 319 | ||
320 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 320 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
321 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16 | 321 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16 |
322 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK BITFIELD(16, 16) | 322 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK (1 << 16) |
323 | 323 | ||
324 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 324 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
325 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17 | 325 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17 |
326 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK BITFIELD(17, 17) | 326 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17) |
327 | 327 | ||
328 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 328 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
329 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18 | 329 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18 |
330 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK BITFIELD(18, 18) | 330 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18) |
331 | 331 | ||
332 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 332 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
333 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19 | 333 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19 |
334 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK BITFIELD(19, 19) | 334 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19) |
335 | 335 | ||
336 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 336 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
337 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25 | 337 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25 |
338 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK BITFIELD(25, 25) | 338 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK (1 << 25) |
339 | |||
340 | /* Used by CM_EMU_CLKSTCTRL */ | ||
341 | #define OMAP4430_CLKACTIVITY_PER_DPLL_EMU_CLK_SHIFT 10 | ||
342 | #define OMAP4430_CLKACTIVITY_PER_DPLL_EMU_CLK_MASK BITFIELD(10, 10) | ||
343 | 339 | ||
344 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 340 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
345 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20 | 341 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20 |
346 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK BITFIELD(20, 20) | 342 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK (1 << 20) |
347 | 343 | ||
348 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 344 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
349 | #define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_SHIFT 21 | 345 | #define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_SHIFT 21 |
350 | #define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_MASK BITFIELD(21, 21) | 346 | #define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_MASK (1 << 21) |
351 | 347 | ||
352 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 348 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
353 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22 | 349 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22 |
354 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK BITFIELD(22, 22) | 350 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK (1 << 22) |
355 | 351 | ||
356 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 352 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ |
357 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24 | 353 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24 |
358 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK BITFIELD(24, 24) | 354 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK (1 << 24) |
359 | 355 | ||
360 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 356 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ |
361 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10 | 357 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10 |
362 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK BITFIELD(10, 10) | 358 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK (1 << 10) |
363 | 359 | ||
364 | /* Used by CM_GFX_CLKSTCTRL */ | 360 | /* Used by CM_GFX_CLKSTCTRL */ |
365 | #define OMAP4430_CLKACTIVITY_SGX_GFCLK_SHIFT 9 | 361 | #define OMAP4430_CLKACTIVITY_SGX_GFCLK_SHIFT 9 |
366 | #define OMAP4430_CLKACTIVITY_SGX_GFCLK_MASK BITFIELD(9, 9) | 362 | #define OMAP4430_CLKACTIVITY_SGX_GFCLK_MASK (1 << 9) |
367 | 363 | ||
368 | /* Used by CM_ALWON_CLKSTCTRL */ | 364 | /* Used by CM_ALWON_CLKSTCTRL */ |
369 | #define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_SHIFT 11 | 365 | #define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_SHIFT 11 |
370 | #define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_MASK BITFIELD(11, 11) | 366 | #define OMAP4430_CLKACTIVITY_SR_CORE_SYSCLK_MASK (1 << 11) |
371 | 367 | ||
372 | /* Used by CM_ALWON_CLKSTCTRL */ | 368 | /* Used by CM_ALWON_CLKSTCTRL */ |
373 | #define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_SHIFT 10 | 369 | #define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_SHIFT 10 |
374 | #define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_MASK BITFIELD(10, 10) | 370 | #define OMAP4430_CLKACTIVITY_SR_IVA_SYSCLK_MASK (1 << 10) |
375 | 371 | ||
376 | /* Used by CM_ALWON_CLKSTCTRL */ | 372 | /* Used by CM_ALWON_CLKSTCTRL */ |
377 | #define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_SHIFT 9 | 373 | #define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_SHIFT 9 |
378 | #define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_MASK BITFIELD(9, 9) | 374 | #define OMAP4430_CLKACTIVITY_SR_MPU_SYSCLK_MASK (1 << 9) |
379 | 375 | ||
380 | /* Used by CM_WKUP_CLKSTCTRL */ | 376 | /* Used by CM_WKUP_CLKSTCTRL */ |
381 | #define OMAP4430_CLKACTIVITY_SYS_CLK_SHIFT 8 | 377 | #define OMAP4430_CLKACTIVITY_SYS_CLK_SHIFT 8 |
382 | #define OMAP4430_CLKACTIVITY_SYS_CLK_MASK BITFIELD(8, 8) | 378 | #define OMAP4430_CLKACTIVITY_SYS_CLK_MASK (1 << 8) |
383 | 379 | ||
384 | /* Used by CM_TESLA_CLKSTCTRL */ | 380 | /* Used by CM_TESLA_CLKSTCTRL */ |
385 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8 | 381 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8 |
386 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK BITFIELD(8, 8) | 382 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK (1 << 8) |
387 | 383 | ||
388 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 384 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
389 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22 | 385 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22 |
390 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK BITFIELD(22, 22) | 386 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22) |
391 | 387 | ||
392 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 388 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
393 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23 | 389 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23 |
394 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK BITFIELD(23, 23) | 390 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23) |
395 | 391 | ||
396 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 392 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
397 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24 | 393 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24 |
398 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK BITFIELD(24, 24) | 394 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24) |
395 | |||
396 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | ||
397 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT 10 | ||
398 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK (1 << 10) | ||
399 | |||
400 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | ||
401 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14 | ||
402 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14) | ||
399 | 403 | ||
400 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 404 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
401 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15 | 405 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15 |
402 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK BITFIELD(15, 15) | 406 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15) |
403 | 407 | ||
404 | /* Used by CM_WKUP_CLKSTCTRL */ | 408 | /* Used by CM_WKUP_CLKSTCTRL */ |
405 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10 | 409 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10 |
406 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK BITFIELD(10, 10) | 410 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK (1 << 10) |
407 | 411 | ||
408 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 412 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
409 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30 | 413 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30 |
410 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK BITFIELD(30, 30) | 414 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30) |
411 | 415 | ||
412 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 416 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ |
413 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25 | 417 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25 |
414 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK BITFIELD(25, 25) | 418 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25) |
415 | 419 | ||
416 | /* Used by CM_WKUP_CLKSTCTRL */ | 420 | /* Used by CM_WKUP_CLKSTCTRL */ |
417 | #define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_SHIFT 11 | 421 | #define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_SHIFT 11 |
418 | #define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_MASK BITFIELD(11, 11) | 422 | #define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_MASK (1 << 11) |
419 | 423 | ||
420 | /* | 424 | /* |
421 | * Used by CM_WKUP_TIMER1_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL, | 425 | * Used by CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, |
426 | * CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, | ||
427 | * CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_MMC6_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL, | ||
422 | * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL, | 428 | * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL, |
423 | * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL, | 429 | * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL, |
424 | * CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, | 430 | * CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, |
425 | * CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, CM_L3INIT_MMC6_CLKCTRL, | 431 | * CM_WKUP_TIMER1_CLKCTRL |
426 | * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, | ||
427 | * CM1_ABE_TIMER8_CLKCTRL | ||
428 | */ | 432 | */ |
429 | #define OMAP4430_CLKSEL_SHIFT 24 | 433 | #define OMAP4430_CLKSEL_SHIFT 24 |
430 | #define OMAP4430_CLKSEL_MASK BITFIELD(24, 24) | 434 | #define OMAP4430_CLKSEL_MASK (1 << 24) |
431 | 435 | ||
432 | /* | 436 | /* |
433 | * Renamed from CLKSEL Used by CM_ABE_DSS_SYS_CLKSEL, CM_ABE_PLL_REF_CLKSEL, | 437 | * Renamed from CLKSEL Used by CM_ABE_DSS_SYS_CLKSEL, CM_ABE_PLL_REF_CLKSEL, |
434 | * CM_DPLL_SYS_REF_CLKSEL, CM_L4_WKUP_CLKSEL, CM_CLKSEL_DUCATI_ISS_ROOT, | 438 | * CM_L4_WKUP_CLKSEL, CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ |
435 | * CM_CLKSEL_USB_60MHZ | ||
436 | */ | 439 | */ |
437 | #define OMAP4430_CLKSEL_0_0_SHIFT 0 | 440 | #define OMAP4430_CLKSEL_0_0_SHIFT 0 |
438 | #define OMAP4430_CLKSEL_0_0_MASK BITFIELD(0, 0) | 441 | #define OMAP4430_CLKSEL_0_0_MASK (1 << 0) |
439 | 442 | ||
440 | /* Renamed from CLKSEL Used by CM_BYPCLK_DPLL_IVA, CM_BYPCLK_DPLL_MPU */ | 443 | /* Renamed from CLKSEL Used by CM_BYPCLK_DPLL_IVA, CM_BYPCLK_DPLL_MPU */ |
441 | #define OMAP4430_CLKSEL_0_1_SHIFT 0 | 444 | #define OMAP4430_CLKSEL_0_1_SHIFT 0 |
442 | #define OMAP4430_CLKSEL_0_1_MASK BITFIELD(0, 1) | 445 | #define OMAP4430_CLKSEL_0_1_MASK (0x3 << 0) |
443 | 446 | ||
444 | /* Renamed from CLKSEL Used by CM_L3INIT_HSI_CLKCTRL */ | 447 | /* Renamed from CLKSEL Used by CM_L3INIT_HSI_CLKCTRL */ |
445 | #define OMAP4430_CLKSEL_24_25_SHIFT 24 | 448 | #define OMAP4430_CLKSEL_24_25_SHIFT 24 |
446 | #define OMAP4430_CLKSEL_24_25_MASK BITFIELD(24, 25) | 449 | #define OMAP4430_CLKSEL_24_25_MASK (0x3 << 24) |
447 | 450 | ||
448 | /* Used by CM_L3INIT_USB_OTG_CLKCTRL */ | 451 | /* Used by CM_L3INIT_USB_OTG_CLKCTRL */ |
449 | #define OMAP4430_CLKSEL_60M_SHIFT 24 | 452 | #define OMAP4430_CLKSEL_60M_SHIFT 24 |
450 | #define OMAP4430_CLKSEL_60M_MASK BITFIELD(24, 24) | 453 | #define OMAP4430_CLKSEL_60M_MASK (1 << 24) |
451 | 454 | ||
452 | /* Used by CM1_ABE_AESS_CLKCTRL */ | 455 | /* Used by CM1_ABE_AESS_CLKCTRL */ |
453 | #define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24 | 456 | #define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24 |
454 | #define OMAP4430_CLKSEL_AESS_FCLK_MASK BITFIELD(24, 24) | 457 | #define OMAP4430_CLKSEL_AESS_FCLK_MASK (1 << 24) |
455 | 458 | ||
456 | /* Used by CM_CLKSEL_CORE_RESTORE, CM_CLKSEL_CORE */ | 459 | /* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */ |
457 | #define OMAP4430_CLKSEL_CORE_SHIFT 0 | 460 | #define OMAP4430_CLKSEL_CORE_SHIFT 0 |
458 | #define OMAP4430_CLKSEL_CORE_MASK BITFIELD(0, 0) | 461 | #define OMAP4430_CLKSEL_CORE_MASK (1 << 0) |
459 | 462 | ||
460 | /* Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2 */ | 463 | /* |
464 | * Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2_RESTORE, | ||
465 | * CM_SHADOW_FREQ_CONFIG2 | ||
466 | */ | ||
461 | #define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1 | 467 | #define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1 |
462 | #define OMAP4430_CLKSEL_CORE_1_1_MASK BITFIELD(1, 1) | 468 | #define OMAP4430_CLKSEL_CORE_1_1_MASK (1 << 1) |
463 | 469 | ||
464 | /* Used by CM_WKUP_USIM_CLKCTRL */ | 470 | /* Used by CM_WKUP_USIM_CLKCTRL */ |
465 | #define OMAP4430_CLKSEL_DIV_SHIFT 24 | 471 | #define OMAP4430_CLKSEL_DIV_SHIFT 24 |
466 | #define OMAP4430_CLKSEL_DIV_MASK BITFIELD(24, 24) | 472 | #define OMAP4430_CLKSEL_DIV_MASK (1 << 24) |
467 | 473 | ||
468 | /* Used by CM_CAM_FDIF_CLKCTRL */ | 474 | /* Used by CM_CAM_FDIF_CLKCTRL */ |
469 | #define OMAP4430_CLKSEL_FCLK_SHIFT 24 | 475 | #define OMAP4430_CLKSEL_FCLK_SHIFT 24 |
470 | #define OMAP4430_CLKSEL_FCLK_MASK BITFIELD(24, 25) | 476 | #define OMAP4430_CLKSEL_FCLK_MASK (0x3 << 24) |
471 | 477 | ||
472 | /* Used by CM_L4PER_MCBSP4_CLKCTRL */ | 478 | /* Used by CM_L4PER_MCBSP4_CLKCTRL */ |
473 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_SHIFT 25 | 479 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_SHIFT 25 |
474 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK BITFIELD(25, 25) | 480 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK (1 << 25) |
475 | 481 | ||
476 | /* | 482 | /* |
477 | * Renamed from CLKSEL_INTERNAL_SOURCE Used by CM1_ABE_DMIC_CLKCTRL, | 483 | * Renamed from CLKSEL_INTERNAL_SOURCE Used by CM1_ABE_DMIC_CLKCTRL, |
@@ -479,836 +485,869 @@ | |||
479 | * CM1_ABE_MCBSP3_CLKCTRL | 485 | * CM1_ABE_MCBSP3_CLKCTRL |
480 | */ | 486 | */ |
481 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26 | 487 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26 |
482 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK BITFIELD(26, 27) | 488 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK (0x3 << 26) |
483 | 489 | ||
484 | /* Used by CM_CLKSEL_CORE_RESTORE, CM_CLKSEL_CORE */ | 490 | /* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */ |
485 | #define OMAP4430_CLKSEL_L3_SHIFT 4 | 491 | #define OMAP4430_CLKSEL_L3_SHIFT 4 |
486 | #define OMAP4430_CLKSEL_L3_MASK BITFIELD(4, 4) | 492 | #define OMAP4430_CLKSEL_L3_MASK (1 << 4) |
487 | 493 | ||
488 | /* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */ | 494 | /* |
495 | * Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2_RESTORE, | ||
496 | * CM_SHADOW_FREQ_CONFIG2 | ||
497 | */ | ||
489 | #define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2 | 498 | #define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2 |
490 | #define OMAP4430_CLKSEL_L3_SHADOW_MASK BITFIELD(2, 2) | 499 | #define OMAP4430_CLKSEL_L3_SHADOW_MASK (1 << 2) |
491 | 500 | ||
492 | /* Used by CM_CLKSEL_CORE_RESTORE, CM_CLKSEL_CORE */ | 501 | /* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */ |
493 | #define OMAP4430_CLKSEL_L4_SHIFT 8 | 502 | #define OMAP4430_CLKSEL_L4_SHIFT 8 |
494 | #define OMAP4430_CLKSEL_L4_MASK BITFIELD(8, 8) | 503 | #define OMAP4430_CLKSEL_L4_MASK (1 << 8) |
495 | 504 | ||
496 | /* Used by CM_CLKSEL_ABE */ | 505 | /* Used by CM_CLKSEL_ABE */ |
497 | #define OMAP4430_CLKSEL_OPP_SHIFT 0 | 506 | #define OMAP4430_CLKSEL_OPP_SHIFT 0 |
498 | #define OMAP4430_CLKSEL_OPP_MASK BITFIELD(0, 1) | 507 | #define OMAP4430_CLKSEL_OPP_MASK (0x3 << 0) |
499 | |||
500 | /* Used by CM_GFX_GFX_CLKCTRL */ | ||
501 | #define OMAP4430_CLKSEL_PER_192M_SHIFT 25 | ||
502 | #define OMAP4430_CLKSEL_PER_192M_MASK BITFIELD(25, 26) | ||
503 | 508 | ||
504 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ | 509 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ |
505 | #define OMAP4430_CLKSEL_PMD_STM_CLK_SHIFT 27 | 510 | #define OMAP4430_CLKSEL_PMD_STM_CLK_SHIFT 27 |
506 | #define OMAP4430_CLKSEL_PMD_STM_CLK_MASK BITFIELD(27, 29) | 511 | #define OMAP4430_CLKSEL_PMD_STM_CLK_MASK (0x7 << 27) |
507 | 512 | ||
508 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ | 513 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ |
509 | #define OMAP4430_CLKSEL_PMD_TRACE_CLK_SHIFT 24 | 514 | #define OMAP4430_CLKSEL_PMD_TRACE_CLK_SHIFT 24 |
510 | #define OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK BITFIELD(24, 26) | 515 | #define OMAP4430_CLKSEL_PMD_TRACE_CLK_MASK (0x7 << 24) |
511 | 516 | ||
512 | /* Used by CM_GFX_GFX_CLKCTRL */ | 517 | /* Used by CM_GFX_GFX_CLKCTRL */ |
513 | #define OMAP4430_CLKSEL_SGX_FCLK_SHIFT 24 | 518 | #define OMAP4430_CLKSEL_SGX_FCLK_SHIFT 24 |
514 | #define OMAP4430_CLKSEL_SGX_FCLK_MASK BITFIELD(24, 24) | 519 | #define OMAP4430_CLKSEL_SGX_FCLK_MASK (1 << 24) |
515 | 520 | ||
516 | /* | 521 | /* |
517 | * Used by CM1_ABE_DMIC_CLKCTRL, CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, | 522 | * Used by CM1_ABE_DMIC_CLKCTRL, CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, |
518 | * CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL | 523 | * CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL |
519 | */ | 524 | */ |
520 | #define OMAP4430_CLKSEL_SOURCE_SHIFT 24 | 525 | #define OMAP4430_CLKSEL_SOURCE_SHIFT 24 |
521 | #define OMAP4430_CLKSEL_SOURCE_MASK BITFIELD(24, 25) | 526 | #define OMAP4430_CLKSEL_SOURCE_MASK (0x3 << 24) |
522 | 527 | ||
523 | /* Renamed from CLKSEL_SOURCE Used by CM_L4PER_MCBSP4_CLKCTRL */ | 528 | /* Renamed from CLKSEL_SOURCE Used by CM_L4PER_MCBSP4_CLKCTRL */ |
524 | #define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24 | 529 | #define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24 |
525 | #define OMAP4430_CLKSEL_SOURCE_24_24_MASK BITFIELD(24, 24) | 530 | #define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24) |
526 | 531 | ||
527 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 532 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ |
528 | #define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24 | 533 | #define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24 |
529 | #define OMAP4430_CLKSEL_UTMI_P1_MASK BITFIELD(24, 24) | 534 | #define OMAP4430_CLKSEL_UTMI_P1_MASK (1 << 24) |
530 | 535 | ||
531 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 536 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ |
532 | #define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25 | 537 | #define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25 |
533 | #define OMAP4430_CLKSEL_UTMI_P2_MASK BITFIELD(25, 25) | 538 | #define OMAP4430_CLKSEL_UTMI_P2_MASK (1 << 25) |
534 | 539 | ||
535 | /* | 540 | /* |
536 | * Used by CM_WKUP_CLKSTCTRL, CM_EMU_CLKSTCTRL, CM_D2D_CLKSTCTRL, | 541 | * Used by CM1_ABE_CLKSTCTRL, CM_ALWON_CLKSTCTRL, CM_CAM_CLKSTCTRL, |
537 | * CM_DUCATI_CLKSTCTRL, CM_L3INSTR_CLKSTCTRL, CM_L3_1_CLKSTCTRL, | 542 | * CM_CEFUSE_CLKSTCTRL, CM_D2D_CLKSTCTRL, CM_DSS_CLKSTCTRL, |
538 | * CM_L3_2_CLKSTCTRL, CM_L4CFG_CLKSTCTRL, CM_MEMIF_CLKSTCTRL, | 543 | * CM_DUCATI_CLKSTCTRL, CM_EMU_CLKSTCTRL, CM_GFX_CLKSTCTRL, CM_IVAHD_CLKSTCTRL, |
539 | * CM_SDMA_CLKSTCTRL, CM_GFX_CLKSTCTRL, CM_L4PER_CLKSTCTRL, CM_L4SEC_CLKSTCTRL, | 544 | * CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE, CM_L3INSTR_CLKSTCTRL, |
540 | * CM_L3INIT_CLKSTCTRL, CM_CAM_CLKSTCTRL, CM_CEFUSE_CLKSTCTRL, | 545 | * CM_L3_1_CLKSTCTRL, CM_L3_1_CLKSTCTRL_RESTORE, CM_L3_2_CLKSTCTRL, |
541 | * CM_L3INIT_CLKSTCTRL_RESTORE, CM_L3_1_CLKSTCTRL_RESTORE, | 546 | * CM_L3_2_CLKSTCTRL_RESTORE, CM_L4CFG_CLKSTCTRL, CM_L4CFG_CLKSTCTRL_RESTORE, |
542 | * CM_L3_2_CLKSTCTRL_RESTORE, CM_L4CFG_CLKSTCTRL_RESTORE, | 547 | * CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE, CM_L4SEC_CLKSTCTRL, |
543 | * CM_L4PER_CLKSTCTRL_RESTORE, CM_MEMIF_CLKSTCTRL_RESTORE, CM_ALWON_CLKSTCTRL, | 548 | * CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE, CM_MPU_CLKSTCTRL, |
544 | * CM_IVAHD_CLKSTCTRL, CM_DSS_CLKSTCTRL, CM_MPU_CLKSTCTRL, CM_TESLA_CLKSTCTRL, | 549 | * CM_MPU_CLKSTCTRL_RESTORE, CM_SDMA_CLKSTCTRL, CM_TESLA_CLKSTCTRL, |
545 | * CM1_ABE_CLKSTCTRL, CM_MPU_CLKSTCTRL_RESTORE | 550 | * CM_WKUP_CLKSTCTRL |
546 | */ | 551 | */ |
547 | #define OMAP4430_CLKTRCTRL_SHIFT 0 | 552 | #define OMAP4430_CLKTRCTRL_SHIFT 0 |
548 | #define OMAP4430_CLKTRCTRL_MASK BITFIELD(0, 1) | 553 | #define OMAP4430_CLKTRCTRL_MASK (0x3 << 0) |
549 | 554 | ||
550 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ | 555 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ |
551 | #define OMAP4430_CORE_DPLL_EMU_DIV_SHIFT 0 | 556 | #define OMAP4430_CORE_DPLL_EMU_DIV_SHIFT 0 |
552 | #define OMAP4430_CORE_DPLL_EMU_DIV_MASK BITFIELD(0, 6) | 557 | #define OMAP4430_CORE_DPLL_EMU_DIV_MASK (0x7f << 0) |
553 | 558 | ||
554 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ | 559 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ |
555 | #define OMAP4430_CORE_DPLL_EMU_MULT_SHIFT 8 | 560 | #define OMAP4430_CORE_DPLL_EMU_MULT_SHIFT 8 |
556 | #define OMAP4430_CORE_DPLL_EMU_MULT_MASK BITFIELD(8, 18) | 561 | #define OMAP4430_CORE_DPLL_EMU_MULT_MASK (0x7ff << 8) |
562 | |||
563 | /* Used by REVISION_CM1, REVISION_CM2 */ | ||
564 | #define OMAP4430_CUSTOM_SHIFT 6 | ||
565 | #define OMAP4430_CUSTOM_MASK (0x3 << 6) | ||
557 | 566 | ||
558 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */ | 567 | /* |
568 | * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, | ||
569 | * CM_L4CFG_DYNAMICDEP_RESTORE | ||
570 | */ | ||
559 | #define OMAP4430_D2D_DYNDEP_SHIFT 18 | 571 | #define OMAP4430_D2D_DYNDEP_SHIFT 18 |
560 | #define OMAP4430_D2D_DYNDEP_MASK BITFIELD(18, 18) | 572 | #define OMAP4430_D2D_DYNDEP_MASK (1 << 18) |
561 | 573 | ||
562 | /* Used by CM_MPU_STATICDEP */ | 574 | /* Used by CM_MPU_STATICDEP */ |
563 | #define OMAP4430_D2D_STATDEP_SHIFT 18 | 575 | #define OMAP4430_D2D_STATDEP_SHIFT 18 |
564 | #define OMAP4430_D2D_STATDEP_MASK BITFIELD(18, 18) | 576 | #define OMAP4430_D2D_STATDEP_MASK (1 << 18) |
565 | 577 | ||
566 | /* | 578 | /* |
567 | * Used by CM_SSC_DELTAMSTEP_DPLL_PER, CM_SSC_DELTAMSTEP_DPLL_UNIPRO, | 579 | * Used by CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE, |
568 | * CM_SSC_DELTAMSTEP_DPLL_USB, CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE, | 580 | * CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE, CM_SSC_DELTAMSTEP_DPLL_DDRPHY, |
569 | * CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE, | 581 | * CM_SSC_DELTAMSTEP_DPLL_IVA, CM_SSC_DELTAMSTEP_DPLL_MPU, |
570 | * CM_SSC_DELTAMSTEP_DPLL_DDRPHY, CM_SSC_DELTAMSTEP_DPLL_IVA, | 582 | * CM_SSC_DELTAMSTEP_DPLL_PER, CM_SSC_DELTAMSTEP_DPLL_UNIPRO, |
571 | * CM_SSC_DELTAMSTEP_DPLL_MPU | 583 | * CM_SSC_DELTAMSTEP_DPLL_USB |
572 | */ | 584 | */ |
573 | #define OMAP4430_DELTAMSTEP_SHIFT 0 | 585 | #define OMAP4430_DELTAMSTEP_SHIFT 0 |
574 | #define OMAP4430_DELTAMSTEP_MASK BITFIELD(0, 19) | 586 | #define OMAP4430_DELTAMSTEP_MASK (0xfffff << 0) |
575 | 587 | ||
576 | /* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */ | 588 | /* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ |
577 | #define OMAP4430_DLL_OVERRIDE_SHIFT 2 | 589 | #define OMAP4430_DLL_OVERRIDE_SHIFT 2 |
578 | #define OMAP4430_DLL_OVERRIDE_MASK BITFIELD(2, 2) | 590 | #define OMAP4430_DLL_OVERRIDE_MASK (1 << 2) |
579 | 591 | ||
580 | /* Renamed from DLL_OVERRIDE Used by CM_DLL_CTRL */ | 592 | /* Renamed from DLL_OVERRIDE Used by CM_DLL_CTRL */ |
581 | #define OMAP4430_DLL_OVERRIDE_0_0_SHIFT 0 | 593 | #define OMAP4430_DLL_OVERRIDE_0_0_SHIFT 0 |
582 | #define OMAP4430_DLL_OVERRIDE_0_0_MASK BITFIELD(0, 0) | 594 | #define OMAP4430_DLL_OVERRIDE_0_0_MASK (1 << 0) |
583 | 595 | ||
584 | /* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */ | 596 | /* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ |
585 | #define OMAP4430_DLL_RESET_SHIFT 3 | 597 | #define OMAP4430_DLL_RESET_SHIFT 3 |
586 | #define OMAP4430_DLL_RESET_MASK BITFIELD(3, 3) | 598 | #define OMAP4430_DLL_RESET_MASK (1 << 3) |
587 | 599 | ||
588 | /* | 600 | /* |
589 | * Used by CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO, CM_CLKSEL_DPLL_USB, | 601 | * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, |
590 | * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, | 602 | * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, |
591 | * CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU | 603 | * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO, |
604 | * CM_CLKSEL_DPLL_USB | ||
592 | */ | 605 | */ |
593 | #define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23 | 606 | #define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23 |
594 | #define OMAP4430_DPLL_BYP_CLKSEL_MASK BITFIELD(23, 23) | 607 | #define OMAP4430_DPLL_BYP_CLKSEL_MASK (1 << 23) |
595 | 608 | ||
596 | /* Used by CM_CLKDCOLDO_DPLL_USB */ | 609 | /* Used by CM_CLKDCOLDO_DPLL_USB */ |
597 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 | 610 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 |
598 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK BITFIELD(8, 8) | 611 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8) |
599 | 612 | ||
600 | /* Used by CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_CORE */ | 613 | /* Used by CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_CORE_RESTORE */ |
601 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20 | 614 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20 |
602 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK BITFIELD(20, 20) | 615 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20) |
603 | 616 | ||
604 | /* | 617 | /* |
605 | * Used by CM_DIV_M3_DPLL_PER, CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_ABE, | 618 | * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, |
606 | * CM_DIV_M3_DPLL_CORE | 619 | * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER |
607 | */ | 620 | */ |
608 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0 | 621 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0 |
609 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK BITFIELD(0, 4) | 622 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0) |
610 | 623 | ||
611 | /* | 624 | /* |
612 | * Used by CM_DIV_M3_DPLL_PER, CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_ABE, | 625 | * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, |
613 | * CM_DIV_M3_DPLL_CORE | 626 | * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER |
614 | */ | 627 | */ |
615 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5 | 628 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5 |
616 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK BITFIELD(5, 5) | 629 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK (1 << 5) |
617 | 630 | ||
618 | /* | 631 | /* |
619 | * Used by CM_DIV_M3_DPLL_PER, CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_ABE, | 632 | * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, |
620 | * CM_DIV_M3_DPLL_CORE | 633 | * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER |
621 | */ | 634 | */ |
622 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8 | 635 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8 |
623 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK BITFIELD(8, 8) | 636 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK (1 << 8) |
624 | 637 | ||
625 | /* Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO, CM_DIV_M2_DPLL_ABE */ | 638 | /* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */ |
626 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_SHIFT 10 | 639 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_SHIFT 10 |
627 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK BITFIELD(10, 10) | 640 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10) |
628 | 641 | ||
629 | /* | 642 | /* |
630 | * Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO, | 643 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, |
631 | * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, | 644 | * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, |
632 | * CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU | 645 | * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO |
633 | */ | 646 | */ |
634 | #define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0 | 647 | #define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0 |
635 | #define OMAP4430_DPLL_CLKOUT_DIV_MASK BITFIELD(0, 4) | 648 | #define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0) |
636 | 649 | ||
637 | /* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_USB */ | 650 | /* Renamed from DPLL_CLKOUT_DIV Used by CM_DIV_M2_DPLL_USB */ |
638 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_SHIFT 0 | 651 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_SHIFT 0 |
639 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK BITFIELD(0, 6) | 652 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0) |
640 | 653 | ||
641 | /* | 654 | /* |
642 | * Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO, | 655 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, |
643 | * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, | 656 | * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, |
644 | * CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU | 657 | * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO |
645 | */ | 658 | */ |
646 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5 | 659 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5 |
647 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK BITFIELD(5, 5) | 660 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5) |
648 | 661 | ||
649 | /* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_USB */ | 662 | /* Renamed from DPLL_CLKOUT_DIVCHACK Used by CM_DIV_M2_DPLL_USB */ |
650 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_SHIFT 7 | 663 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_SHIFT 7 |
651 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK BITFIELD(7, 7) | 664 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK (1 << 7) |
652 | 665 | ||
653 | /* | 666 | /* |
654 | * Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB, CM_DIV_M2_DPLL_CORE_RESTORE, | 667 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, |
655 | * CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY, | 668 | * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, |
656 | * CM_DIV_M2_DPLL_MPU | 669 | * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB |
657 | */ | 670 | */ |
658 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 | 671 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 |
659 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK BITFIELD(8, 8) | 672 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) |
660 | 673 | ||
661 | /* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */ | 674 | /* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ |
662 | #define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8 | 675 | #define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8 |
663 | #define OMAP4430_DPLL_CORE_DPLL_EN_MASK BITFIELD(8, 10) | 676 | #define OMAP4430_DPLL_CORE_DPLL_EN_MASK (0x7 << 8) |
664 | 677 | ||
665 | /* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */ | 678 | /* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ |
666 | #define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11 | 679 | #define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11 |
667 | #define OMAP4430_DPLL_CORE_M2_DIV_MASK BITFIELD(11, 15) | 680 | #define OMAP4430_DPLL_CORE_M2_DIV_MASK (0x1f << 11) |
668 | 681 | ||
669 | /* Used by CM_SHADOW_FREQ_CONFIG2 */ | 682 | /* Used by CM_SHADOW_FREQ_CONFIG2, CM_SHADOW_FREQ_CONFIG2_RESTORE */ |
670 | #define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3 | 683 | #define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3 |
671 | #define OMAP4430_DPLL_CORE_M5_DIV_MASK BITFIELD(3, 7) | 684 | #define OMAP4430_DPLL_CORE_M5_DIV_MASK (0x1f << 3) |
672 | |||
673 | /* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */ | ||
674 | #define OMAP4430_DPLL_CORE_SYS_REF_CLKSEL_SHIFT 1 | ||
675 | #define OMAP4430_DPLL_CORE_SYS_REF_CLKSEL_MASK BITFIELD(1, 1) | ||
676 | 685 | ||
677 | /* | 686 | /* |
678 | * Used by CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO, | 687 | * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, |
679 | * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, | 688 | * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, |
680 | * CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU | 689 | * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO |
681 | */ | 690 | */ |
682 | #define OMAP4430_DPLL_DIV_SHIFT 0 | 691 | #define OMAP4430_DPLL_DIV_SHIFT 0 |
683 | #define OMAP4430_DPLL_DIV_MASK BITFIELD(0, 6) | 692 | #define OMAP4430_DPLL_DIV_MASK (0x7f << 0) |
684 | 693 | ||
685 | /* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_USB */ | 694 | /* Renamed from DPLL_DIV Used by CM_CLKSEL_DPLL_USB */ |
686 | #define OMAP4430_DPLL_DIV_0_7_SHIFT 0 | 695 | #define OMAP4430_DPLL_DIV_0_7_SHIFT 0 |
687 | #define OMAP4430_DPLL_DIV_0_7_MASK BITFIELD(0, 7) | 696 | #define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0) |
688 | 697 | ||
689 | /* | 698 | /* |
690 | * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_USB, | 699 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, |
691 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 700 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, |
692 | * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU | 701 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER |
693 | */ | 702 | */ |
694 | #define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8 | 703 | #define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8 |
695 | #define OMAP4430_DPLL_DRIFTGUARD_EN_MASK BITFIELD(8, 8) | 704 | #define OMAP4430_DPLL_DRIFTGUARD_EN_MASK (1 << 8) |
696 | 705 | ||
697 | /* Renamed from DPLL_DRIFTGUARD_EN Used by CM_CLKMODE_DPLL_UNIPRO */ | 706 | /* Renamed from DPLL_DRIFTGUARD_EN Used by CM_CLKMODE_DPLL_UNIPRO */ |
698 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_SHIFT 3 | 707 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_SHIFT 3 |
699 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK BITFIELD(3, 3) | 708 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK (1 << 3) |
700 | 709 | ||
701 | /* | 710 | /* |
702 | * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB, | 711 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, |
703 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 712 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, |
704 | * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU | 713 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, |
714 | * CM_CLKMODE_DPLL_USB | ||
705 | */ | 715 | */ |
706 | #define OMAP4430_DPLL_EN_SHIFT 0 | 716 | #define OMAP4430_DPLL_EN_SHIFT 0 |
707 | #define OMAP4430_DPLL_EN_MASK BITFIELD(0, 2) | 717 | #define OMAP4430_DPLL_EN_MASK (0x7 << 0) |
708 | 718 | ||
709 | /* | 719 | /* |
710 | * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, | 720 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, |
711 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 721 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, |
712 | * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU | 722 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO |
713 | */ | 723 | */ |
714 | #define OMAP4430_DPLL_LPMODE_EN_SHIFT 10 | 724 | #define OMAP4430_DPLL_LPMODE_EN_SHIFT 10 |
715 | #define OMAP4430_DPLL_LPMODE_EN_MASK BITFIELD(10, 10) | 725 | #define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10) |
716 | 726 | ||
717 | /* | 727 | /* |
718 | * Used by CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO, | 728 | * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, |
719 | * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, | 729 | * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, |
720 | * CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU | 730 | * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO |
721 | */ | 731 | */ |
722 | #define OMAP4430_DPLL_MULT_SHIFT 8 | 732 | #define OMAP4430_DPLL_MULT_SHIFT 8 |
723 | #define OMAP4430_DPLL_MULT_MASK BITFIELD(8, 18) | 733 | #define OMAP4430_DPLL_MULT_MASK (0x7ff << 8) |
724 | 734 | ||
725 | /* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_USB */ | 735 | /* Renamed from DPLL_MULT Used by CM_CLKSEL_DPLL_USB */ |
726 | #define OMAP4430_DPLL_MULT_USB_SHIFT 8 | 736 | #define OMAP4430_DPLL_MULT_USB_SHIFT 8 |
727 | #define OMAP4430_DPLL_MULT_USB_MASK BITFIELD(8, 19) | 737 | #define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8) |
728 | 738 | ||
729 | /* | 739 | /* |
730 | * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, | 740 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, |
731 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 741 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, |
732 | * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU | 742 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO |
733 | */ | 743 | */ |
734 | #define OMAP4430_DPLL_REGM4XEN_SHIFT 11 | 744 | #define OMAP4430_DPLL_REGM4XEN_SHIFT 11 |
735 | #define OMAP4430_DPLL_REGM4XEN_MASK BITFIELD(11, 11) | 745 | #define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11) |
736 | 746 | ||
737 | /* Used by CM_CLKSEL_DPLL_USB */ | 747 | /* Used by CM_CLKSEL_DPLL_USB */ |
738 | #define OMAP4430_DPLL_SD_DIV_SHIFT 24 | 748 | #define OMAP4430_DPLL_SD_DIV_SHIFT 24 |
739 | #define OMAP4430_DPLL_SD_DIV_MASK BITFIELD(24, 31) | 749 | #define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24) |
740 | 750 | ||
741 | /* | 751 | /* |
742 | * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB, | 752 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, |
743 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 753 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, |
744 | * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU | 754 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, |
755 | * CM_CLKMODE_DPLL_USB | ||
745 | */ | 756 | */ |
746 | #define OMAP4430_DPLL_SSC_ACK_SHIFT 13 | 757 | #define OMAP4430_DPLL_SSC_ACK_SHIFT 13 |
747 | #define OMAP4430_DPLL_SSC_ACK_MASK BITFIELD(13, 13) | 758 | #define OMAP4430_DPLL_SSC_ACK_MASK (1 << 13) |
748 | 759 | ||
749 | /* | 760 | /* |
750 | * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB, | 761 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, |
751 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 762 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, |
752 | * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU | 763 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, |
764 | * CM_CLKMODE_DPLL_USB | ||
753 | */ | 765 | */ |
754 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14 | 766 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14 |
755 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK BITFIELD(14, 14) | 767 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK (1 << 14) |
756 | 768 | ||
757 | /* | 769 | /* |
758 | * Used by CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB, | 770 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, |
759 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 771 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, |
760 | * CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU | 772 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, |
773 | * CM_CLKMODE_DPLL_USB | ||
761 | */ | 774 | */ |
762 | #define OMAP4430_DPLL_SSC_EN_SHIFT 12 | 775 | #define OMAP4430_DPLL_SSC_EN_SHIFT 12 |
763 | #define OMAP4430_DPLL_SSC_EN_MASK BITFIELD(12, 12) | 776 | #define OMAP4430_DPLL_SSC_EN_MASK (1 << 12) |
764 | 777 | ||
765 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ | 778 | /* |
779 | * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, | ||
780 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, CM_L4PER_DYNAMICDEP_RESTORE | ||
781 | */ | ||
766 | #define OMAP4430_DSS_DYNDEP_SHIFT 8 | 782 | #define OMAP4430_DSS_DYNDEP_SHIFT 8 |
767 | #define OMAP4430_DSS_DYNDEP_MASK BITFIELD(8, 8) | 783 | #define OMAP4430_DSS_DYNDEP_MASK (1 << 8) |
768 | 784 | ||
769 | /* | 785 | /* |
770 | * Used by CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, | 786 | * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, |
771 | * CM_MPU_STATICDEP | 787 | * CM_SDMA_STATICDEP_RESTORE |
772 | */ | 788 | */ |
773 | #define OMAP4430_DSS_STATDEP_SHIFT 8 | 789 | #define OMAP4430_DSS_STATDEP_SHIFT 8 |
774 | #define OMAP4430_DSS_STATDEP_MASK BITFIELD(8, 8) | 790 | #define OMAP4430_DSS_STATDEP_MASK (1 << 8) |
775 | 791 | ||
776 | /* Used by CM_L3_2_DYNAMICDEP */ | 792 | /* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */ |
777 | #define OMAP4430_DUCATI_DYNDEP_SHIFT 0 | 793 | #define OMAP4430_DUCATI_DYNDEP_SHIFT 0 |
778 | #define OMAP4430_DUCATI_DYNDEP_MASK BITFIELD(0, 0) | 794 | #define OMAP4430_DUCATI_DYNDEP_MASK (1 << 0) |
779 | 795 | ||
780 | /* Used by CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP */ | 796 | /* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE */ |
781 | #define OMAP4430_DUCATI_STATDEP_SHIFT 0 | 797 | #define OMAP4430_DUCATI_STATDEP_SHIFT 0 |
782 | #define OMAP4430_DUCATI_STATDEP_MASK BITFIELD(0, 0) | 798 | #define OMAP4430_DUCATI_STATDEP_MASK (1 << 0) |
783 | 799 | ||
784 | /* Used by CM_SHADOW_FREQ_CONFIG1_RESTORE, CM_SHADOW_FREQ_CONFIG1 */ | 800 | /* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ |
785 | #define OMAP4430_FREQ_UPDATE_SHIFT 0 | 801 | #define OMAP4430_FREQ_UPDATE_SHIFT 0 |
786 | #define OMAP4430_FREQ_UPDATE_MASK BITFIELD(0, 0) | 802 | #define OMAP4430_FREQ_UPDATE_MASK (1 << 0) |
803 | |||
804 | /* Used by REVISION_CM1, REVISION_CM2 */ | ||
805 | #define OMAP4430_FUNC_SHIFT 16 | ||
806 | #define OMAP4430_FUNC_MASK (0xfff << 16) | ||
787 | 807 | ||
788 | /* Used by CM_L3_2_DYNAMICDEP */ | 808 | /* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */ |
789 | #define OMAP4430_GFX_DYNDEP_SHIFT 10 | 809 | #define OMAP4430_GFX_DYNDEP_SHIFT 10 |
790 | #define OMAP4430_GFX_DYNDEP_MASK BITFIELD(10, 10) | 810 | #define OMAP4430_GFX_DYNDEP_MASK (1 << 10) |
791 | 811 | ||
792 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ | 812 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ |
793 | #define OMAP4430_GFX_STATDEP_SHIFT 10 | 813 | #define OMAP4430_GFX_STATDEP_SHIFT 10 |
794 | #define OMAP4430_GFX_STATDEP_MASK BITFIELD(10, 10) | 814 | #define OMAP4430_GFX_STATDEP_MASK (1 << 10) |
795 | 815 | ||
796 | /* Used by CM_SHADOW_FREQ_CONFIG2 */ | 816 | /* Used by CM_SHADOW_FREQ_CONFIG2, CM_SHADOW_FREQ_CONFIG2_RESTORE */ |
797 | #define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0 | 817 | #define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0 |
798 | #define OMAP4430_GPMC_FREQ_UPDATE_MASK BITFIELD(0, 0) | 818 | #define OMAP4430_GPMC_FREQ_UPDATE_MASK (1 << 0) |
799 | 819 | ||
800 | /* | 820 | /* |
801 | * Used by CM_DIV_M4_DPLL_PER, CM_DIV_M4_DPLL_CORE_RESTORE, | 821 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, |
802 | * CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA | 822 | * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER |
803 | */ | 823 | */ |
804 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 | 824 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 |
805 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK BITFIELD(0, 4) | 825 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) |
806 | 826 | ||
807 | /* | 827 | /* |
808 | * Used by CM_DIV_M4_DPLL_PER, CM_DIV_M4_DPLL_CORE_RESTORE, | 828 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, |
809 | * CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA | 829 | * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER |
810 | */ | 830 | */ |
811 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 | 831 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 |
812 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK BITFIELD(5, 5) | 832 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5) |
813 | 833 | ||
814 | /* | 834 | /* |
815 | * Used by CM_DIV_M4_DPLL_PER, CM_DIV_M4_DPLL_CORE_RESTORE, | 835 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, |
816 | * CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA | 836 | * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER |
817 | */ | 837 | */ |
818 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 | 838 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 |
819 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK BITFIELD(8, 8) | 839 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8) |
820 | 840 | ||
821 | /* | 841 | /* |
822 | * Used by CM_DIV_M4_DPLL_PER, CM_DIV_M4_DPLL_CORE_RESTORE, | 842 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, |
823 | * CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA | 843 | * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER |
824 | */ | 844 | */ |
825 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 | 845 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 |
826 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK BITFIELD(12, 12) | 846 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12) |
827 | 847 | ||
828 | /* | 848 | /* |
829 | * Used by CM_DIV_M5_DPLL_PER, CM_DIV_M5_DPLL_CORE_RESTORE, | 849 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, |
830 | * CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA | 850 | * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER |
831 | */ | 851 | */ |
832 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 | 852 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 |
833 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK BITFIELD(0, 4) | 853 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) |
834 | 854 | ||
835 | /* | 855 | /* |
836 | * Used by CM_DIV_M5_DPLL_PER, CM_DIV_M5_DPLL_CORE_RESTORE, | 856 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, |
837 | * CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA | 857 | * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER |
838 | */ | 858 | */ |
839 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 | 859 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 |
840 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK BITFIELD(5, 5) | 860 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5) |
841 | 861 | ||
842 | /* | 862 | /* |
843 | * Used by CM_DIV_M5_DPLL_PER, CM_DIV_M5_DPLL_CORE_RESTORE, | 863 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, |
844 | * CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA | 864 | * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER |
845 | */ | 865 | */ |
846 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 | 866 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 |
847 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK BITFIELD(8, 8) | 867 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8) |
848 | 868 | ||
849 | /* | 869 | /* |
850 | * Used by CM_DIV_M5_DPLL_PER, CM_DIV_M5_DPLL_CORE_RESTORE, | 870 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, |
851 | * CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA | 871 | * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER |
852 | */ | 872 | */ |
853 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 | 873 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 |
854 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK BITFIELD(12, 12) | 874 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12) |
855 | 875 | ||
856 | /* | 876 | /* |
857 | * Used by CM_DIV_M6_DPLL_PER, CM_DIV_M6_DPLL_CORE_RESTORE, | 877 | * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE, |
858 | * CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY | 878 | * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER |
859 | */ | 879 | */ |
860 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 | 880 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 |
861 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK BITFIELD(0, 4) | 881 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0) |
862 | 882 | ||
863 | /* | 883 | /* |
864 | * Used by CM_DIV_M6_DPLL_PER, CM_DIV_M6_DPLL_CORE_RESTORE, | 884 | * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE, |
865 | * CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY | 885 | * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER |
866 | */ | 886 | */ |
867 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 | 887 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 |
868 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK BITFIELD(5, 5) | 888 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5) |
869 | 889 | ||
870 | /* | 890 | /* |
871 | * Used by CM_DIV_M6_DPLL_PER, CM_DIV_M6_DPLL_CORE_RESTORE, | 891 | * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE, |
872 | * CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY | 892 | * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER |
873 | */ | 893 | */ |
874 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 | 894 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 |
875 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK BITFIELD(8, 8) | 895 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8) |
876 | 896 | ||
877 | /* | 897 | /* |
878 | * Used by CM_DIV_M6_DPLL_PER, CM_DIV_M6_DPLL_CORE_RESTORE, | 898 | * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE, |
879 | * CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY | 899 | * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER |
880 | */ | 900 | */ |
881 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 | 901 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 |
882 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK BITFIELD(12, 12) | 902 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12) |
883 | 903 | ||
884 | /* | 904 | /* |
885 | * Used by CM_DIV_M7_DPLL_PER, CM_DIV_M7_DPLL_CORE_RESTORE, | 905 | * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE, |
886 | * CM_DIV_M7_DPLL_CORE | 906 | * CM_DIV_M7_DPLL_PER |
887 | */ | 907 | */ |
888 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0 | 908 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0 |
889 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK BITFIELD(0, 4) | 909 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0) |
890 | 910 | ||
891 | /* | 911 | /* |
892 | * Used by CM_DIV_M7_DPLL_PER, CM_DIV_M7_DPLL_CORE_RESTORE, | 912 | * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE, |
893 | * CM_DIV_M7_DPLL_CORE | 913 | * CM_DIV_M7_DPLL_PER |
894 | */ | 914 | */ |
895 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5 | 915 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5 |
896 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK BITFIELD(5, 5) | 916 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK (1 << 5) |
897 | 917 | ||
898 | /* | 918 | /* |
899 | * Used by CM_DIV_M7_DPLL_PER, CM_DIV_M7_DPLL_CORE_RESTORE, | 919 | * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE, |
900 | * CM_DIV_M7_DPLL_CORE | 920 | * CM_DIV_M7_DPLL_PER |
901 | */ | 921 | */ |
902 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8 | 922 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8 |
903 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK BITFIELD(8, 8) | 923 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK (1 << 8) |
904 | 924 | ||
905 | /* | 925 | /* |
906 | * Used by CM_DIV_M7_DPLL_PER, CM_DIV_M7_DPLL_CORE_RESTORE, | 926 | * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE, |
907 | * CM_DIV_M7_DPLL_CORE | 927 | * CM_DIV_M7_DPLL_PER |
908 | */ | 928 | */ |
909 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12 | 929 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12 |
910 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK BITFIELD(12, 12) | 930 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK (1 << 12) |
911 | 931 | ||
912 | /* | 932 | /* |
913 | * Used by PRM_PRM_PROFILING_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, | 933 | * Used by CM1_ABE_AESS_CLKCTRL, CM1_ABE_DMIC_CLKCTRL, CM1_ABE_L4ABE_CLKCTRL, |
914 | * CM_WKUP_KEYBOARD_CLKCTRL, CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_RTC_CLKCTRL, | 934 | * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, |
915 | * CM_WKUP_SARRAM_CLKCTRL, CM_WKUP_SYNCTIMER_CLKCTRL, CM_WKUP_TIMER12_CLKCTRL, | 935 | * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, |
916 | * CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_USIM_CLKCTRL, CM_WKUP_WDT1_CLKCTRL, | 936 | * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, |
917 | * CM_WKUP_WDT2_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL, CM_D2D_MODEM_ICR_CLKCTRL, | 937 | * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, |
918 | * CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, | 938 | * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, |
919 | * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL, | 939 | * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, |
920 | * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, | 940 | * CM_CM1_PROFILING_CLKCTRL, CM_CM1_PROFILING_CLKCTRL_RESTORE, |
921 | * CM_L3_2_L3_2_CLKCTRL, CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, | 941 | * CM_CM2_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL_RESTORE, |
922 | * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, | 942 | * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, |
923 | * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL, | 943 | * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, |
924 | * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MEMIF_EMIF_H1_CLKCTRL, | 944 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, |
925 | * CM_MEMIF_EMIF_H2_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, CM_GFX_GFX_CLKCTRL, | 945 | * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, |
926 | * CM_L4PER_ADC_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL, | ||
927 | * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL, | ||
928 | * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL, | ||
929 | * CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL, | ||
930 | * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL, | ||
931 | * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL, | ||
932 | * CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, | ||
933 | * CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, | ||
934 | * CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, | ||
935 | * CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, | ||
936 | * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL, | ||
937 | * CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, | ||
938 | * CM_L4PER_MSPROHG_CLKCTRL, CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, | ||
939 | * CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, | ||
940 | * CM_L4SEC_AES1_CLKCTRL, CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, | ||
941 | * CM_L4SEC_DES3DES_CLKCTRL, CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, | ||
942 | * CM_L4SEC_SHA2MD51_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, | ||
943 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, | 946 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, |
944 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, | 947 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, |
945 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, | 948 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, |
946 | * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, | 949 | * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, |
947 | * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, | 950 | * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_HOST_FS_CLKCTRL, |
948 | * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_CAM_FDIF_CLKCTRL, | 951 | * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL, |
949 | * CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, | 952 | * CM_L3INIT_USB_TLL_CLKCTRL_RESTORE, CM_L3INIT_XHPI_CLKCTRL, |
950 | * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE, | 953 | * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL_RESTORE, |
951 | * CM_L3INSTR_L3_3_CLKCTRL_RESTORE, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE, | 954 | * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE, |
952 | * CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE, CM_L4PER_GPIO2_CLKCTRL_RESTORE, | 955 | * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE, |
953 | * CM_L4PER_GPIO3_CLKCTRL_RESTORE, CM_L4PER_GPIO4_CLKCTRL_RESTORE, | 956 | * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL, |
954 | * CM_L4PER_GPIO5_CLKCTRL_RESTORE, CM_L4PER_GPIO6_CLKCTRL_RESTORE, | 957 | * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL, |
955 | * CM_ALWON_MDMINTC_CLKCTRL, CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, | 958 | * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL, |
956 | * CM_ALWON_SR_MPU_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, CM_IVAHD_SL2_CLKCTRL, | 959 | * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, |
957 | * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_CM2_PROFILING_CLKCTRL, | 960 | * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, |
958 | * CM_MPU_MPU_CLKCTRL, CM_TESLA_TESLA_CLKCTRL, CM1_ABE_AESS_CLKCTRL, | 961 | * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, |
959 | * CM1_ABE_DMIC_CLKCTRL, CM1_ABE_L4ABE_CLKCTRL, CM1_ABE_MCASP_CLKCTRL, | 962 | * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE, |
960 | * CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL, | 963 | * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE, |
961 | * CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, CM1_ABE_TIMER5_CLKCTRL, | 964 | * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE, |
962 | * CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL, | 965 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE, |
963 | * CM1_ABE_WDT3_CLKCTRL, CM_CM1_PROFILING_CLKCTRL | 966 | * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE, |
967 | * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, | ||
968 | * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, | ||
969 | * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, | ||
970 | * CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, | ||
971 | * CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, | ||
972 | * CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, | ||
973 | * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL, | ||
974 | * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, | ||
975 | * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, | ||
976 | * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, | ||
977 | * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL, | ||
978 | * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL, | ||
979 | * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MEMIF_EMIF_H1_CLKCTRL, | ||
980 | * CM_MEMIF_EMIF_H2_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, | ||
981 | * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL, | ||
982 | * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_RTC_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, | ||
983 | * CM_WKUP_SYNCTIMER_CLKCTRL, CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, | ||
984 | * CM_WKUP_USIM_CLKCTRL, CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL | ||
964 | */ | 985 | */ |
965 | #define OMAP4430_IDLEST_SHIFT 16 | 986 | #define OMAP4430_IDLEST_SHIFT 16 |
966 | #define OMAP4430_IDLEST_MASK BITFIELD(16, 17) | 987 | #define OMAP4430_IDLEST_MASK (0x3 << 16) |
967 | 988 | ||
968 | /* Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */ | 989 | /* |
990 | * Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, | ||
991 | * CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE | ||
992 | */ | ||
969 | #define OMAP4430_ISS_DYNDEP_SHIFT 9 | 993 | #define OMAP4430_ISS_DYNDEP_SHIFT 9 |
970 | #define OMAP4430_ISS_DYNDEP_MASK BITFIELD(9, 9) | 994 | #define OMAP4430_ISS_DYNDEP_MASK (1 << 9) |
971 | 995 | ||
972 | /* | 996 | /* |
973 | * Used by CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, | 997 | * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, |
974 | * CM_MPU_STATICDEP, CM_TESLA_STATICDEP | 998 | * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP |
975 | */ | 999 | */ |
976 | #define OMAP4430_ISS_STATDEP_SHIFT 9 | 1000 | #define OMAP4430_ISS_STATDEP_SHIFT 9 |
977 | #define OMAP4430_ISS_STATDEP_MASK BITFIELD(9, 9) | 1001 | #define OMAP4430_ISS_STATDEP_MASK (1 << 9) |
978 | 1002 | ||
979 | /* Used by CM_L3_2_DYNAMICDEP, CM_TESLA_DYNAMICDEP */ | 1003 | /* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_TESLA_DYNAMICDEP */ |
980 | #define OMAP4430_IVAHD_DYNDEP_SHIFT 2 | 1004 | #define OMAP4430_IVAHD_DYNDEP_SHIFT 2 |
981 | #define OMAP4430_IVAHD_DYNDEP_MASK BITFIELD(2, 2) | 1005 | #define OMAP4430_IVAHD_DYNDEP_MASK (1 << 2) |
982 | 1006 | ||
983 | /* | 1007 | /* |
984 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, | 1008 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, |
985 | * CM_GFX_STATICDEP, CM_L3INIT_STATICDEP, CM_CAM_STATICDEP, | 1009 | * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, |
986 | * CM_SDMA_STATICDEP_RESTORE, CM_DSS_STATICDEP, CM_MPU_STATICDEP, | 1010 | * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, |
987 | * CM_TESLA_STATICDEP | 1011 | * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP |
988 | */ | 1012 | */ |
989 | #define OMAP4430_IVAHD_STATDEP_SHIFT 2 | 1013 | #define OMAP4430_IVAHD_STATDEP_SHIFT 2 |
990 | #define OMAP4430_IVAHD_STATDEP_MASK BITFIELD(2, 2) | 1014 | #define OMAP4430_IVAHD_STATDEP_MASK (1 << 2) |
991 | 1015 | ||
992 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ | 1016 | /* |
1017 | * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, | ||
1018 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, CM_L4PER_DYNAMICDEP_RESTORE | ||
1019 | */ | ||
993 | #define OMAP4430_L3INIT_DYNDEP_SHIFT 7 | 1020 | #define OMAP4430_L3INIT_DYNDEP_SHIFT 7 |
994 | #define OMAP4430_L3INIT_DYNDEP_MASK BITFIELD(7, 7) | 1021 | #define OMAP4430_L3INIT_DYNDEP_MASK (1 << 7) |
995 | 1022 | ||
996 | /* | 1023 | /* |
997 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, | 1024 | * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, |
998 | * CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP, CM_TESLA_STATICDEP | 1025 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, |
1026 | * CM_TESLA_STATICDEP | ||
999 | */ | 1027 | */ |
1000 | #define OMAP4430_L3INIT_STATDEP_SHIFT 7 | 1028 | #define OMAP4430_L3INIT_STATDEP_SHIFT 7 |
1001 | #define OMAP4430_L3INIT_STATDEP_MASK BITFIELD(7, 7) | 1029 | #define OMAP4430_L3INIT_STATDEP_MASK (1 << 7) |
1002 | 1030 | ||
1003 | /* | 1031 | /* |
1004 | * Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, | 1032 | * Used by CM_DSS_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_2_DYNAMICDEP, |
1005 | * CM_DSS_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP | 1033 | * CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, |
1034 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP | ||
1006 | */ | 1035 | */ |
1007 | #define OMAP4430_L3_1_DYNDEP_SHIFT 5 | 1036 | #define OMAP4430_L3_1_DYNDEP_SHIFT 5 |
1008 | #define OMAP4430_L3_1_DYNDEP_MASK BITFIELD(5, 5) | 1037 | #define OMAP4430_L3_1_DYNDEP_MASK (1 << 5) |
1009 | 1038 | ||
1010 | /* | 1039 | /* |
1011 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, | 1040 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, |
1012 | * CM_GFX_STATICDEP, CM_L4SEC_STATICDEP, CM_L3INIT_STATICDEP, CM_CAM_STATICDEP, | 1041 | * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, |
1013 | * CM_SDMA_STATICDEP_RESTORE, CM_IVAHD_STATICDEP, CM_DSS_STATICDEP, | 1042 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, |
1014 | * CM_MPU_STATICDEP, CM_TESLA_STATICDEP | 1043 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP |
1015 | */ | 1044 | */ |
1016 | #define OMAP4430_L3_1_STATDEP_SHIFT 5 | 1045 | #define OMAP4430_L3_1_STATDEP_SHIFT 5 |
1017 | #define OMAP4430_L3_1_STATDEP_MASK BITFIELD(5, 5) | 1046 | #define OMAP4430_L3_1_STATDEP_MASK (1 << 5) |
1018 | 1047 | ||
1019 | /* | 1048 | /* |
1020 | * Used by CM_EMU_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP, | 1049 | * Used by CM_CAM_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, |
1021 | * CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_SDMA_DYNAMICDEP, | 1050 | * CM_DUCATI_DYNAMICDEP, CM_EMU_DYNAMICDEP, CM_GFX_DYNAMICDEP, |
1022 | * CM_GFX_DYNAMICDEP, CM_L4SEC_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, | 1051 | * CM_IVAHD_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_1_DYNAMICDEP, |
1023 | * CM_CAM_DYNAMICDEP, CM_IVAHD_DYNAMICDEP | 1052 | * CM_L3_1_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, |
1053 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP | ||
1024 | */ | 1054 | */ |
1025 | #define OMAP4430_L3_2_DYNDEP_SHIFT 6 | 1055 | #define OMAP4430_L3_2_DYNDEP_SHIFT 6 |
1026 | #define OMAP4430_L3_2_DYNDEP_MASK BITFIELD(6, 6) | 1056 | #define OMAP4430_L3_2_DYNDEP_MASK (1 << 6) |
1027 | 1057 | ||
1028 | /* | 1058 | /* |
1029 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, | 1059 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, |
1030 | * CM_GFX_STATICDEP, CM_L4SEC_STATICDEP, CM_L3INIT_STATICDEP, CM_CAM_STATICDEP, | 1060 | * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, |
1031 | * CM_SDMA_STATICDEP_RESTORE, CM_IVAHD_STATICDEP, CM_DSS_STATICDEP, | 1061 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, |
1032 | * CM_MPU_STATICDEP, CM_TESLA_STATICDEP | 1062 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP |
1033 | */ | 1063 | */ |
1034 | #define OMAP4430_L3_2_STATDEP_SHIFT 6 | 1064 | #define OMAP4430_L3_2_STATDEP_SHIFT 6 |
1035 | #define OMAP4430_L3_2_STATDEP_MASK BITFIELD(6, 6) | 1065 | #define OMAP4430_L3_2_STATDEP_MASK (1 << 6) |
1036 | 1066 | ||
1037 | /* Used by CM_L3_1_DYNAMICDEP */ | 1067 | /* Used by CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE */ |
1038 | #define OMAP4430_L4CFG_DYNDEP_SHIFT 12 | 1068 | #define OMAP4430_L4CFG_DYNDEP_SHIFT 12 |
1039 | #define OMAP4430_L4CFG_DYNDEP_MASK BITFIELD(12, 12) | 1069 | #define OMAP4430_L4CFG_DYNDEP_MASK (1 << 12) |
1040 | 1070 | ||
1041 | /* | 1071 | /* |
1042 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, | 1072 | * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, |
1043 | * CM_L3INIT_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP, | 1073 | * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, |
1044 | * CM_TESLA_STATICDEP | 1074 | * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP |
1045 | */ | 1075 | */ |
1046 | #define OMAP4430_L4CFG_STATDEP_SHIFT 12 | 1076 | #define OMAP4430_L4CFG_STATDEP_SHIFT 12 |
1047 | #define OMAP4430_L4CFG_STATDEP_MASK BITFIELD(12, 12) | 1077 | #define OMAP4430_L4CFG_STATDEP_MASK (1 << 12) |
1048 | 1078 | ||
1049 | /* Used by CM_L3_2_DYNAMICDEP */ | 1079 | /* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */ |
1050 | #define OMAP4430_L4PER_DYNDEP_SHIFT 13 | 1080 | #define OMAP4430_L4PER_DYNDEP_SHIFT 13 |
1051 | #define OMAP4430_L4PER_DYNDEP_MASK BITFIELD(13, 13) | 1081 | #define OMAP4430_L4PER_DYNDEP_MASK (1 << 13) |
1052 | 1082 | ||
1053 | /* | 1083 | /* |
1054 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, | 1084 | * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, |
1055 | * CM_L4SEC_STATICDEP, CM_L3INIT_STATICDEP, CM_SDMA_STATICDEP_RESTORE, | 1085 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, |
1056 | * CM_MPU_STATICDEP, CM_TESLA_STATICDEP | 1086 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP |
1057 | */ | 1087 | */ |
1058 | #define OMAP4430_L4PER_STATDEP_SHIFT 13 | 1088 | #define OMAP4430_L4PER_STATDEP_SHIFT 13 |
1059 | #define OMAP4430_L4PER_STATDEP_MASK BITFIELD(13, 13) | 1089 | #define OMAP4430_L4PER_STATDEP_MASK (1 << 13) |
1060 | 1090 | ||
1061 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ | 1091 | /* |
1092 | * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, | ||
1093 | * CM_L4PER_DYNAMICDEP_RESTORE | ||
1094 | */ | ||
1062 | #define OMAP4430_L4SEC_DYNDEP_SHIFT 14 | 1095 | #define OMAP4430_L4SEC_DYNDEP_SHIFT 14 |
1063 | #define OMAP4430_L4SEC_DYNDEP_MASK BITFIELD(14, 14) | 1096 | #define OMAP4430_L4SEC_DYNDEP_MASK (1 << 14) |
1064 | 1097 | ||
1065 | /* | 1098 | /* |
1066 | * Used by CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, CM_L3INIT_STATICDEP, | 1099 | * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, |
1067 | * CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP | 1100 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE |
1068 | */ | 1101 | */ |
1069 | #define OMAP4430_L4SEC_STATDEP_SHIFT 14 | 1102 | #define OMAP4430_L4SEC_STATDEP_SHIFT 14 |
1070 | #define OMAP4430_L4SEC_STATDEP_MASK BITFIELD(14, 14) | 1103 | #define OMAP4430_L4SEC_STATDEP_MASK (1 << 14) |
1071 | 1104 | ||
1072 | /* Used by CM_L4CFG_DYNAMICDEP */ | 1105 | /* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ |
1073 | #define OMAP4430_L4WKUP_DYNDEP_SHIFT 15 | 1106 | #define OMAP4430_L4WKUP_DYNDEP_SHIFT 15 |
1074 | #define OMAP4430_L4WKUP_DYNDEP_MASK BITFIELD(15, 15) | 1107 | #define OMAP4430_L4WKUP_DYNDEP_MASK (1 << 15) |
1075 | 1108 | ||
1076 | /* | 1109 | /* |
1077 | * Used by CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, CM_L3INIT_STATICDEP, | 1110 | * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, |
1078 | * CM_SDMA_STATICDEP_RESTORE, CM_MPU_STATICDEP, CM_TESLA_STATICDEP | 1111 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP |
1079 | */ | 1112 | */ |
1080 | #define OMAP4430_L4WKUP_STATDEP_SHIFT 15 | 1113 | #define OMAP4430_L4WKUP_STATDEP_SHIFT 15 |
1081 | #define OMAP4430_L4WKUP_STATDEP_MASK BITFIELD(15, 15) | 1114 | #define OMAP4430_L4WKUP_STATDEP_MASK (1 << 15) |
1082 | 1115 | ||
1083 | /* | 1116 | /* |
1084 | * Used by CM_D2D_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, | 1117 | * Used by CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, CM_L3_1_DYNAMICDEP, |
1085 | * CM_MPU_DYNAMICDEP | 1118 | * CM_L3_1_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, |
1119 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP | ||
1086 | */ | 1120 | */ |
1087 | #define OMAP4430_MEMIF_DYNDEP_SHIFT 4 | 1121 | #define OMAP4430_MEMIF_DYNDEP_SHIFT 4 |
1088 | #define OMAP4430_MEMIF_DYNDEP_MASK BITFIELD(4, 4) | 1122 | #define OMAP4430_MEMIF_DYNDEP_MASK (1 << 4) |
1089 | 1123 | ||
1090 | /* | 1124 | /* |
1091 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_SDMA_STATICDEP, | 1125 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, |
1092 | * CM_GFX_STATICDEP, CM_L4SEC_STATICDEP, CM_L3INIT_STATICDEP, CM_CAM_STATICDEP, | 1126 | * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, |
1093 | * CM_SDMA_STATICDEP_RESTORE, CM_IVAHD_STATICDEP, CM_DSS_STATICDEP, | 1127 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, |
1094 | * CM_MPU_STATICDEP, CM_TESLA_STATICDEP | 1128 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP |
1095 | */ | 1129 | */ |
1096 | #define OMAP4430_MEMIF_STATDEP_SHIFT 4 | 1130 | #define OMAP4430_MEMIF_STATDEP_SHIFT 4 |
1097 | #define OMAP4430_MEMIF_STATDEP_MASK BITFIELD(4, 4) | 1131 | #define OMAP4430_MEMIF_STATDEP_MASK (1 << 4) |
1098 | 1132 | ||
1099 | /* | 1133 | /* |
1100 | * Used by CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO, | 1134 | * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE, |
1101 | * CM_SSC_MODFREQDIV_DPLL_USB, CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE, | 1135 | * CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE, CM_SSC_MODFREQDIV_DPLL_DDRPHY, |
1102 | * CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE, | 1136 | * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU, |
1103 | * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA, | 1137 | * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO, |
1104 | * CM_SSC_MODFREQDIV_DPLL_MPU | 1138 | * CM_SSC_MODFREQDIV_DPLL_USB |
1105 | */ | 1139 | */ |
1106 | #define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8 | 1140 | #define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8 |
1107 | #define OMAP4430_MODFREQDIV_EXPONENT_MASK BITFIELD(8, 10) | 1141 | #define OMAP4430_MODFREQDIV_EXPONENT_MASK (0x7 << 8) |
1108 | 1142 | ||
1109 | /* | 1143 | /* |
1110 | * Used by CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO, | 1144 | * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE, |
1111 | * CM_SSC_MODFREQDIV_DPLL_USB, CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE, | 1145 | * CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE, CM_SSC_MODFREQDIV_DPLL_DDRPHY, |
1112 | * CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE, | 1146 | * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU, |
1113 | * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA, | 1147 | * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO, |
1114 | * CM_SSC_MODFREQDIV_DPLL_MPU | 1148 | * CM_SSC_MODFREQDIV_DPLL_USB |
1115 | */ | 1149 | */ |
1116 | #define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0 | 1150 | #define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0 |
1117 | #define OMAP4430_MODFREQDIV_MANTISSA_MASK BITFIELD(0, 6) | 1151 | #define OMAP4430_MODFREQDIV_MANTISSA_MASK (0x7f << 0) |
1118 | 1152 | ||
1119 | /* | 1153 | /* |
1120 | * Used by PRM_PRM_PROFILING_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, | 1154 | * Used by CM1_ABE_AESS_CLKCTRL, CM1_ABE_DMIC_CLKCTRL, CM1_ABE_L4ABE_CLKCTRL, |
1121 | * CM_WKUP_KEYBOARD_CLKCTRL, CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_RTC_CLKCTRL, | 1155 | * CM1_ABE_MCASP_CLKCTRL, CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, |
1122 | * CM_WKUP_SARRAM_CLKCTRL, CM_WKUP_SYNCTIMER_CLKCTRL, CM_WKUP_TIMER12_CLKCTRL, | 1156 | * CM1_ABE_MCBSP3_CLKCTRL, CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, |
1123 | * CM_WKUP_TIMER1_CLKCTRL, CM_WKUP_USIM_CLKCTRL, CM_WKUP_WDT1_CLKCTRL, | 1157 | * CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, |
1124 | * CM_WKUP_WDT2_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL, CM_D2D_MODEM_ICR_CLKCTRL, | 1158 | * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, |
1125 | * CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, | 1159 | * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, |
1126 | * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL, | 1160 | * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, |
1127 | * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, | 1161 | * CM_CM1_PROFILING_CLKCTRL, CM_CM1_PROFILING_CLKCTRL_RESTORE, |
1128 | * CM_L3_2_L3_2_CLKCTRL, CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, | 1162 | * CM_CM2_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL_RESTORE, |
1129 | * CM_L4CFG_L4_CFG_CLKCTRL, CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, | 1163 | * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, |
1130 | * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL, | 1164 | * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, |
1131 | * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MEMIF_EMIF_H1_CLKCTRL, | 1165 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, |
1132 | * CM_MEMIF_EMIF_H2_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, CM_GFX_GFX_CLKCTRL, | 1166 | * CM_IVAHD_SL2_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, |
1133 | * CM_L4PER_ADC_CLKCTRL, CM_L4PER_DMTIMER10_CLKCTRL, | ||
1134 | * CM_L4PER_DMTIMER11_CLKCTRL, CM_L4PER_DMTIMER2_CLKCTRL, | ||
1135 | * CM_L4PER_DMTIMER3_CLKCTRL, CM_L4PER_DMTIMER4_CLKCTRL, | ||
1136 | * CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL, | ||
1137 | * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL, | ||
1138 | * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL, | ||
1139 | * CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, | ||
1140 | * CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, | ||
1141 | * CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, | ||
1142 | * CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, | ||
1143 | * CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL, | ||
1144 | * CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, | ||
1145 | * CM_L4PER_MSPROHG_CLKCTRL, CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, | ||
1146 | * CM_L4PER_UART2_CLKCTRL, CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, | ||
1147 | * CM_L4SEC_AES1_CLKCTRL, CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, | ||
1148 | * CM_L4SEC_DES3DES_CLKCTRL, CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, | ||
1149 | * CM_L4SEC_SHA2MD51_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, | ||
1150 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, | 1167 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, |
1151 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, | 1168 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, |
1152 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, | 1169 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, |
1153 | * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, | 1170 | * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, |
1154 | * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, | 1171 | * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_HOST_FS_CLKCTRL, |
1155 | * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_CAM_FDIF_CLKCTRL, | 1172 | * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL, |
1156 | * CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, | 1173 | * CM_L3INIT_USB_TLL_CLKCTRL_RESTORE, CM_L3INIT_XHPI_CLKCTRL, |
1157 | * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE, | 1174 | * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL_RESTORE, |
1158 | * CM_L3INSTR_L3_3_CLKCTRL_RESTORE, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE, | 1175 | * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE, |
1159 | * CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE, CM_L4PER_GPIO2_CLKCTRL_RESTORE, | 1176 | * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE, |
1160 | * CM_L4PER_GPIO3_CLKCTRL_RESTORE, CM_L4PER_GPIO4_CLKCTRL_RESTORE, | 1177 | * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL, |
1161 | * CM_L4PER_GPIO5_CLKCTRL_RESTORE, CM_L4PER_GPIO6_CLKCTRL_RESTORE, | 1178 | * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL, |
1162 | * CM_ALWON_MDMINTC_CLKCTRL, CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, | 1179 | * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL, |
1163 | * CM_ALWON_SR_MPU_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, CM_IVAHD_SL2_CLKCTRL, | 1180 | * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, |
1164 | * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_CM2_PROFILING_CLKCTRL, | 1181 | * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, |
1165 | * CM_MPU_MPU_CLKCTRL, CM_TESLA_TESLA_CLKCTRL, CM1_ABE_AESS_CLKCTRL, | 1182 | * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, |
1166 | * CM1_ABE_DMIC_CLKCTRL, CM1_ABE_L4ABE_CLKCTRL, CM1_ABE_MCASP_CLKCTRL, | 1183 | * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE, |
1167 | * CM1_ABE_MCBSP1_CLKCTRL, CM1_ABE_MCBSP2_CLKCTRL, CM1_ABE_MCBSP3_CLKCTRL, | 1184 | * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE, |
1168 | * CM1_ABE_PDM_CLKCTRL, CM1_ABE_SLIMBUS_CLKCTRL, CM1_ABE_TIMER5_CLKCTRL, | 1185 | * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE, |
1169 | * CM1_ABE_TIMER6_CLKCTRL, CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL, | 1186 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE, |
1170 | * CM1_ABE_WDT3_CLKCTRL, CM_CM1_PROFILING_CLKCTRL | 1187 | * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE, |
1188 | * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, | ||
1189 | * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, | ||
1190 | * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, | ||
1191 | * CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, | ||
1192 | * CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, | ||
1193 | * CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, | ||
1194 | * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL, | ||
1195 | * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, | ||
1196 | * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, | ||
1197 | * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, | ||
1198 | * CM_L4SEC_PKAEIP29_CLKCTRL, CM_L4SEC_RNG_CLKCTRL, CM_L4SEC_SHA2MD51_CLKCTRL, | ||
1199 | * CM_MEMIF_DMM_CLKCTRL, CM_MEMIF_EMIF_1_CLKCTRL, CM_MEMIF_EMIF_2_CLKCTRL, | ||
1200 | * CM_MEMIF_EMIF_FW_CLKCTRL, CM_MEMIF_EMIF_H1_CLKCTRL, | ||
1201 | * CM_MEMIF_EMIF_H2_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, | ||
1202 | * CM_TESLA_TESLA_CLKCTRL, CM_WKUP_GPIO1_CLKCTRL, CM_WKUP_KEYBOARD_CLKCTRL, | ||
1203 | * CM_WKUP_L4WKUP_CLKCTRL, CM_WKUP_RTC_CLKCTRL, CM_WKUP_SARRAM_CLKCTRL, | ||
1204 | * CM_WKUP_SYNCTIMER_CLKCTRL, CM_WKUP_TIMER12_CLKCTRL, CM_WKUP_TIMER1_CLKCTRL, | ||
1205 | * CM_WKUP_USIM_CLKCTRL, CM_WKUP_WDT1_CLKCTRL, CM_WKUP_WDT2_CLKCTRL | ||
1171 | */ | 1206 | */ |
1172 | #define OMAP4430_MODULEMODE_SHIFT 0 | 1207 | #define OMAP4430_MODULEMODE_SHIFT 0 |
1173 | #define OMAP4430_MODULEMODE_MASK BITFIELD(0, 1) | 1208 | #define OMAP4430_MODULEMODE_MASK (0x3 << 0) |
1174 | 1209 | ||
1175 | /* Used by CM_DSS_DSS_CLKCTRL */ | 1210 | /* Used by CM_DSS_DSS_CLKCTRL */ |
1176 | #define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT 9 | 1211 | #define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT 9 |
1177 | #define OMAP4430_OPTFCLKEN_48MHZ_CLK_MASK BITFIELD(9, 9) | 1212 | #define OMAP4430_OPTFCLKEN_48MHZ_CLK_MASK (1 << 9) |
1178 | 1213 | ||
1179 | /* Used by CM_WKUP_BANDGAP_CLKCTRL */ | 1214 | /* Used by CM_WKUP_BANDGAP_CLKCTRL */ |
1180 | #define OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT 8 | 1215 | #define OMAP4430_OPTFCLKEN_BGAP_32K_SHIFT 8 |
1181 | #define OMAP4430_OPTFCLKEN_BGAP_32K_MASK BITFIELD(8, 8) | 1216 | #define OMAP4430_OPTFCLKEN_BGAP_32K_MASK (1 << 8) |
1182 | 1217 | ||
1183 | /* Used by CM_L3INIT_USBPHYOCP2SCP_CLKCTRL */ | 1218 | /* Used by CM_ALWON_USBPHY_CLKCTRL */ |
1184 | #define OMAP4430_OPTFCLKEN_CLK32K_SHIFT 9 | 1219 | #define OMAP4430_OPTFCLKEN_CLK32K_SHIFT 8 |
1185 | #define OMAP4430_OPTFCLKEN_CLK32K_MASK BITFIELD(9, 9) | 1220 | #define OMAP4430_OPTFCLKEN_CLK32K_MASK (1 << 8) |
1186 | 1221 | ||
1187 | /* Used by CM_CAM_ISS_CLKCTRL */ | 1222 | /* Used by CM_CAM_ISS_CLKCTRL */ |
1188 | #define OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT 8 | 1223 | #define OMAP4430_OPTFCLKEN_CTRLCLK_SHIFT 8 |
1189 | #define OMAP4430_OPTFCLKEN_CTRLCLK_MASK BITFIELD(8, 8) | 1224 | #define OMAP4430_OPTFCLKEN_CTRLCLK_MASK (1 << 8) |
1190 | 1225 | ||
1191 | /* | 1226 | /* |
1192 | * Used by CM_WKUP_GPIO1_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL, | 1227 | * Used by CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE, |
1193 | * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL, | 1228 | * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE, |
1194 | * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE, | 1229 | * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE, |
1195 | * CM_L4PER_GPIO3_CLKCTRL_RESTORE, CM_L4PER_GPIO4_CLKCTRL_RESTORE, | 1230 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE, |
1196 | * CM_L4PER_GPIO5_CLKCTRL_RESTORE, CM_L4PER_GPIO6_CLKCTRL_RESTORE | 1231 | * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE, CM_WKUP_GPIO1_CLKCTRL |
1197 | */ | 1232 | */ |
1198 | #define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8 | 1233 | #define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8 |
1199 | #define OMAP4430_OPTFCLKEN_DBCLK_MASK BITFIELD(8, 8) | 1234 | #define OMAP4430_OPTFCLKEN_DBCLK_MASK (1 << 8) |
1200 | 1235 | ||
1201 | /* Used by CM_MEMIF_DLL_CLKCTRL, CM_MEMIF_DLL_H_CLKCTRL */ | 1236 | /* Used by CM_MEMIF_DLL_CLKCTRL, CM_MEMIF_DLL_H_CLKCTRL */ |
1202 | #define OMAP4430_OPTFCLKEN_DLL_CLK_SHIFT 8 | 1237 | #define OMAP4430_OPTFCLKEN_DLL_CLK_SHIFT 8 |
1203 | #define OMAP4430_OPTFCLKEN_DLL_CLK_MASK BITFIELD(8, 8) | 1238 | #define OMAP4430_OPTFCLKEN_DLL_CLK_MASK (1 << 8) |
1204 | 1239 | ||
1205 | /* Used by CM_DSS_DSS_CLKCTRL */ | 1240 | /* Used by CM_DSS_DSS_CLKCTRL */ |
1206 | #define OMAP4430_OPTFCLKEN_DSSCLK_SHIFT 8 | 1241 | #define OMAP4430_OPTFCLKEN_DSSCLK_SHIFT 8 |
1207 | #define OMAP4430_OPTFCLKEN_DSSCLK_MASK BITFIELD(8, 8) | 1242 | #define OMAP4430_OPTFCLKEN_DSSCLK_MASK (1 << 8) |
1243 | |||
1244 | /* Used by CM_WKUP_USIM_CLKCTRL */ | ||
1245 | #define OMAP4430_OPTFCLKEN_FCLK_SHIFT 8 | ||
1246 | #define OMAP4430_OPTFCLKEN_FCLK_MASK (1 << 8) | ||
1208 | 1247 | ||
1209 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ | 1248 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ |
1210 | #define OMAP4430_OPTFCLKEN_FCLK0_SHIFT 8 | 1249 | #define OMAP4430_OPTFCLKEN_FCLK0_SHIFT 8 |
1211 | #define OMAP4430_OPTFCLKEN_FCLK0_MASK BITFIELD(8, 8) | 1250 | #define OMAP4430_OPTFCLKEN_FCLK0_MASK (1 << 8) |
1212 | 1251 | ||
1213 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ | 1252 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ |
1214 | #define OMAP4430_OPTFCLKEN_FCLK1_SHIFT 9 | 1253 | #define OMAP4430_OPTFCLKEN_FCLK1_SHIFT 9 |
1215 | #define OMAP4430_OPTFCLKEN_FCLK1_MASK BITFIELD(9, 9) | 1254 | #define OMAP4430_OPTFCLKEN_FCLK1_MASK (1 << 9) |
1216 | 1255 | ||
1217 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ | 1256 | /* Used by CM1_ABE_SLIMBUS_CLKCTRL */ |
1218 | #define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10 | 1257 | #define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10 |
1219 | #define OMAP4430_OPTFCLKEN_FCLK2_MASK BITFIELD(10, 10) | 1258 | #define OMAP4430_OPTFCLKEN_FCLK2_MASK (1 << 10) |
1220 | 1259 | ||
1221 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1260 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ |
1222 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15 | 1261 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15 |
1223 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK BITFIELD(15, 15) | 1262 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK (1 << 15) |
1224 | 1263 | ||
1225 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1264 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ |
1226 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13 | 1265 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13 |
1227 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK BITFIELD(13, 13) | 1266 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13) |
1228 | 1267 | ||
1229 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1268 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ |
1230 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14 | 1269 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14 |
1231 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK BITFIELD(14, 14) | 1270 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14) |
1232 | 1271 | ||
1233 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1272 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ |
1234 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11 | 1273 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11 |
1235 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK BITFIELD(11, 11) | 1274 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11) |
1236 | 1275 | ||
1237 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1276 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ |
1238 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12 | 1277 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12 |
1239 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK BITFIELD(12, 12) | 1278 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12) |
1240 | 1279 | ||
1241 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ | 1280 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ |
1242 | #define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT 8 | 1281 | #define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_SHIFT 8 |
1243 | #define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_MASK BITFIELD(8, 8) | 1282 | #define OMAP4430_OPTFCLKEN_PER24MC_GFCLK_MASK (1 << 8) |
1244 | 1283 | ||
1245 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ | 1284 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ |
1246 | #define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT 9 | 1285 | #define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_SHIFT 9 |
1247 | #define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_MASK BITFIELD(9, 9) | 1286 | #define OMAP4430_OPTFCLKEN_PERABE24M_GFCLK_MASK (1 << 9) |
1248 | 1287 | ||
1249 | /* Used by CM_L3INIT_USBPHYOCP2SCP_CLKCTRL */ | 1288 | /* Used by CM_L3INIT_USBPHYOCP2SCP_CLKCTRL */ |
1250 | #define OMAP4430_OPTFCLKEN_PHY_48M_SHIFT 8 | 1289 | #define OMAP4430_OPTFCLKEN_PHY_48M_SHIFT 8 |
1251 | #define OMAP4430_OPTFCLKEN_PHY_48M_MASK BITFIELD(8, 8) | 1290 | #define OMAP4430_OPTFCLKEN_PHY_48M_MASK (1 << 8) |
1252 | 1291 | ||
1253 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ | 1292 | /* Used by CM_L4PER_SLIMBUS2_CLKCTRL */ |
1254 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT 10 | 1293 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_SHIFT 10 |
1255 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_MASK BITFIELD(10, 10) | 1294 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_MASK (1 << 10) |
1256 | 1295 | ||
1257 | /* Renamed from OPTFCLKEN_SLIMBUS_CLK Used by CM1_ABE_SLIMBUS_CLKCTRL */ | 1296 | /* Renamed from OPTFCLKEN_SLIMBUS_CLK Used by CM1_ABE_SLIMBUS_CLKCTRL */ |
1258 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT 11 | 1297 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_SHIFT 11 |
1259 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_MASK BITFIELD(11, 11) | 1298 | #define OMAP4430_OPTFCLKEN_SLIMBUS_CLK_11_11_MASK (1 << 11) |
1260 | 1299 | ||
1261 | /* Used by CM_DSS_DSS_CLKCTRL */ | 1300 | /* Used by CM_DSS_DSS_CLKCTRL */ |
1262 | #define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT 10 | 1301 | #define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT 10 |
1263 | #define OMAP4430_OPTFCLKEN_SYS_CLK_MASK BITFIELD(10, 10) | 1302 | #define OMAP4430_OPTFCLKEN_SYS_CLK_MASK (1 << 10) |
1264 | 1303 | ||
1265 | /* Used by CM_DSS_DSS_CLKCTRL */ | 1304 | /* Used by CM_DSS_DSS_CLKCTRL */ |
1266 | #define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT 11 | 1305 | #define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT 11 |
1267 | #define OMAP4430_OPTFCLKEN_TV_CLK_MASK BITFIELD(11, 11) | 1306 | #define OMAP4430_OPTFCLKEN_TV_CLK_MASK (1 << 11) |
1268 | 1307 | ||
1269 | /* Used by CM_L3INIT_UNIPRO1_CLKCTRL */ | 1308 | /* Used by CM_L3INIT_UNIPRO1_CLKCTRL */ |
1270 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8 | 1309 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8 |
1271 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK BITFIELD(8, 8) | 1310 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK (1 << 8) |
1272 | 1311 | ||
1273 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ | 1312 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ |
1274 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8 | 1313 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8 |
1275 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK BITFIELD(8, 8) | 1314 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8) |
1276 | 1315 | ||
1277 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ | 1316 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ |
1278 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9 | 1317 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9 |
1279 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK BITFIELD(9, 9) | 1318 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9) |
1280 | 1319 | ||
1281 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ | 1320 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ |
1282 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10 | 1321 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10 |
1283 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK BITFIELD(10, 10) | 1322 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10) |
1284 | 1323 | ||
1285 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1324 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ |
1286 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8 | 1325 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8 |
1287 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK BITFIELD(8, 8) | 1326 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8) |
1288 | 1327 | ||
1289 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1328 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ |
1290 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9 | 1329 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9 |
1291 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK BITFIELD(9, 9) | 1330 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9) |
1292 | 1331 | ||
1293 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1332 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ |
1294 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10 | 1333 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10 |
1295 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK BITFIELD(10, 10) | 1334 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10) |
1296 | 1335 | ||
1297 | /* Used by CM_L3INIT_USB_OTG_CLKCTRL */ | 1336 | /* Used by CM_L3INIT_USB_OTG_CLKCTRL */ |
1298 | #define OMAP4430_OPTFCLKEN_XCLK_SHIFT 8 | 1337 | #define OMAP4430_OPTFCLKEN_XCLK_SHIFT 8 |
1299 | #define OMAP4430_OPTFCLKEN_XCLK_MASK BITFIELD(8, 8) | 1338 | #define OMAP4430_OPTFCLKEN_XCLK_MASK (1 << 8) |
1300 | 1339 | ||
1301 | /* Used by CM_EMU_OVERRIDE_DPLL_PER, CM_EMU_OVERRIDE_DPLL_CORE */ | 1340 | /* Used by CM_EMU_OVERRIDE_DPLL_CORE */ |
1302 | #define OMAP4430_OVERRIDE_ENABLE_SHIFT 19 | 1341 | #define OMAP4430_OVERRIDE_ENABLE_SHIFT 19 |
1303 | #define OMAP4430_OVERRIDE_ENABLE_MASK BITFIELD(19, 19) | 1342 | #define OMAP4430_OVERRIDE_ENABLE_MASK (1 << 19) |
1304 | 1343 | ||
1305 | /* Used by CM_CLKSEL_ABE */ | 1344 | /* Used by CM_CLKSEL_ABE */ |
1306 | #define OMAP4430_PAD_CLKS_GATE_SHIFT 8 | 1345 | #define OMAP4430_PAD_CLKS_GATE_SHIFT 8 |
1307 | #define OMAP4430_PAD_CLKS_GATE_MASK BITFIELD(8, 8) | 1346 | #define OMAP4430_PAD_CLKS_GATE_MASK (1 << 8) |
1308 | 1347 | ||
1309 | /* Used by CM_CORE_DVFS_CURRENT, CM_IVA_DVFS_CURRENT */ | 1348 | /* Used by CM_CORE_DVFS_CURRENT, CM_IVA_DVFS_CURRENT */ |
1310 | #define OMAP4430_PERF_CURRENT_SHIFT 0 | 1349 | #define OMAP4430_PERF_CURRENT_SHIFT 0 |
1311 | #define OMAP4430_PERF_CURRENT_MASK BITFIELD(0, 7) | 1350 | #define OMAP4430_PERF_CURRENT_MASK (0xff << 0) |
1312 | 1351 | ||
1313 | /* | 1352 | /* |
1314 | * Used by CM_CORE_DVFS_PERF1, CM_CORE_DVFS_PERF2, CM_CORE_DVFS_PERF3, | 1353 | * Used by CM_CORE_DVFS_PERF1, CM_CORE_DVFS_PERF2, CM_CORE_DVFS_PERF3, |
@@ -1316,159 +1355,173 @@ | |||
1316 | * CM_IVA_DVFS_PERF_TESLA | 1355 | * CM_IVA_DVFS_PERF_TESLA |
1317 | */ | 1356 | */ |
1318 | #define OMAP4430_PERF_REQ_SHIFT 0 | 1357 | #define OMAP4430_PERF_REQ_SHIFT 0 |
1319 | #define OMAP4430_PERF_REQ_MASK BITFIELD(0, 7) | 1358 | #define OMAP4430_PERF_REQ_MASK (0xff << 0) |
1320 | |||
1321 | /* Used by CM_EMU_OVERRIDE_DPLL_PER */ | ||
1322 | #define OMAP4430_PER_DPLL_EMU_DIV_SHIFT 0 | ||
1323 | #define OMAP4430_PER_DPLL_EMU_DIV_MASK BITFIELD(0, 6) | ||
1324 | |||
1325 | /* Used by CM_EMU_OVERRIDE_DPLL_PER */ | ||
1326 | #define OMAP4430_PER_DPLL_EMU_MULT_SHIFT 8 | ||
1327 | #define OMAP4430_PER_DPLL_EMU_MULT_MASK BITFIELD(8, 18) | ||
1328 | 1359 | ||
1329 | /* Used by CM_RESTORE_ST */ | 1360 | /* Used by CM_RESTORE_ST */ |
1330 | #define OMAP4430_PHASE1_COMPLETED_SHIFT 0 | 1361 | #define OMAP4430_PHASE1_COMPLETED_SHIFT 0 |
1331 | #define OMAP4430_PHASE1_COMPLETED_MASK BITFIELD(0, 0) | 1362 | #define OMAP4430_PHASE1_COMPLETED_MASK (1 << 0) |
1332 | 1363 | ||
1333 | /* Used by CM_RESTORE_ST */ | 1364 | /* Used by CM_RESTORE_ST */ |
1334 | #define OMAP4430_PHASE2A_COMPLETED_SHIFT 1 | 1365 | #define OMAP4430_PHASE2A_COMPLETED_SHIFT 1 |
1335 | #define OMAP4430_PHASE2A_COMPLETED_MASK BITFIELD(1, 1) | 1366 | #define OMAP4430_PHASE2A_COMPLETED_MASK (1 << 1) |
1336 | 1367 | ||
1337 | /* Used by CM_RESTORE_ST */ | 1368 | /* Used by CM_RESTORE_ST */ |
1338 | #define OMAP4430_PHASE2B_COMPLETED_SHIFT 2 | 1369 | #define OMAP4430_PHASE2B_COMPLETED_SHIFT 2 |
1339 | #define OMAP4430_PHASE2B_COMPLETED_MASK BITFIELD(2, 2) | 1370 | #define OMAP4430_PHASE2B_COMPLETED_MASK (1 << 2) |
1340 | 1371 | ||
1341 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ | 1372 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ |
1342 | #define OMAP4430_PMD_STM_MUX_CTRL_SHIFT 20 | 1373 | #define OMAP4430_PMD_STM_MUX_CTRL_SHIFT 20 |
1343 | #define OMAP4430_PMD_STM_MUX_CTRL_MASK BITFIELD(20, 21) | 1374 | #define OMAP4430_PMD_STM_MUX_CTRL_MASK (0x3 << 20) |
1344 | 1375 | ||
1345 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ | 1376 | /* Used by CM_EMU_DEBUGSS_CLKCTRL */ |
1346 | #define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22 | 1377 | #define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22 |
1347 | #define OMAP4430_PMD_TRACE_MUX_CTRL_MASK BITFIELD(22, 23) | 1378 | #define OMAP4430_PMD_TRACE_MUX_CTRL_MASK (0x3 << 22) |
1348 | 1379 | ||
1349 | /* Used by CM_DYN_DEP_PRESCAL */ | 1380 | /* Used by CM_DYN_DEP_PRESCAL, CM_DYN_DEP_PRESCAL_RESTORE */ |
1350 | #define OMAP4430_PRESCAL_SHIFT 0 | 1381 | #define OMAP4430_PRESCAL_SHIFT 0 |
1351 | #define OMAP4430_PRESCAL_MASK BITFIELD(0, 5) | 1382 | #define OMAP4430_PRESCAL_MASK (0x3f << 0) |
1352 | 1383 | ||
1353 | /* Used by REVISION_CM2, REVISION_CM1 */ | 1384 | /* Used by REVISION_CM1, REVISION_CM2 */ |
1354 | #define OMAP4430_REV_SHIFT 0 | 1385 | #define OMAP4430_R_RTL_SHIFT 11 |
1355 | #define OMAP4430_REV_MASK BITFIELD(0, 7) | 1386 | #define OMAP4430_R_RTL_MASK (0x1f << 11) |
1356 | 1387 | ||
1357 | /* | 1388 | /* |
1358 | * Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL, | 1389 | * Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, |
1359 | * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE | 1390 | * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE |
1360 | */ | 1391 | */ |
1361 | #define OMAP4430_SAR_MODE_SHIFT 4 | 1392 | #define OMAP4430_SAR_MODE_SHIFT 4 |
1362 | #define OMAP4430_SAR_MODE_MASK BITFIELD(4, 4) | 1393 | #define OMAP4430_SAR_MODE_MASK (1 << 4) |
1363 | 1394 | ||
1364 | /* Used by CM_SCALE_FCLK */ | 1395 | /* Used by CM_SCALE_FCLK */ |
1365 | #define OMAP4430_SCALE_FCLK_SHIFT 0 | 1396 | #define OMAP4430_SCALE_FCLK_SHIFT 0 |
1366 | #define OMAP4430_SCALE_FCLK_MASK BITFIELD(0, 0) | 1397 | #define OMAP4430_SCALE_FCLK_MASK (1 << 0) |
1398 | |||
1399 | /* Used by REVISION_CM1, REVISION_CM2 */ | ||
1400 | #define OMAP4430_SCHEME_SHIFT 30 | ||
1401 | #define OMAP4430_SCHEME_MASK (0x3 << 30) | ||
1367 | 1402 | ||
1368 | /* Used by CM_L4CFG_DYNAMICDEP */ | 1403 | /* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ |
1369 | #define OMAP4430_SDMA_DYNDEP_SHIFT 11 | 1404 | #define OMAP4430_SDMA_DYNDEP_SHIFT 11 |
1370 | #define OMAP4430_SDMA_DYNDEP_MASK BITFIELD(11, 11) | 1405 | #define OMAP4430_SDMA_DYNDEP_MASK (1 << 11) |
1371 | 1406 | ||
1372 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ | 1407 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ |
1373 | #define OMAP4430_SDMA_STATDEP_SHIFT 11 | 1408 | #define OMAP4430_SDMA_STATDEP_SHIFT 11 |
1374 | #define OMAP4430_SDMA_STATDEP_MASK BITFIELD(11, 11) | 1409 | #define OMAP4430_SDMA_STATDEP_MASK (1 << 11) |
1375 | 1410 | ||
1376 | /* Used by CM_CLKSEL_ABE */ | 1411 | /* Used by CM_CLKSEL_ABE */ |
1377 | #define OMAP4430_SLIMBUS_CLK_GATE_SHIFT 10 | 1412 | #define OMAP4430_SLIMBUS_CLK_GATE_SHIFT 10 |
1378 | #define OMAP4430_SLIMBUS_CLK_GATE_MASK BITFIELD(10, 10) | 1413 | #define OMAP4430_SLIMBUS_CLK_GATE_MASK (1 << 10) |
1379 | 1414 | ||
1380 | /* | 1415 | /* |
1381 | * Used by CM_EMU_DEBUGSS_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, | 1416 | * Used by CM1_ABE_AESS_CLKCTRL, CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, |
1382 | * CM_DUCATI_DUCATI_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, CM_GFX_GFX_CLKCTRL, | 1417 | * CM_D2D_SAD2D_CLKCTRL, CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, |
1383 | * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, | 1418 | * CM_DUCATI_DUCATI_CLKCTRL, CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, |
1419 | * CM_IVAHD_IVAHD_CLKCTRL, CM_L3INIT_CCPTX_CLKCTRL, CM_L3INIT_EMAC_CLKCTRL, | ||
1384 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, | 1420 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, |
1385 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, | 1421 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, |
1386 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, | 1422 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, |
1387 | * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL, | 1423 | * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, |
1388 | * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_CAM_FDIF_CLKCTRL, | 1424 | * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, |
1389 | * CM_CAM_ISS_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, | 1425 | * CM_L3INIT_XHPI_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL, |
1390 | * CM_IVAHD_IVAHD_CLKCTRL, CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, | 1426 | * CM_SDMA_SDMA_CLKCTRL, CM_TESLA_TESLA_CLKCTRL |
1391 | * CM_MPU_MPU_CLKCTRL, CM_TESLA_TESLA_CLKCTRL, CM1_ABE_AESS_CLKCTRL | ||
1392 | */ | 1427 | */ |
1393 | #define OMAP4430_STBYST_SHIFT 18 | 1428 | #define OMAP4430_STBYST_SHIFT 18 |
1394 | #define OMAP4430_STBYST_MASK BITFIELD(18, 18) | 1429 | #define OMAP4430_STBYST_MASK (1 << 18) |
1395 | 1430 | ||
1396 | /* | 1431 | /* |
1397 | * Used by CM_IDLEST_DPLL_PER, CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB, | 1432 | * Used by CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDRPHY, |
1398 | * CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDRPHY, | 1433 | * CM_IDLEST_DPLL_IVA, CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER, |
1399 | * CM_IDLEST_DPLL_IVA, CM_IDLEST_DPLL_MPU | 1434 | * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB |
1400 | */ | 1435 | */ |
1401 | #define OMAP4430_ST_DPLL_CLK_SHIFT 0 | 1436 | #define OMAP4430_ST_DPLL_CLK_SHIFT 0 |
1402 | #define OMAP4430_ST_DPLL_CLK_MASK BITFIELD(0, 0) | 1437 | #define OMAP4430_ST_DPLL_CLK_MASK (1 << 0) |
1403 | 1438 | ||
1404 | /* Used by CM_CLKDCOLDO_DPLL_USB */ | 1439 | /* Used by CM_CLKDCOLDO_DPLL_USB */ |
1405 | #define OMAP4430_ST_DPLL_CLKDCOLDO_SHIFT 9 | 1440 | #define OMAP4430_ST_DPLL_CLKDCOLDO_SHIFT 9 |
1406 | #define OMAP4430_ST_DPLL_CLKDCOLDO_MASK BITFIELD(9, 9) | 1441 | #define OMAP4430_ST_DPLL_CLKDCOLDO_MASK (1 << 9) |
1407 | 1442 | ||
1408 | /* | 1443 | /* |
1409 | * Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB, CM_DIV_M2_DPLL_CORE_RESTORE, | 1444 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, |
1410 | * CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY, | 1445 | * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, |
1411 | * CM_DIV_M2_DPLL_MPU | 1446 | * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB |
1412 | */ | 1447 | */ |
1413 | #define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9 | 1448 | #define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9 |
1414 | #define OMAP4430_ST_DPLL_CLKOUT_MASK BITFIELD(9, 9) | 1449 | #define OMAP4430_ST_DPLL_CLKOUT_MASK (1 << 9) |
1415 | 1450 | ||
1416 | /* | 1451 | /* |
1417 | * Used by CM_DIV_M3_DPLL_PER, CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_ABE, | 1452 | * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, |
1418 | * CM_DIV_M3_DPLL_CORE | 1453 | * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER |
1419 | */ | 1454 | */ |
1420 | #define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9 | 1455 | #define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9 |
1421 | #define OMAP4430_ST_DPLL_CLKOUTHIF_MASK BITFIELD(9, 9) | 1456 | #define OMAP4430_ST_DPLL_CLKOUTHIF_MASK (1 << 9) |
1422 | 1457 | ||
1423 | /* Used by CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO, CM_DIV_M2_DPLL_ABE */ | 1458 | /* Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO */ |
1424 | #define OMAP4430_ST_DPLL_CLKOUTX2_SHIFT 11 | 1459 | #define OMAP4430_ST_DPLL_CLKOUTX2_SHIFT 11 |
1425 | #define OMAP4430_ST_DPLL_CLKOUTX2_MASK BITFIELD(11, 11) | 1460 | #define OMAP4430_ST_DPLL_CLKOUTX2_MASK (1 << 11) |
1426 | 1461 | ||
1427 | /* | 1462 | /* |
1428 | * Used by CM_DIV_M4_DPLL_PER, CM_DIV_M4_DPLL_CORE_RESTORE, | 1463 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, |
1429 | * CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA | 1464 | * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER |
1430 | */ | 1465 | */ |
1431 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9 | 1466 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9 |
1432 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK BITFIELD(9, 9) | 1467 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9) |
1433 | 1468 | ||
1434 | /* | 1469 | /* |
1435 | * Used by CM_DIV_M5_DPLL_PER, CM_DIV_M5_DPLL_CORE_RESTORE, | 1470 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, |
1436 | * CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA | 1471 | * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER |
1437 | */ | 1472 | */ |
1438 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9 | 1473 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9 |
1439 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK BITFIELD(9, 9) | 1474 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9) |
1440 | 1475 | ||
1441 | /* | 1476 | /* |
1442 | * Used by CM_DIV_M6_DPLL_PER, CM_DIV_M6_DPLL_CORE_RESTORE, | 1477 | * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE, |
1443 | * CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY | 1478 | * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER |
1444 | */ | 1479 | */ |
1445 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9 | 1480 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9 |
1446 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK BITFIELD(9, 9) | 1481 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9) |
1447 | 1482 | ||
1448 | /* | 1483 | /* |
1449 | * Used by CM_DIV_M7_DPLL_PER, CM_DIV_M7_DPLL_CORE_RESTORE, | 1484 | * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE, |
1450 | * CM_DIV_M7_DPLL_CORE | 1485 | * CM_DIV_M7_DPLL_PER |
1451 | */ | 1486 | */ |
1452 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9 | 1487 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9 |
1453 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK BITFIELD(9, 9) | 1488 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK (1 << 9) |
1489 | |||
1490 | /* | ||
1491 | * Used by CM_IDLEST_DPLL_ABE, CM_IDLEST_DPLL_CORE, CM_IDLEST_DPLL_DDRPHY, | ||
1492 | * CM_IDLEST_DPLL_IVA, CM_IDLEST_DPLL_MPU, CM_IDLEST_DPLL_PER, | ||
1493 | * CM_IDLEST_DPLL_UNIPRO, CM_IDLEST_DPLL_USB | ||
1494 | */ | ||
1495 | #define OMAP4430_ST_MN_BYPASS_SHIFT 8 | ||
1496 | #define OMAP4430_ST_MN_BYPASS_MASK (1 << 8) | ||
1454 | 1497 | ||
1455 | /* Used by CM_SYS_CLKSEL */ | 1498 | /* Used by CM_SYS_CLKSEL */ |
1456 | #define OMAP4430_SYS_CLKSEL_SHIFT 0 | 1499 | #define OMAP4430_SYS_CLKSEL_SHIFT 0 |
1457 | #define OMAP4430_SYS_CLKSEL_MASK BITFIELD(0, 2) | 1500 | #define OMAP4430_SYS_CLKSEL_MASK (0x7 << 0) |
1458 | 1501 | ||
1459 | /* Used by CM_L4CFG_DYNAMICDEP */ | 1502 | /* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ |
1460 | #define OMAP4430_TESLA_DYNDEP_SHIFT 1 | 1503 | #define OMAP4430_TESLA_DYNDEP_SHIFT 1 |
1461 | #define OMAP4430_TESLA_DYNDEP_MASK BITFIELD(1, 1) | 1504 | #define OMAP4430_TESLA_DYNDEP_MASK (1 << 1) |
1462 | 1505 | ||
1463 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ | 1506 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP */ |
1464 | #define OMAP4430_TESLA_STATDEP_SHIFT 1 | 1507 | #define OMAP4430_TESLA_STATDEP_SHIFT 1 |
1465 | #define OMAP4430_TESLA_STATDEP_MASK BITFIELD(1, 1) | 1508 | #define OMAP4430_TESLA_STATDEP_MASK (1 << 1) |
1466 | 1509 | ||
1467 | /* | 1510 | /* |
1468 | * Used by CM_EMU_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP, | 1511 | * Used by CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, CM_DUCATI_DYNAMICDEP, |
1469 | * CM_L3_1_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, | 1512 | * CM_EMU_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE, |
1470 | * CM_L4PER_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP | 1513 | * CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, |
1514 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, | ||
1515 | * CM_L4PER_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP | ||
1471 | */ | 1516 | */ |
1472 | #define OMAP4430_WINDOWSIZE_SHIFT 24 | 1517 | #define OMAP4430_WINDOWSIZE_SHIFT 24 |
1473 | #define OMAP4430_WINDOWSIZE_MASK BITFIELD(24, 27) | 1518 | #define OMAP4430_WINDOWSIZE_MASK (0xf << 24) |
1519 | |||
1520 | /* Used by REVISION_CM1, REVISION_CM2 */ | ||
1521 | #define OMAP4430_X_MAJOR_SHIFT 8 | ||
1522 | #define OMAP4430_X_MAJOR_MASK (0x7 << 8) | ||
1523 | |||
1524 | /* Used by REVISION_CM1, REVISION_CM2 */ | ||
1525 | #define OMAP4430_Y_MINOR_SHIFT 0 | ||
1526 | #define OMAP4430_Y_MINOR_MASK (0x3f << 0) | ||
1474 | #endif | 1527 | #endif |
diff --git a/arch/arm/mach-omap2/cm44xx.h b/arch/arm/mach-omap2/cm44xx.h index 336d94889e5b..3c35a87cb90c 100644 --- a/arch/arm/mach-omap2/cm44xx.h +++ b/arch/arm/mach-omap2/cm44xx.h | |||
@@ -195,6 +195,42 @@ | |||
195 | #define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET 0x0088 | 195 | #define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET 0x0088 |
196 | #define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0088) | 196 | #define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_MOD, 0x0088) |
197 | 197 | ||
198 | /* CM1.RESTORE_CM1 register offsets */ | ||
199 | #define OMAP4_CM_CLKSEL_CORE_RESTORE_OFFSET 0x0000 | ||
200 | #define OMAP4430_CM_CLKSEL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0000) | ||
201 | #define OMAP4_CM_DIV_M2_DPLL_CORE_RESTORE_OFFSET 0x0004 | ||
202 | #define OMAP4430_CM_DIV_M2_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0004) | ||
203 | #define OMAP4_CM_DIV_M3_DPLL_CORE_RESTORE_OFFSET 0x0008 | ||
204 | #define OMAP4430_CM_DIV_M3_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0008) | ||
205 | #define OMAP4_CM_DIV_M4_DPLL_CORE_RESTORE_OFFSET 0x000c | ||
206 | #define OMAP4430_CM_DIV_M4_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x000c) | ||
207 | #define OMAP4_CM_DIV_M5_DPLL_CORE_RESTORE_OFFSET 0x0010 | ||
208 | #define OMAP4430_CM_DIV_M5_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0010) | ||
209 | #define OMAP4_CM_DIV_M6_DPLL_CORE_RESTORE_OFFSET 0x0014 | ||
210 | #define OMAP4430_CM_DIV_M6_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0014) | ||
211 | #define OMAP4_CM_DIV_M7_DPLL_CORE_RESTORE_OFFSET 0x0018 | ||
212 | #define OMAP4430_CM_DIV_M7_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0018) | ||
213 | #define OMAP4_CM_CLKSEL_DPLL_CORE_RESTORE_OFFSET 0x001c | ||
214 | #define OMAP4430_CM_CLKSEL_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x001c) | ||
215 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE_OFFSET 0x0020 | ||
216 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0020) | ||
217 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE_OFFSET 0x0024 | ||
218 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0024) | ||
219 | #define OMAP4_CM_CLKMODE_DPLL_CORE_RESTORE_OFFSET 0x0028 | ||
220 | #define OMAP4430_CM_CLKMODE_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0028) | ||
221 | #define OMAP4_CM_SHADOW_FREQ_CONFIG2_RESTORE_OFFSET 0x002c | ||
222 | #define OMAP4430_CM_SHADOW_FREQ_CONFIG2_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x002c) | ||
223 | #define OMAP4_CM_SHADOW_FREQ_CONFIG1_RESTORE_OFFSET 0x0030 | ||
224 | #define OMAP4430_CM_SHADOW_FREQ_CONFIG1_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0030) | ||
225 | #define OMAP4_CM_AUTOIDLE_DPLL_CORE_RESTORE_OFFSET 0x0034 | ||
226 | #define OMAP4430_CM_AUTOIDLE_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0034) | ||
227 | #define OMAP4_CM_MPU_CLKSTCTRL_RESTORE_OFFSET 0x0038 | ||
228 | #define OMAP4430_CM_MPU_CLKSTCTRL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0038) | ||
229 | #define OMAP4_CM_CM1_PROFILING_CLKCTRL_RESTORE_OFFSET 0x003c | ||
230 | #define OMAP4430_CM_CM1_PROFILING_CLKCTRL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x003c) | ||
231 | #define OMAP4_CM_DYN_DEP_PRESCAL_RESTORE_OFFSET 0x0040 | ||
232 | #define OMAP4430_CM_DYN_DEP_PRESCAL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_MOD, 0x0040) | ||
233 | |||
198 | /* CM2 */ | 234 | /* CM2 */ |
199 | 235 | ||
200 | /* CM2.OCP_SOCKET_CM2 register offsets */ | 236 | /* CM2.OCP_SOCKET_CM2 register offsets */ |
@@ -252,8 +288,6 @@ | |||
252 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0068) | 288 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0068) |
253 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_PER_OFFSET 0x006c | 289 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_PER_OFFSET 0x006c |
254 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x006c) | 290 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x006c) |
255 | #define OMAP4_CM_EMU_OVERRIDE_DPLL_PER_OFFSET 0x0070 | ||
256 | #define OMAP4430_CM_EMU_OVERRIDE_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0070) | ||
257 | #define OMAP4_CM_CLKMODE_DPLL_USB_OFFSET 0x0080 | 291 | #define OMAP4_CM_CLKMODE_DPLL_USB_OFFSET 0x0080 |
258 | #define OMAP4430_CM_CLKMODE_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0080) | 292 | #define OMAP4430_CM_CLKMODE_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_MOD, 0x0080) |
259 | #define OMAP4_CM_IDLEST_DPLL_USB_OFFSET 0x0084 | 293 | #define OMAP4_CM_IDLEST_DPLL_USB_OFFSET 0x0084 |
@@ -296,6 +330,8 @@ | |||
296 | #define OMAP4430_CM_ALWON_SR_IVA_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_ALWAYS_ON_MOD, 0x0030) | 330 | #define OMAP4430_CM_ALWON_SR_IVA_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_ALWAYS_ON_MOD, 0x0030) |
297 | #define OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET 0x0038 | 331 | #define OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET 0x0038 |
298 | #define OMAP4430_CM_ALWON_SR_CORE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_ALWAYS_ON_MOD, 0x0038) | 332 | #define OMAP4430_CM_ALWON_SR_CORE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_ALWAYS_ON_MOD, 0x0038) |
333 | #define OMAP4_CM_ALWON_USBPHY_CLKCTRL_OFFSET 0x0040 | ||
334 | #define OMAP4430_CM_ALWON_USBPHY_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_ALWAYS_ON_MOD, 0x0040) | ||
299 | 335 | ||
300 | /* CM2.CORE_CM2 register offsets */ | 336 | /* CM2.CORE_CM2 register offsets */ |
301 | #define OMAP4_CM_L3_1_CLKSTCTRL_OFFSET 0x0000 | 337 | #define OMAP4_CM_L3_1_CLKSTCTRL_OFFSET 0x0000 |
@@ -578,4 +614,54 @@ | |||
578 | #define OMAP4430_CM_CEFUSE_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_MOD, 0x0000) | 614 | #define OMAP4430_CM_CEFUSE_CLKSTCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_MOD, 0x0000) |
579 | #define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET 0x0020 | 615 | #define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET 0x0020 |
580 | #define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_MOD, 0x0020) | 616 | #define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_MOD, 0x0020) |
617 | |||
618 | /* CM2.RESTORE_CM2 register offsets */ | ||
619 | #define OMAP4_CM_L3_1_CLKSTCTRL_RESTORE_OFFSET 0x0000 | ||
620 | #define OMAP4430_CM_L3_1_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0000) | ||
621 | #define OMAP4_CM_L3_2_CLKSTCTRL_RESTORE_OFFSET 0x0004 | ||
622 | #define OMAP4430_CM_L3_2_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0004) | ||
623 | #define OMAP4_CM_L4CFG_CLKSTCTRL_RESTORE_OFFSET 0x0008 | ||
624 | #define OMAP4430_CM_L4CFG_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0008) | ||
625 | #define OMAP4_CM_MEMIF_CLKSTCTRL_RESTORE_OFFSET 0x000c | ||
626 | #define OMAP4430_CM_MEMIF_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x000c) | ||
627 | #define OMAP4_CM_L4PER_CLKSTCTRL_RESTORE_OFFSET 0x0010 | ||
628 | #define OMAP4430_CM_L4PER_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0010) | ||
629 | #define OMAP4_CM_L3INIT_CLKSTCTRL_RESTORE_OFFSET 0x0014 | ||
630 | #define OMAP4430_CM_L3INIT_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0014) | ||
631 | #define OMAP4_CM_L3INSTR_L3_3_CLKCTRL_RESTORE_OFFSET 0x0018 | ||
632 | #define OMAP4430_CM_L3INSTR_L3_3_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0018) | ||
633 | #define OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE_OFFSET 0x001c | ||
634 | #define OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x001c) | ||
635 | #define OMAP4_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE_OFFSET 0x0020 | ||
636 | #define OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0020) | ||
637 | #define OMAP4_CM_CM2_PROFILING_CLKCTRL_RESTORE_OFFSET 0x0024 | ||
638 | #define OMAP4430_CM_CM2_PROFILING_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0024) | ||
639 | #define OMAP4_CM_D2D_STATICDEP_RESTORE_OFFSET 0x0028 | ||
640 | #define OMAP4430_CM_D2D_STATICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0028) | ||
641 | #define OMAP4_CM_L3_1_DYNAMICDEP_RESTORE_OFFSET 0x002c | ||
642 | #define OMAP4430_CM_L3_1_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x002c) | ||
643 | #define OMAP4_CM_L3_2_DYNAMICDEP_RESTORE_OFFSET 0x0030 | ||
644 | #define OMAP4430_CM_L3_2_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0030) | ||
645 | #define OMAP4_CM_D2D_DYNAMICDEP_RESTORE_OFFSET 0x0034 | ||
646 | #define OMAP4430_CM_D2D_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0034) | ||
647 | #define OMAP4_CM_L4CFG_DYNAMICDEP_RESTORE_OFFSET 0x0038 | ||
648 | #define OMAP4430_CM_L4CFG_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0038) | ||
649 | #define OMAP4_CM_L4PER_DYNAMICDEP_RESTORE_OFFSET 0x003c | ||
650 | #define OMAP4430_CM_L4PER_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x003c) | ||
651 | #define OMAP4_CM_L4PER_GPIO2_CLKCTRL_RESTORE_OFFSET 0x0040 | ||
652 | #define OMAP4430_CM_L4PER_GPIO2_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0040) | ||
653 | #define OMAP4_CM_L4PER_GPIO3_CLKCTRL_RESTORE_OFFSET 0x0044 | ||
654 | #define OMAP4430_CM_L4PER_GPIO3_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0044) | ||
655 | #define OMAP4_CM_L4PER_GPIO4_CLKCTRL_RESTORE_OFFSET 0x0048 | ||
656 | #define OMAP4430_CM_L4PER_GPIO4_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0048) | ||
657 | #define OMAP4_CM_L4PER_GPIO5_CLKCTRL_RESTORE_OFFSET 0x004c | ||
658 | #define OMAP4430_CM_L4PER_GPIO5_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x004c) | ||
659 | #define OMAP4_CM_L4PER_GPIO6_CLKCTRL_RESTORE_OFFSET 0x0050 | ||
660 | #define OMAP4430_CM_L4PER_GPIO6_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0050) | ||
661 | #define OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE_OFFSET 0x0054 | ||
662 | #define OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0054) | ||
663 | #define OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE_OFFSET 0x0058 | ||
664 | #define OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x0058) | ||
665 | #define OMAP4_CM_SDMA_STATICDEP_RESTORE_OFFSET 0x005c | ||
666 | #define OMAP4430_CM_SDMA_STATICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_MOD, 0x005c) | ||
581 | #endif | 667 | #endif |
diff --git a/arch/arm/mach-omap2/cm4xxx.c b/arch/arm/mach-omap2/cm4xxx.c index b101091e95d6..f8a660a1a4a6 100644 --- a/arch/arm/mach-omap2/cm4xxx.c +++ b/arch/arm/mach-omap2/cm4xxx.c | |||
@@ -43,7 +43,6 @@ | |||
43 | * using separate functional clock | 43 | * using separate functional clock |
44 | * 0x3 disabled: Module is disabled and cannot be accessed | 44 | * 0x3 disabled: Module is disabled and cannot be accessed |
45 | * | 45 | * |
46 | * TODO: Need to handle module accessible in idle state | ||
47 | */ | 46 | */ |
48 | int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg) | 47 | int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg) |
49 | { | 48 | { |
@@ -52,9 +51,11 @@ int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg) | |||
52 | if (!clkctrl_reg) | 51 | if (!clkctrl_reg) |
53 | return 0; | 52 | return 0; |
54 | 53 | ||
55 | omap_test_timeout(((__raw_readl(clkctrl_reg) & | 54 | omap_test_timeout(( |
56 | OMAP4430_IDLEST_MASK) == 0), | 55 | ((__raw_readl(clkctrl_reg) & OMAP4430_IDLEST_MASK) == 0) || |
57 | MAX_MODULE_READY_TIME, i); | 56 | (((__raw_readl(clkctrl_reg) & OMAP4430_IDLEST_MASK) >> |
57 | OMAP4430_IDLEST_SHIFT) == 0x2)), | ||
58 | MAX_MODULE_READY_TIME, i); | ||
58 | 59 | ||
59 | return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; | 60 | return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; |
60 | } | 61 | } |
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c new file mode 100644 index 000000000000..778929f7e92d --- /dev/null +++ b/arch/arm/mach-omap2/common.c | |||
@@ -0,0 +1,135 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/common.c | ||
3 | * | ||
4 | * Code common to all OMAP2+ machines. | ||
5 | * | ||
6 | * Copyright (C) 2009 Texas Instruments | ||
7 | * Copyright (C) 2010 Nokia Corporation | ||
8 | * Tony Lindgren <tony@atomide.com> | ||
9 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
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 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/clk.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
20 | #include <plat/common.h> | ||
21 | #include <plat/board.h> | ||
22 | #include <plat/mux.h> | ||
23 | |||
24 | #include <plat/clock.h> | ||
25 | |||
26 | #include "sdrc.h" | ||
27 | #include "control.h" | ||
28 | |||
29 | /* Global address base setup code */ | ||
30 | |||
31 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | ||
32 | |||
33 | static void __init __omap2_set_globals(struct omap_globals *omap2_globals) | ||
34 | { | ||
35 | omap2_set_globals_tap(omap2_globals); | ||
36 | omap2_set_globals_sdrc(omap2_globals); | ||
37 | omap2_set_globals_control(omap2_globals); | ||
38 | omap2_set_globals_prcm(omap2_globals); | ||
39 | } | ||
40 | |||
41 | #endif | ||
42 | |||
43 | #if defined(CONFIG_ARCH_OMAP2420) | ||
44 | |||
45 | static struct omap_globals omap242x_globals = { | ||
46 | .class = OMAP242X_CLASS, | ||
47 | .tap = OMAP2_L4_IO_ADDRESS(0x48014000), | ||
48 | .sdrc = OMAP2420_SDRC_BASE, | ||
49 | .sms = OMAP2420_SMS_BASE, | ||
50 | .ctrl = OMAP242X_CTRL_BASE, | ||
51 | .prm = OMAP2420_PRM_BASE, | ||
52 | .cm = OMAP2420_CM_BASE, | ||
53 | .uart1_phys = OMAP2_UART1_BASE, | ||
54 | .uart2_phys = OMAP2_UART2_BASE, | ||
55 | .uart3_phys = OMAP2_UART3_BASE, | ||
56 | }; | ||
57 | |||
58 | void __init omap2_set_globals_242x(void) | ||
59 | { | ||
60 | __omap2_set_globals(&omap242x_globals); | ||
61 | } | ||
62 | #endif | ||
63 | |||
64 | #if defined(CONFIG_ARCH_OMAP2430) | ||
65 | |||
66 | static struct omap_globals omap243x_globals = { | ||
67 | .class = OMAP243X_CLASS, | ||
68 | .tap = OMAP2_L4_IO_ADDRESS(0x4900a000), | ||
69 | .sdrc = OMAP243X_SDRC_BASE, | ||
70 | .sms = OMAP243X_SMS_BASE, | ||
71 | .ctrl = OMAP243X_CTRL_BASE, | ||
72 | .prm = OMAP2430_PRM_BASE, | ||
73 | .cm = OMAP2430_CM_BASE, | ||
74 | .uart1_phys = OMAP2_UART1_BASE, | ||
75 | .uart2_phys = OMAP2_UART2_BASE, | ||
76 | .uart3_phys = OMAP2_UART3_BASE, | ||
77 | }; | ||
78 | |||
79 | void __init omap2_set_globals_243x(void) | ||
80 | { | ||
81 | __omap2_set_globals(&omap243x_globals); | ||
82 | } | ||
83 | #endif | ||
84 | |||
85 | #if defined(CONFIG_ARCH_OMAP3) | ||
86 | |||
87 | static struct omap_globals omap3_globals = { | ||
88 | .class = OMAP343X_CLASS, | ||
89 | .tap = OMAP2_L4_IO_ADDRESS(0x4830A000), | ||
90 | .sdrc = OMAP343X_SDRC_BASE, | ||
91 | .sms = OMAP343X_SMS_BASE, | ||
92 | .ctrl = OMAP343X_CTRL_BASE, | ||
93 | .prm = OMAP3430_PRM_BASE, | ||
94 | .cm = OMAP3430_CM_BASE, | ||
95 | .uart1_phys = OMAP3_UART1_BASE, | ||
96 | .uart2_phys = OMAP3_UART2_BASE, | ||
97 | .uart3_phys = OMAP3_UART3_BASE, | ||
98 | .uart4_phys = OMAP3_UART4_BASE, /* Only on 3630 */ | ||
99 | }; | ||
100 | |||
101 | void __init omap2_set_globals_3xxx(void) | ||
102 | { | ||
103 | __omap2_set_globals(&omap3_globals); | ||
104 | } | ||
105 | |||
106 | void __init omap3_map_io(void) | ||
107 | { | ||
108 | omap2_set_globals_3xxx(); | ||
109 | omap34xx_map_common_io(); | ||
110 | } | ||
111 | #endif | ||
112 | |||
113 | #if defined(CONFIG_ARCH_OMAP4) | ||
114 | static struct omap_globals omap4_globals = { | ||
115 | .class = OMAP443X_CLASS, | ||
116 | .tap = OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE), | ||
117 | .ctrl = OMAP443X_SCM_BASE, | ||
118 | .ctrl_pad = OMAP443X_CTRL_BASE, | ||
119 | .prm = OMAP4430_PRM_BASE, | ||
120 | .cm = OMAP4430_CM_BASE, | ||
121 | .cm2 = OMAP4430_CM2_BASE, | ||
122 | .uart1_phys = OMAP4_UART1_BASE, | ||
123 | .uart2_phys = OMAP4_UART2_BASE, | ||
124 | .uart3_phys = OMAP4_UART3_BASE, | ||
125 | .uart4_phys = OMAP4_UART4_BASE, | ||
126 | }; | ||
127 | |||
128 | void __init omap2_set_globals_443x(void) | ||
129 | { | ||
130 | omap2_set_globals_tap(&omap4_globals); | ||
131 | omap2_set_globals_control(&omap4_globals); | ||
132 | omap2_set_globals_prcm(&omap4_globals); | ||
133 | } | ||
134 | #endif | ||
135 | |||
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index a8d20eef2306..1fa3294b6048 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c | |||
@@ -16,15 +16,18 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | 17 | ||
18 | #include <plat/common.h> | 18 | #include <plat/common.h> |
19 | #include <plat/control.h> | ||
20 | #include <plat/sdrc.h> | 19 | #include <plat/sdrc.h> |
20 | |||
21 | #include "cm-regbits-34xx.h" | 21 | #include "cm-regbits-34xx.h" |
22 | #include "prm-regbits-34xx.h" | 22 | #include "prm-regbits-34xx.h" |
23 | #include "cm.h" | 23 | #include "cm.h" |
24 | #include "prm.h" | 24 | #include "prm.h" |
25 | #include "sdrc.h" | 25 | #include "sdrc.h" |
26 | #include "pm.h" | ||
27 | #include "control.h" | ||
26 | 28 | ||
27 | static void __iomem *omap2_ctrl_base; | 29 | static void __iomem *omap2_ctrl_base; |
30 | static void __iomem *omap4_ctrl_pad_base; | ||
28 | 31 | ||
29 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) | 32 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) |
30 | struct omap3_scratchpad { | 33 | struct omap3_scratchpad { |
@@ -137,6 +140,7 @@ static struct omap3_control_regs control_context; | |||
137 | #endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */ | 140 | #endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */ |
138 | 141 | ||
139 | #define OMAP_CTRL_REGADDR(reg) (omap2_ctrl_base + (reg)) | 142 | #define OMAP_CTRL_REGADDR(reg) (omap2_ctrl_base + (reg)) |
143 | #define OMAP4_CTRL_PAD_REGADDR(reg) (omap4_ctrl_pad_base + (reg)) | ||
140 | 144 | ||
141 | void __init omap2_set_globals_control(struct omap_globals *omap2_globals) | 145 | void __init omap2_set_globals_control(struct omap_globals *omap2_globals) |
142 | { | 146 | { |
@@ -145,6 +149,12 @@ void __init omap2_set_globals_control(struct omap_globals *omap2_globals) | |||
145 | omap2_ctrl_base = ioremap(omap2_globals->ctrl, SZ_4K); | 149 | omap2_ctrl_base = ioremap(omap2_globals->ctrl, SZ_4K); |
146 | WARN_ON(!omap2_ctrl_base); | 150 | WARN_ON(!omap2_ctrl_base); |
147 | } | 151 | } |
152 | |||
153 | /* Static mapping, never released */ | ||
154 | if (omap2_globals->ctrl_pad) { | ||
155 | omap4_ctrl_pad_base = ioremap(omap2_globals->ctrl_pad, SZ_4K); | ||
156 | WARN_ON(!omap4_ctrl_pad_base); | ||
157 | } | ||
148 | } | 158 | } |
149 | 159 | ||
150 | void __iomem *omap_ctrl_base_get(void) | 160 | void __iomem *omap_ctrl_base_get(void) |
@@ -182,6 +192,23 @@ void omap_ctrl_writel(u32 val, u16 offset) | |||
182 | __raw_writel(val, OMAP_CTRL_REGADDR(offset)); | 192 | __raw_writel(val, OMAP_CTRL_REGADDR(offset)); |
183 | } | 193 | } |
184 | 194 | ||
195 | /* | ||
196 | * On OMAP4 control pad are not addressable from control | ||
197 | * core base. So the common omap_ctrl_read/write APIs breaks | ||
198 | * Hence export separate APIs to manage the omap4 pad control | ||
199 | * registers. This APIs will work only for OMAP4 | ||
200 | */ | ||
201 | |||
202 | u32 omap4_ctrl_pad_readl(u16 offset) | ||
203 | { | ||
204 | return __raw_readl(OMAP4_CTRL_PAD_REGADDR(offset)); | ||
205 | } | ||
206 | |||
207 | void omap4_ctrl_pad_writel(u32 val, u16 offset) | ||
208 | { | ||
209 | __raw_writel(val, OMAP4_CTRL_PAD_REGADDR(offset)); | ||
210 | } | ||
211 | |||
185 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) | 212 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) |
186 | /* | 213 | /* |
187 | * Clears the scratchpad contents in case of cold boot- | 214 | * Clears the scratchpad contents in case of cold boot- |
@@ -190,7 +217,7 @@ void omap_ctrl_writel(u32 val, u16 offset) | |||
190 | void omap3_clear_scratchpad_contents(void) | 217 | void omap3_clear_scratchpad_contents(void) |
191 | { | 218 | { |
192 | u32 max_offset = OMAP343X_SCRATCHPAD_ROM_OFFSET; | 219 | u32 max_offset = OMAP343X_SCRATCHPAD_ROM_OFFSET; |
193 | u32 *v_addr; | 220 | void __iomem *v_addr; |
194 | u32 offset = 0; | 221 | u32 offset = 0; |
195 | v_addr = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD_ROM); | 222 | v_addr = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD_ROM); |
196 | if (prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) & | 223 | if (prm_read_mod_reg(OMAP3430_GR_MOD, OMAP3_PRM_RSTST_OFFSET) & |
@@ -206,7 +233,7 @@ void omap3_clear_scratchpad_contents(void) | |||
206 | /* Populate the scratchpad structure with restore structure */ | 233 | /* Populate the scratchpad structure with restore structure */ |
207 | void omap3_save_scratchpad_contents(void) | 234 | void omap3_save_scratchpad_contents(void) |
208 | { | 235 | { |
209 | void * __iomem scratchpad_address; | 236 | void __iomem *scratchpad_address; |
210 | u32 arm_context_addr; | 237 | u32 arm_context_addr; |
211 | struct omap3_scratchpad scratchpad_contents; | 238 | struct omap3_scratchpad scratchpad_contents; |
212 | struct omap3_scratchpad_prcm_block prcm_block_contents; | 239 | struct omap3_scratchpad_prcm_block prcm_block_contents; |
diff --git a/arch/arm/plat-omap/include/plat/control.h b/arch/arm/mach-omap2/control.h index 131bf405c2f6..b6c6b7c450b3 100644 --- a/arch/arm/plat-omap/include/plat/control.h +++ b/arch/arm/mach-omap2/control.h | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/plat-omap/include/mach/control.h | 2 | * arch/arm/mach-omap2/control.h |
3 | * | 3 | * |
4 | * OMAP2/3/4 System Control Module definitions | 4 | * OMAP2/3/4 System Control Module definitions |
5 | * | 5 | * |
6 | * Copyright (C) 2007-2009 Texas Instruments, Inc. | 6 | * Copyright (C) 2007-2010 Texas Instruments, Inc. |
7 | * Copyright (C) 2007-2008 Nokia Corporation | 7 | * Copyright (C) 2007-2008, 2010 Nokia Corporation |
8 | * | 8 | * |
9 | * Written by Paul Walmsley | 9 | * Written by Paul Walmsley |
10 | * | 10 | * |
@@ -13,10 +13,14 @@ | |||
13 | * the Free Software Foundation. | 13 | * the Free Software Foundation. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef __ASM_ARCH_CONTROL_H | 16 | #ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H |
17 | #define __ASM_ARCH_CONTROL_H | 17 | #define __ARCH_ARM_MACH_OMAP2_CONTROL_H |
18 | 18 | ||
19 | #include <mach/io.h> | 19 | #include <mach/io.h> |
20 | #include <mach/ctrl_module_core_44xx.h> | ||
21 | #include <mach/ctrl_module_wkup_44xx.h> | ||
22 | #include <mach/ctrl_module_pad_core_44xx.h> | ||
23 | #include <mach/ctrl_module_pad_wkup_44xx.h> | ||
20 | 24 | ||
21 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLY__ |
22 | #define OMAP242X_CTRL_REGADDR(reg) \ | 26 | #define OMAP242X_CTRL_REGADDR(reg) \ |
@@ -204,12 +208,6 @@ | |||
204 | #define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 | 208 | #define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 |
205 | #define OMAP3_PADCONF_SAD2D_IDLEACK 0x254 | 209 | #define OMAP3_PADCONF_SAD2D_IDLEACK 0x254 |
206 | 210 | ||
207 | /* 44xx control status register offset */ | ||
208 | #define OMAP44XX_CONTROL_STATUS 0x2c4 | ||
209 | |||
210 | /* 44xx-only CONTROL_GENERAL register offsets */ | ||
211 | #define OMAP44XX_CONTROL_MMC1 0x628 | ||
212 | #define OMAP44XX_CONTROL_PBIAS_LITE 0x600 | ||
213 | /* | 211 | /* |
214 | * REVISIT: This list of registers is not comprehensive - there are more | 212 | * REVISIT: This list of registers is not comprehensive - there are more |
215 | * that should be added. | 213 | * that should be added. |
@@ -225,6 +223,8 @@ | |||
225 | #define OMAP2_MMCSDIO1ADPCLKISEL (1 << 24) /* MMC1 loop back clock */ | 223 | #define OMAP2_MMCSDIO1ADPCLKISEL (1 << 24) /* MMC1 loop back clock */ |
226 | #define OMAP24XX_USBSTANDBYCTRL (1 << 15) | 224 | #define OMAP24XX_USBSTANDBYCTRL (1 << 15) |
227 | #define OMAP2_MCBSP2_CLKS_MASK (1 << 6) | 225 | #define OMAP2_MCBSP2_CLKS_MASK (1 << 6) |
226 | #define OMAP2_MCBSP1_FSR_MASK (1 << 4) | ||
227 | #define OMAP2_MCBSP1_CLKR_MASK (1 << 3) | ||
228 | #define OMAP2_MCBSP1_CLKS_MASK (1 << 2) | 228 | #define OMAP2_MCBSP1_CLKS_MASK (1 << 2) |
229 | 229 | ||
230 | /* CONTROL_DEVCONF1 bits */ | 230 | /* CONTROL_DEVCONF1 bits */ |
@@ -255,23 +255,6 @@ | |||
255 | #define OMAP2_PBIASLITEPWRDNZ0 (1 << 1) | 255 | #define OMAP2_PBIASLITEPWRDNZ0 (1 << 1) |
256 | #define OMAP2_PBIASLITEVMODE0 (1 << 0) | 256 | #define OMAP2_PBIASLITEVMODE0 (1 << 0) |
257 | 257 | ||
258 | /* CONTROL_PBIAS_LITE bits for OMAP4 */ | ||
259 | #define OMAP4_MMC1_PWRDNZ (1 << 26) | ||
260 | #define OMAP4_MMC1_PBIASLITE_HIZ_MODE (1 << 25) | ||
261 | #define OMAP4_MMC1_PBIASLITE_SUPPLY_HI_OUT (1 << 24) | ||
262 | #define OMAP4_MMC1_PBIASLITE_VMODE_ERROR (1 << 23) | ||
263 | #define OMAP4_MMC1_PBIASLITE_PWRDNZ (1 << 22) | ||
264 | #define OMAP4_MMC1_PBIASLITE_VMODE (1 << 21) | ||
265 | #define OMAP4_USBC1_ICUSB_PWRDNZ (1 << 20) | ||
266 | |||
267 | #define OMAP4_CONTROL_SDMMC1_PUSTRENGTHGRP0 (1 << 31) | ||
268 | #define OMAP4_CONTROL_SDMMC1_PUSTRENGTHGRP1 (1 << 30) | ||
269 | #define OMAP4_CONTROL_SDMMC1_PUSTRENGTHGRP2 (1 << 29) | ||
270 | #define OMAP4_CONTROL_SDMMC1_PUSTRENGTHGRP3 (1 << 28) | ||
271 | #define OMAP4_CONTROL_SDMMC1_DR0_SPEEDCTRL (1 << 27) | ||
272 | #define OMAP4_CONTROL_SDMMC1_DR1_SPEEDCTRL (1 << 26) | ||
273 | #define OMAP4_CONTROL_SDMMC1_DR2_SPEEDCTRL (1 << 25) | ||
274 | |||
275 | /* CONTROL_PROG_IO1 bits */ | 258 | /* CONTROL_PROG_IO1 bits */ |
276 | #define OMAP3630_PRG_SDMMC1_SPEEDCTRL (1 << 20) | 259 | #define OMAP3630_PRG_SDMMC1_SPEEDCTRL (1 << 20) |
277 | 260 | ||
@@ -338,12 +321,12 @@ | |||
338 | #define FEAT_L2CACHE_256KB 3 | 321 | #define FEAT_L2CACHE_256KB 3 |
339 | 322 | ||
340 | #define OMAP3_ISP_SHIFT 5 | 323 | #define OMAP3_ISP_SHIFT 5 |
341 | #define OMAP3_ISP_MASK (1<< OMAP3_ISP_SHIFT) | 324 | #define OMAP3_ISP_MASK (1 << OMAP3_ISP_SHIFT) |
342 | #define FEAT_ISP 0 | 325 | #define FEAT_ISP 0 |
343 | #define FEAT_ISP_NONE 1 | 326 | #define FEAT_ISP_NONE 1 |
344 | 327 | ||
345 | #define OMAP3_NEON_SHIFT 4 | 328 | #define OMAP3_NEON_SHIFT 4 |
346 | #define OMAP3_NEON_MASK (1<< OMAP3_NEON_SHIFT) | 329 | #define OMAP3_NEON_MASK (1 << OMAP3_NEON_SHIFT) |
347 | #define FEAT_NEON 0 | 330 | #define FEAT_NEON 0 |
348 | #define FEAT_NEON_NONE 1 | 331 | #define FEAT_NEON_NONE 1 |
349 | 332 | ||
@@ -354,9 +337,11 @@ extern void __iomem *omap_ctrl_base_get(void); | |||
354 | extern u8 omap_ctrl_readb(u16 offset); | 337 | extern u8 omap_ctrl_readb(u16 offset); |
355 | extern u16 omap_ctrl_readw(u16 offset); | 338 | extern u16 omap_ctrl_readw(u16 offset); |
356 | extern u32 omap_ctrl_readl(u16 offset); | 339 | extern u32 omap_ctrl_readl(u16 offset); |
340 | extern u32 omap4_ctrl_pad_readl(u16 offset); | ||
357 | extern void omap_ctrl_writeb(u8 val, u16 offset); | 341 | extern void omap_ctrl_writeb(u8 val, u16 offset); |
358 | extern void omap_ctrl_writew(u16 val, u16 offset); | 342 | extern void omap_ctrl_writew(u16 val, u16 offset); |
359 | extern void omap_ctrl_writel(u32 val, u16 offset); | 343 | extern void omap_ctrl_writel(u32 val, u16 offset); |
344 | extern void omap4_ctrl_pad_writel(u32 val, u16 offset); | ||
360 | 345 | ||
361 | extern void omap3_save_scratchpad_contents(void); | 346 | extern void omap3_save_scratchpad_contents(void); |
362 | extern void omap3_clear_scratchpad_contents(void); | 347 | extern void omap3_clear_scratchpad_contents(void); |
@@ -371,11 +356,13 @@ extern void omap3_control_restore_context(void); | |||
371 | #define omap_ctrl_readb(x) 0 | 356 | #define omap_ctrl_readb(x) 0 |
372 | #define omap_ctrl_readw(x) 0 | 357 | #define omap_ctrl_readw(x) 0 |
373 | #define omap_ctrl_readl(x) 0 | 358 | #define omap_ctrl_readl(x) 0 |
359 | #define omap4_ctrl_pad_readl(x) 0 | ||
374 | #define omap_ctrl_writeb(x, y) WARN_ON(1) | 360 | #define omap_ctrl_writeb(x, y) WARN_ON(1) |
375 | #define omap_ctrl_writew(x, y) WARN_ON(1) | 361 | #define omap_ctrl_writew(x, y) WARN_ON(1) |
376 | #define omap_ctrl_writel(x, y) WARN_ON(1) | 362 | #define omap_ctrl_writel(x, y) WARN_ON(1) |
363 | #define omap4_ctrl_pad_writel(x, y) WARN_ON(1) | ||
377 | #endif | 364 | #endif |
378 | #endif /* __ASSEMBLY__ */ | 365 | #endif /* __ASSEMBLY__ */ |
379 | 366 | ||
380 | #endif /* __ASM_ARCH_CONTROL_H */ | 367 | #endif /* __ARCH_ARM_MACH_OMAP2_CONTROL_H */ |
381 | 368 | ||
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 3d3d035db9af..0d50b45d041c 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
@@ -29,10 +29,10 @@ | |||
29 | #include <plat/irqs.h> | 29 | #include <plat/irqs.h> |
30 | #include <plat/powerdomain.h> | 30 | #include <plat/powerdomain.h> |
31 | #include <plat/clockdomain.h> | 31 | #include <plat/clockdomain.h> |
32 | #include <plat/control.h> | ||
33 | #include <plat/serial.h> | 32 | #include <plat/serial.h> |
34 | 33 | ||
35 | #include "pm.h" | 34 | #include "pm.h" |
35 | #include "control.h" | ||
36 | 36 | ||
37 | #ifdef CONFIG_CPU_IDLE | 37 | #ifdef CONFIG_CPU_IDLE |
38 | 38 | ||
@@ -60,7 +60,8 @@ struct omap3_processor_cx { | |||
60 | 60 | ||
61 | struct omap3_processor_cx omap3_power_states[OMAP3_MAX_STATES]; | 61 | struct omap3_processor_cx omap3_power_states[OMAP3_MAX_STATES]; |
62 | struct omap3_processor_cx current_cx_state; | 62 | struct omap3_processor_cx current_cx_state; |
63 | struct powerdomain *mpu_pd, *core_pd; | 63 | struct powerdomain *mpu_pd, *core_pd, *per_pd; |
64 | struct powerdomain *cam_pd; | ||
64 | 65 | ||
65 | /* | 66 | /* |
66 | * The latencies/thresholds for various C states have | 67 | * The latencies/thresholds for various C states have |
@@ -233,14 +234,60 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, | |||
233 | struct cpuidle_state *state) | 234 | struct cpuidle_state *state) |
234 | { | 235 | { |
235 | struct cpuidle_state *new_state = next_valid_state(dev, state); | 236 | struct cpuidle_state *new_state = next_valid_state(dev, state); |
237 | u32 core_next_state, per_next_state = 0, per_saved_state = 0; | ||
238 | u32 cam_state; | ||
239 | struct omap3_processor_cx *cx; | ||
240 | int ret; | ||
236 | 241 | ||
237 | if ((state->flags & CPUIDLE_FLAG_CHECK_BM) && omap3_idle_bm_check()) { | 242 | if ((state->flags & CPUIDLE_FLAG_CHECK_BM) && omap3_idle_bm_check()) { |
238 | BUG_ON(!dev->safe_state); | 243 | BUG_ON(!dev->safe_state); |
239 | new_state = dev->safe_state; | 244 | new_state = dev->safe_state; |
245 | goto select_state; | ||
240 | } | 246 | } |
241 | 247 | ||
248 | cx = cpuidle_get_statedata(state); | ||
249 | core_next_state = cx->core_state; | ||
250 | |||
251 | /* | ||
252 | * FIXME: we currently manage device-specific idle states | ||
253 | * for PER and CORE in combination with CPU-specific | ||
254 | * idle states. This is wrong, and device-specific | ||
255 | * idle managment needs to be separated out into | ||
256 | * its own code. | ||
257 | */ | ||
258 | |||
259 | /* | ||
260 | * Prevent idle completely if CAM is active. | ||
261 | * CAM does not have wakeup capability in OMAP3. | ||
262 | */ | ||
263 | cam_state = pwrdm_read_pwrst(cam_pd); | ||
264 | if (cam_state == PWRDM_POWER_ON) { | ||
265 | new_state = dev->safe_state; | ||
266 | goto select_state; | ||
267 | } | ||
268 | |||
269 | /* | ||
270 | * Prevent PER off if CORE is not in retention or off as this | ||
271 | * would disable PER wakeups completely. | ||
272 | */ | ||
273 | per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd); | ||
274 | if ((per_next_state == PWRDM_POWER_OFF) && | ||
275 | (core_next_state > PWRDM_POWER_RET)) | ||
276 | per_next_state = PWRDM_POWER_RET; | ||
277 | |||
278 | /* Are we changing PER target state? */ | ||
279 | if (per_next_state != per_saved_state) | ||
280 | pwrdm_set_next_pwrst(per_pd, per_next_state); | ||
281 | |||
282 | select_state: | ||
242 | dev->last_state = new_state; | 283 | dev->last_state = new_state; |
243 | return omap3_enter_idle(dev, new_state); | 284 | ret = omap3_enter_idle(dev, new_state); |
285 | |||
286 | /* Restore original PER state if it was modified */ | ||
287 | if (per_next_state != per_saved_state) | ||
288 | pwrdm_set_next_pwrst(per_pd, per_saved_state); | ||
289 | |||
290 | return ret; | ||
244 | } | 291 | } |
245 | 292 | ||
246 | DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); | 293 | DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); |
@@ -328,7 +375,8 @@ void omap_init_power_states(void) | |||
328 | cpuidle_params_table[OMAP3_STATE_C2].threshold; | 375 | cpuidle_params_table[OMAP3_STATE_C2].threshold; |
329 | omap3_power_states[OMAP3_STATE_C2].mpu_state = PWRDM_POWER_ON; | 376 | omap3_power_states[OMAP3_STATE_C2].mpu_state = PWRDM_POWER_ON; |
330 | omap3_power_states[OMAP3_STATE_C2].core_state = PWRDM_POWER_ON; | 377 | omap3_power_states[OMAP3_STATE_C2].core_state = PWRDM_POWER_ON; |
331 | omap3_power_states[OMAP3_STATE_C2].flags = CPUIDLE_FLAG_TIME_VALID; | 378 | omap3_power_states[OMAP3_STATE_C2].flags = CPUIDLE_FLAG_TIME_VALID | |
379 | CPUIDLE_FLAG_CHECK_BM; | ||
332 | 380 | ||
333 | /* C3 . MPU CSWR + Core inactive */ | 381 | /* C3 . MPU CSWR + Core inactive */ |
334 | omap3_power_states[OMAP3_STATE_C3].valid = | 382 | omap3_power_states[OMAP3_STATE_C3].valid = |
@@ -426,6 +474,8 @@ int __init omap3_idle_init(void) | |||
426 | 474 | ||
427 | mpu_pd = pwrdm_lookup("mpu_pwrdm"); | 475 | mpu_pd = pwrdm_lookup("mpu_pwrdm"); |
428 | core_pd = pwrdm_lookup("core_pwrdm"); | 476 | core_pd = pwrdm_lookup("core_pwrdm"); |
477 | per_pd = pwrdm_lookup("per_pwrdm"); | ||
478 | cam_pd = pwrdm_lookup("cam_pwrdm"); | ||
429 | 479 | ||
430 | omap_init_power_states(); | 480 | omap_init_power_states(); |
431 | cpuidle_register_driver(&omap3_idle_driver); | 481 | cpuidle_register_driver(&omap3_idle_driver); |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index c5cf1ba08a6f..5a0c148e23bc 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -9,12 +9,12 @@ | |||
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 15 | #include <linux/io.h> |
17 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
17 | #include <linux/err.h> | ||
18 | 18 | ||
19 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
20 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
@@ -22,15 +22,17 @@ | |||
22 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
23 | #include <asm/pmu.h> | 23 | #include <asm/pmu.h> |
24 | 24 | ||
25 | #include <plat/control.h> | ||
26 | #include <plat/tc.h> | 25 | #include <plat/tc.h> |
27 | #include <plat/board.h> | 26 | #include <plat/board.h> |
28 | #include <plat/mcbsp.h> | 27 | #include <plat/mcbsp.h> |
29 | #include <mach/gpio.h> | 28 | #include <mach/gpio.h> |
30 | #include <plat/mmc.h> | 29 | #include <plat/mmc.h> |
31 | #include <plat/dma.h> | 30 | #include <plat/dma.h> |
31 | #include <plat/omap_hwmod.h> | ||
32 | #include <plat/omap_device.h> | ||
32 | 33 | ||
33 | #include "mux.h" | 34 | #include "mux.h" |
35 | #include "control.h" | ||
34 | 36 | ||
35 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) | 37 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) |
36 | 38 | ||
@@ -538,7 +540,7 @@ static inline void omap_init_sham(void) { } | |||
538 | 540 | ||
539 | #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE) | 541 | #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE) |
540 | 542 | ||
541 | #ifdef CONFIG_ARCH_OMAP24XX | 543 | #ifdef CONFIG_ARCH_OMAP2 |
542 | static struct resource omap2_aes_resources[] = { | 544 | static struct resource omap2_aes_resources[] = { |
543 | { | 545 | { |
544 | .start = OMAP24XX_SEC_AES_BASE, | 546 | .start = OMAP24XX_SEC_AES_BASE, |
@@ -560,7 +562,7 @@ static int omap2_aes_resources_sz = ARRAY_SIZE(omap2_aes_resources); | |||
560 | #define omap2_aes_resources_sz 0 | 562 | #define omap2_aes_resources_sz 0 |
561 | #endif | 563 | #endif |
562 | 564 | ||
563 | #ifdef CONFIG_ARCH_OMAP34XX | 565 | #ifdef CONFIG_ARCH_OMAP3 |
564 | static struct resource omap3_aes_resources[] = { | 566 | static struct resource omap3_aes_resources[] = { |
565 | { | 567 | { |
566 | .start = OMAP34XX_SEC_AES_BASE, | 568 | .start = OMAP34XX_SEC_AES_BASE, |
@@ -732,7 +734,7 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | |||
732 | omap_mux_init_signal("sdmmc_dat0", 0); | 734 | omap_mux_init_signal("sdmmc_dat0", 0); |
733 | omap_mux_init_signal("sdmmc_dat_dir0", 0); | 735 | omap_mux_init_signal("sdmmc_dat_dir0", 0); |
734 | omap_mux_init_signal("sdmmc_cmd_dir", 0); | 736 | omap_mux_init_signal("sdmmc_cmd_dir", 0); |
735 | if (mmc_controller->slots[0].wires == 4) { | 737 | if (mmc_controller->slots[0].caps & MMC_CAP_4_BIT_DATA) { |
736 | omap_mux_init_signal("sdmmc_dat1", 0); | 738 | omap_mux_init_signal("sdmmc_dat1", 0); |
737 | omap_mux_init_signal("sdmmc_dat2", 0); | 739 | omap_mux_init_signal("sdmmc_dat2", 0); |
738 | omap_mux_init_signal("sdmmc_dat3", 0); | 740 | omap_mux_init_signal("sdmmc_dat3", 0); |
@@ -760,8 +762,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | |||
760 | OMAP_PIN_INPUT_PULLUP); | 762 | OMAP_PIN_INPUT_PULLUP); |
761 | omap_mux_init_signal("sdmmc1_dat0", | 763 | omap_mux_init_signal("sdmmc1_dat0", |
762 | OMAP_PIN_INPUT_PULLUP); | 764 | OMAP_PIN_INPUT_PULLUP); |
763 | if (mmc_controller->slots[0].wires == 4 || | 765 | if (mmc_controller->slots[0].caps & |
764 | mmc_controller->slots[0].wires == 8) { | 766 | (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) { |
765 | omap_mux_init_signal("sdmmc1_dat1", | 767 | omap_mux_init_signal("sdmmc1_dat1", |
766 | OMAP_PIN_INPUT_PULLUP); | 768 | OMAP_PIN_INPUT_PULLUP); |
767 | omap_mux_init_signal("sdmmc1_dat2", | 769 | omap_mux_init_signal("sdmmc1_dat2", |
@@ -769,7 +771,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | |||
769 | omap_mux_init_signal("sdmmc1_dat3", | 771 | omap_mux_init_signal("sdmmc1_dat3", |
770 | OMAP_PIN_INPUT_PULLUP); | 772 | OMAP_PIN_INPUT_PULLUP); |
771 | } | 773 | } |
772 | if (mmc_controller->slots[0].wires == 8) { | 774 | if (mmc_controller->slots[0].caps & |
775 | MMC_CAP_8_BIT_DATA) { | ||
773 | omap_mux_init_signal("sdmmc1_dat4", | 776 | omap_mux_init_signal("sdmmc1_dat4", |
774 | OMAP_PIN_INPUT_PULLUP); | 777 | OMAP_PIN_INPUT_PULLUP); |
775 | omap_mux_init_signal("sdmmc1_dat5", | 778 | omap_mux_init_signal("sdmmc1_dat5", |
@@ -793,8 +796,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | |||
793 | * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed | 796 | * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed |
794 | * in the board-*.c files | 797 | * in the board-*.c files |
795 | */ | 798 | */ |
796 | if (mmc_controller->slots[0].wires == 4 || | 799 | if (mmc_controller->slots[0].caps & |
797 | mmc_controller->slots[0].wires == 8) { | 800 | (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) { |
798 | omap_mux_init_signal("sdmmc2_dat1", | 801 | omap_mux_init_signal("sdmmc2_dat1", |
799 | OMAP_PIN_INPUT_PULLUP); | 802 | OMAP_PIN_INPUT_PULLUP); |
800 | omap_mux_init_signal("sdmmc2_dat2", | 803 | omap_mux_init_signal("sdmmc2_dat2", |
@@ -802,7 +805,8 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | |||
802 | omap_mux_init_signal("sdmmc2_dat3", | 805 | omap_mux_init_signal("sdmmc2_dat3", |
803 | OMAP_PIN_INPUT_PULLUP); | 806 | OMAP_PIN_INPUT_PULLUP); |
804 | } | 807 | } |
805 | if (mmc_controller->slots[0].wires == 8) { | 808 | if (mmc_controller->slots[0].caps & |
809 | MMC_CAP_8_BIT_DATA) { | ||
806 | omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4", | 810 | omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4", |
807 | OMAP_PIN_INPUT_PULLUP); | 811 | OMAP_PIN_INPUT_PULLUP); |
808 | omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5", | 812 | omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5", |
@@ -853,13 +857,13 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
853 | case 3: | 857 | case 3: |
854 | if (!cpu_is_omap44xx()) | 858 | if (!cpu_is_omap44xx()) |
855 | return; | 859 | return; |
856 | base = OMAP4_MMC4_BASE + OMAP4_MMC_REG_OFFSET; | 860 | base = OMAP4_MMC4_BASE; |
857 | irq = OMAP44XX_IRQ_MMC4; | 861 | irq = OMAP44XX_IRQ_MMC4; |
858 | break; | 862 | break; |
859 | case 4: | 863 | case 4: |
860 | if (!cpu_is_omap44xx()) | 864 | if (!cpu_is_omap44xx()) |
861 | return; | 865 | return; |
862 | base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET; | 866 | base = OMAP4_MMC5_BASE; |
863 | irq = OMAP44XX_IRQ_MMC5; | 867 | irq = OMAP44XX_IRQ_MMC5; |
864 | break; | 868 | break; |
865 | default: | 869 | default: |
@@ -870,10 +874,8 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
870 | size = OMAP2420_MMC_SIZE; | 874 | size = OMAP2420_MMC_SIZE; |
871 | name = "mmci-omap"; | 875 | name = "mmci-omap"; |
872 | } else if (cpu_is_omap44xx()) { | 876 | } else if (cpu_is_omap44xx()) { |
873 | if (i < 3) { | 877 | if (i < 3) |
874 | base += OMAP4_MMC_REG_OFFSET; | ||
875 | irq += OMAP44XX_IRQ_GIC_START; | 878 | irq += OMAP44XX_IRQ_GIC_START; |
876 | } | ||
877 | size = OMAP4_HSMMC_SIZE; | 879 | size = OMAP4_HSMMC_SIZE; |
878 | name = "mmci-omap-hs"; | 880 | name = "mmci-omap-hs"; |
879 | } else { | 881 | } else { |
@@ -949,11 +951,72 @@ static inline void omap_init_vout(void) {} | |||
949 | 951 | ||
950 | /*-------------------------------------------------------------------------*/ | 952 | /*-------------------------------------------------------------------------*/ |
951 | 953 | ||
954 | /* | ||
955 | * Inorder to avoid any assumptions from bootloader regarding WDT | ||
956 | * settings, WDT module is reset during init. This enables the watchdog | ||
957 | * timer. Hence it is required to disable the watchdog after the WDT reset | ||
958 | * during init. Otherwise the system would reboot as per the default | ||
959 | * watchdog timer registers settings. | ||
960 | */ | ||
961 | #define OMAP_WDT_WPS (0x34) | ||
962 | #define OMAP_WDT_SPR (0x48) | ||
963 | |||
964 | static int omap2_disable_wdt(struct omap_hwmod *oh, void *unused) | ||
965 | { | ||
966 | void __iomem *base; | ||
967 | int ret; | ||
968 | |||
969 | if (!oh) { | ||
970 | pr_err("%s: Could not look up wdtimer_hwmod\n", __func__); | ||
971 | return -EINVAL; | ||
972 | } | ||
973 | |||
974 | base = omap_hwmod_get_mpu_rt_va(oh); | ||
975 | if (!base) { | ||
976 | pr_err("%s: Could not get the base address for %s\n", | ||
977 | oh->name, __func__); | ||
978 | return -EINVAL; | ||
979 | } | ||
980 | |||
981 | /* Enable the clocks before accessing the WDT registers */ | ||
982 | ret = omap_hwmod_enable(oh); | ||
983 | if (ret) { | ||
984 | pr_err("%s: Could not enable clocks for %s\n", | ||
985 | oh->name, __func__); | ||
986 | return ret; | ||
987 | } | ||
988 | |||
989 | /* sequence required to disable watchdog */ | ||
990 | __raw_writel(0xAAAA, base + OMAP_WDT_SPR); | ||
991 | while (__raw_readl(base + OMAP_WDT_WPS) & 0x10) | ||
992 | cpu_relax(); | ||
993 | |||
994 | __raw_writel(0x5555, base + OMAP_WDT_SPR); | ||
995 | while (__raw_readl(base + OMAP_WDT_WPS) & 0x10) | ||
996 | cpu_relax(); | ||
997 | |||
998 | ret = omap_hwmod_idle(oh); | ||
999 | if (ret) | ||
1000 | pr_err("%s: Could not disable clocks for %s\n", | ||
1001 | oh->name, __func__); | ||
1002 | |||
1003 | return ret; | ||
1004 | } | ||
1005 | |||
1006 | static void __init omap_disable_wdt(void) | ||
1007 | { | ||
1008 | if (cpu_class_is_omap2()) | ||
1009 | omap_hwmod_for_each_by_class("wd_timer", | ||
1010 | omap2_disable_wdt, NULL); | ||
1011 | return; | ||
1012 | } | ||
1013 | |||
952 | static int __init omap2_init_devices(void) | 1014 | static int __init omap2_init_devices(void) |
953 | { | 1015 | { |
954 | /* please keep these calls, and their implementations above, | 1016 | /* please keep these calls, and their implementations above, |
955 | * in alphabetical order so they're easier to sort through. | 1017 | * in alphabetical order so they're easier to sort through. |
956 | */ | 1018 | */ |
1019 | omap_disable_wdt(); | ||
957 | omap_hsmmc_reset(); | 1020 | omap_hsmmc_reset(); |
958 | omap_init_audio(); | 1021 | omap_init_audio(); |
959 | omap_init_camera(); | 1022 | omap_init_camera(); |
@@ -969,3 +1032,39 @@ static int __init omap2_init_devices(void) | |||
969 | return 0; | 1032 | return 0; |
970 | } | 1033 | } |
971 | arch_initcall(omap2_init_devices); | 1034 | arch_initcall(omap2_init_devices); |
1035 | |||
1036 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) | ||
1037 | struct omap_device_pm_latency omap_wdt_latency[] = { | ||
1038 | [0] = { | ||
1039 | .deactivate_func = omap_device_idle_hwmods, | ||
1040 | .activate_func = omap_device_enable_hwmods, | ||
1041 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, | ||
1042 | }, | ||
1043 | }; | ||
1044 | |||
1045 | static int __init omap_init_wdt(void) | ||
1046 | { | ||
1047 | int id = -1; | ||
1048 | struct omap_device *od; | ||
1049 | struct omap_hwmod *oh; | ||
1050 | char *oh_name = "wd_timer2"; | ||
1051 | char *dev_name = "omap_wdt"; | ||
1052 | |||
1053 | if (!cpu_class_is_omap2()) | ||
1054 | return 0; | ||
1055 | |||
1056 | oh = omap_hwmod_lookup(oh_name); | ||
1057 | if (!oh) { | ||
1058 | pr_err("Could not look up wd_timer%d hwmod\n", id); | ||
1059 | return -EINVAL; | ||
1060 | } | ||
1061 | |||
1062 | od = omap_device_build(dev_name, id, oh, NULL, 0, | ||
1063 | omap_wdt_latency, | ||
1064 | ARRAY_SIZE(omap_wdt_latency), 0); | ||
1065 | WARN(IS_ERR(od), "Cant build omap_device for %s:%s.\n", | ||
1066 | dev_name, oh->name); | ||
1067 | return 0; | ||
1068 | } | ||
1069 | subsys_initcall(omap_init_wdt); | ||
1070 | #endif | ||
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c new file mode 100644 index 000000000000..703f150dd01d --- /dev/null +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/gpmc-smsc911x.c | ||
3 | * | ||
4 | * Copyright (C) 2009 Li-Pro.Net | ||
5 | * Stephan Linz <linz@li-pro.net> | ||
6 | * | ||
7 | * Modified from linux/arch/arm/mach-omap2/gpmc-smc91x.c | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/delay.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <linux/smsc911x.h> | ||
21 | |||
22 | #include <plat/board.h> | ||
23 | #include <plat/gpmc.h> | ||
24 | #include <plat/gpmc-smsc911x.h> | ||
25 | |||
26 | static struct omap_smsc911x_platform_data *gpmc_cfg; | ||
27 | |||
28 | static struct resource gpmc_smsc911x_resources[] = { | ||
29 | [0] = { | ||
30 | .flags = IORESOURCE_MEM, | ||
31 | }, | ||
32 | [1] = { | ||
33 | .flags = IORESOURCE_IRQ, | ||
34 | }, | ||
35 | }; | ||
36 | |||
37 | static struct smsc911x_platform_config gpmc_smsc911x_config = { | ||
38 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
39 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
40 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
41 | .flags = SMSC911X_USE_16BIT, | ||
42 | }; | ||
43 | |||
44 | static struct platform_device gpmc_smsc911x_device = { | ||
45 | .name = "smsc911x", | ||
46 | .id = -1, | ||
47 | .num_resources = ARRAY_SIZE(gpmc_smsc911x_resources), | ||
48 | .resource = gpmc_smsc911x_resources, | ||
49 | .dev = { | ||
50 | .platform_data = &gpmc_smsc911x_config, | ||
51 | }, | ||
52 | }; | ||
53 | |||
54 | /* | ||
55 | * Initialize smsc911x device connected to the GPMC. Note that we | ||
56 | * assume that pin multiplexing is done in the board-*.c file, | ||
57 | * or in the bootloader. | ||
58 | */ | ||
59 | void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) | ||
60 | { | ||
61 | unsigned long cs_mem_base; | ||
62 | int ret; | ||
63 | |||
64 | gpmc_cfg = board_data; | ||
65 | |||
66 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { | ||
67 | printk(KERN_ERR "Failed to request GPMC mem for smsc911x\n"); | ||
68 | return; | ||
69 | } | ||
70 | |||
71 | gpmc_smsc911x_resources[0].start = cs_mem_base + 0x0; | ||
72 | gpmc_smsc911x_resources[0].end = cs_mem_base + 0xff; | ||
73 | |||
74 | if (gpio_request(gpmc_cfg->gpio_irq, "smsc911x irq") < 0) { | ||
75 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", | ||
76 | gpmc_cfg->gpio_irq); | ||
77 | goto free1; | ||
78 | } | ||
79 | |||
80 | gpio_direction_input(gpmc_cfg->gpio_irq); | ||
81 | gpmc_smsc911x_resources[1].start = gpio_to_irq(gpmc_cfg->gpio_irq); | ||
82 | gpmc_smsc911x_resources[1].flags |= | ||
83 | (gpmc_cfg->flags & IRQF_TRIGGER_MASK); | ||
84 | |||
85 | if (gpio_is_valid(gpmc_cfg->gpio_reset)) { | ||
86 | ret = gpio_request(gpmc_cfg->gpio_reset, "smsc911x reset"); | ||
87 | if (ret) { | ||
88 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x reset\n", | ||
89 | gpmc_cfg->gpio_reset); | ||
90 | goto free2; | ||
91 | } | ||
92 | |||
93 | gpio_direction_output(gpmc_cfg->gpio_reset, 1); | ||
94 | gpio_set_value(gpmc_cfg->gpio_reset, 0); | ||
95 | msleep(100); | ||
96 | gpio_set_value(gpmc_cfg->gpio_reset, 1); | ||
97 | } | ||
98 | |||
99 | if (platform_device_register(&gpmc_smsc911x_device) < 0) { | ||
100 | printk(KERN_ERR "Unable to register smsc911x device\n"); | ||
101 | gpio_free(gpmc_cfg->gpio_reset); | ||
102 | goto free2; | ||
103 | } | ||
104 | |||
105 | return; | ||
106 | |||
107 | free2: | ||
108 | gpio_free(gpmc_cfg->gpio_irq); | ||
109 | free1: | ||
110 | gpmc_cs_free(gpmc_cfg->cs); | ||
111 | |||
112 | printk(KERN_ERR "Could not initialize smsc911x\n"); | ||
113 | } | ||
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index c8f647b6205e..34272e4863fd 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -14,11 +14,11 @@ | |||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | #include <plat/control.h> | ||
18 | #include <plat/mmc.h> | 17 | #include <plat/mmc.h> |
19 | #include <plat/omap-pm.h> | 18 | #include <plat/omap-pm.h> |
20 | 19 | ||
21 | #include "hsmmc.h" | 20 | #include "hsmmc.h" |
21 | #include "control.h" | ||
22 | 22 | ||
23 | #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | 23 | #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) |
24 | 24 | ||
@@ -135,10 +135,11 @@ static void omap4_hsmmc1_before_set_reg(struct device *dev, int slot, | |||
135 | * | 135 | * |
136 | * FIXME handle VMMC1A as needed ... | 136 | * FIXME handle VMMC1A as needed ... |
137 | */ | 137 | */ |
138 | reg = omap_ctrl_readl(control_pbias_offset); | 138 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
139 | reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ | OMAP4_MMC1_PWRDNZ | | 139 | reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
140 | OMAP4_USBC1_ICUSB_PWRDNZ); | 140 | OMAP4_MMC1_PWRDNZ_MASK | |
141 | omap_ctrl_writel(reg, control_pbias_offset); | 141 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); |
142 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | ||
142 | } | 143 | } |
143 | 144 | ||
144 | static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | 145 | static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, |
@@ -147,30 +148,33 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
147 | u32 reg; | 148 | u32 reg; |
148 | 149 | ||
149 | if (power_on) { | 150 | if (power_on) { |
150 | reg = omap_ctrl_readl(control_pbias_offset); | 151 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
151 | reg |= OMAP4_MMC1_PBIASLITE_PWRDNZ; | 152 | reg |= OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK; |
152 | if ((1 << vdd) <= MMC_VDD_165_195) | 153 | if ((1 << vdd) <= MMC_VDD_165_195) |
153 | reg &= ~OMAP4_MMC1_PBIASLITE_VMODE; | 154 | reg &= ~OMAP4_MMC1_PBIASLITE_VMODE_MASK; |
154 | else | 155 | else |
155 | reg |= OMAP4_MMC1_PBIASLITE_VMODE; | 156 | reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK; |
156 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ | OMAP4_MMC1_PWRDNZ | | 157 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
157 | OMAP4_USBC1_ICUSB_PWRDNZ); | 158 | OMAP4_MMC1_PWRDNZ_MASK | |
158 | omap_ctrl_writel(reg, control_pbias_offset); | 159 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); |
160 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | ||
159 | /* 4 microsec delay for comparator to generate an error*/ | 161 | /* 4 microsec delay for comparator to generate an error*/ |
160 | udelay(4); | 162 | udelay(4); |
161 | reg = omap_ctrl_readl(control_pbias_offset); | 163 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
162 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR) { | 164 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { |
163 | pr_err("Pbias Voltage is not same as LDO\n"); | 165 | pr_err("Pbias Voltage is not same as LDO\n"); |
164 | /* Caution : On VMODE_ERROR Power Down MMC IO */ | 166 | /* Caution : On VMODE_ERROR Power Down MMC IO */ |
165 | reg &= ~(OMAP4_MMC1_PWRDNZ | OMAP4_USBC1_ICUSB_PWRDNZ); | 167 | reg &= ~(OMAP4_MMC1_PWRDNZ_MASK | |
166 | omap_ctrl_writel(reg, control_pbias_offset); | 168 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); |
169 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | ||
167 | } | 170 | } |
168 | } else { | 171 | } else { |
169 | reg = omap_ctrl_readl(control_pbias_offset); | 172 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
170 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ | | 173 | reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK | |
171 | OMAP4_MMC1_PBIASLITE_VMODE | OMAP4_MMC1_PWRDNZ | | 174 | OMAP4_MMC1_PWRDNZ_MASK | |
172 | OMAP4_USBC1_ICUSB_PWRDNZ); | 175 | OMAP4_MMC1_PBIASLITE_VMODE_MASK | |
173 | omap_ctrl_writel(reg, control_pbias_offset); | 176 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); |
177 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | ||
174 | } | 178 | } |
175 | } | 179 | } |
176 | 180 | ||
@@ -218,17 +222,18 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
218 | control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1; | 222 | control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1; |
219 | } | 223 | } |
220 | } else { | 224 | } else { |
221 | control_pbias_offset = OMAP44XX_CONTROL_PBIAS_LITE; | 225 | control_pbias_offset = |
222 | control_mmc1 = OMAP44XX_CONTROL_MMC1; | 226 | OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_PBIASLITE; |
223 | reg = omap_ctrl_readl(control_mmc1); | 227 | control_mmc1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MMC1; |
224 | reg |= (OMAP4_CONTROL_SDMMC1_PUSTRENGTHGRP0 | | 228 | reg = omap4_ctrl_pad_readl(control_mmc1); |
225 | OMAP4_CONTROL_SDMMC1_PUSTRENGTHGRP1); | 229 | reg |= (OMAP4_SDMMC1_PUSTRENGTH_GRP0_MASK | |
226 | reg &= ~(OMAP4_CONTROL_SDMMC1_PUSTRENGTHGRP2 | | 230 | OMAP4_SDMMC1_PUSTRENGTH_GRP1_MASK); |
227 | OMAP4_CONTROL_SDMMC1_PUSTRENGTHGRP3); | 231 | reg &= ~(OMAP4_SDMMC1_PUSTRENGTH_GRP2_MASK | |
228 | reg |= (OMAP4_CONTROL_SDMMC1_DR0_SPEEDCTRL | | 232 | OMAP4_SDMMC1_PUSTRENGTH_GRP3_MASK); |
229 | OMAP4_CONTROL_SDMMC1_DR1_SPEEDCTRL | | 233 | reg |= (OMAP4_USBC1_DR0_SPEEDCTRL_MASK| |
230 | OMAP4_CONTROL_SDMMC1_DR2_SPEEDCTRL); | 234 | OMAP4_SDMMC1_DR1_SPEEDCTRL_MASK | |
231 | omap_ctrl_writel(reg, control_mmc1); | 235 | OMAP4_SDMMC1_DR2_SPEEDCTRL_MASK); |
236 | omap4_ctrl_pad_writel(reg, control_mmc1); | ||
232 | } | 237 | } |
233 | 238 | ||
234 | for (c = controllers; c->mmc; c++) { | 239 | for (c = controllers; c->mmc; c++) { |
@@ -258,9 +263,13 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
258 | "mmc%islot%i", c->mmc, 1); | 263 | "mmc%islot%i", c->mmc, 1); |
259 | mmc->slots[0].name = hc->name; | 264 | mmc->slots[0].name = hc->name; |
260 | mmc->nr_slots = 1; | 265 | mmc->nr_slots = 1; |
261 | mmc->slots[0].wires = c->wires; | 266 | mmc->slots[0].caps = c->caps; |
262 | mmc->slots[0].internal_clock = !c->ext_clock; | 267 | mmc->slots[0].internal_clock = !c->ext_clock; |
263 | mmc->dma_mask = 0xffffffff; | 268 | mmc->dma_mask = 0xffffffff; |
269 | if (cpu_is_omap44xx()) | ||
270 | mmc->reg_offset = OMAP4_MMC_REG_OFFSET; | ||
271 | else | ||
272 | mmc->reg_offset = 0; | ||
264 | 273 | ||
265 | mmc->get_context_loss_count = hsmmc_get_context_loss; | 274 | mmc->get_context_loss_count = hsmmc_get_context_loss; |
266 | 275 | ||
@@ -298,6 +307,9 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
298 | else | 307 | else |
299 | mmc->slots[0].features |= HSMMC_HAS_PBIAS; | 308 | mmc->slots[0].features |= HSMMC_HAS_PBIAS; |
300 | 309 | ||
310 | if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) | ||
311 | mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET; | ||
312 | |||
301 | switch (c->mmc) { | 313 | switch (c->mmc) { |
302 | case 1: | 314 | case 1: |
303 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { | 315 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { |
@@ -316,16 +328,20 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
316 | } | 328 | } |
317 | 329 | ||
318 | /* Omap3630 HSMMC1 supports only 4-bit */ | 330 | /* Omap3630 HSMMC1 supports only 4-bit */ |
319 | if (cpu_is_omap3630() && c->wires > 4) { | 331 | if (cpu_is_omap3630() && |
320 | c->wires = 4; | 332 | (c->caps & MMC_CAP_8_BIT_DATA)) { |
321 | mmc->slots[0].wires = c->wires; | 333 | c->caps &= ~MMC_CAP_8_BIT_DATA; |
334 | c->caps |= MMC_CAP_4_BIT_DATA; | ||
335 | mmc->slots[0].caps = c->caps; | ||
322 | } | 336 | } |
323 | break; | 337 | break; |
324 | case 2: | 338 | case 2: |
325 | if (c->ext_clock) | 339 | if (c->ext_clock) |
326 | c->transceiver = 1; | 340 | c->transceiver = 1; |
327 | if (c->transceiver && c->wires > 4) | 341 | if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) { |
328 | c->wires = 4; | 342 | c->caps &= ~MMC_CAP_8_BIT_DATA; |
343 | c->caps |= MMC_CAP_4_BIT_DATA; | ||
344 | } | ||
329 | /* FALLTHROUGH */ | 345 | /* FALLTHROUGH */ |
330 | case 3: | 346 | case 3: |
331 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { | 347 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { |
diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h index 0f8a2e6ee284..f119348827d4 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h | |||
@@ -10,7 +10,8 @@ struct mmc_card; | |||
10 | 10 | ||
11 | struct omap2_hsmmc_info { | 11 | struct omap2_hsmmc_info { |
12 | u8 mmc; /* controller 1/2/3 */ | 12 | u8 mmc; /* controller 1/2/3 */ |
13 | u8 wires; /* 1/4/8 wires */ | 13 | u32 caps; /* 4/8 wires and any additional host |
14 | * capabilities OR'd (ref. linux/mmc/host.h) */ | ||
14 | bool transceiver; /* MMC-2 option */ | 15 | bool transceiver; /* MMC-2 option */ |
15 | bool ext_clock; /* use external pin for input clock */ | 16 | bool ext_clock; /* use external pin for input clock */ |
16 | bool cover_only; /* No card detect - just cover switch */ | 17 | bool cover_only; /* No card detect - just cover switch */ |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 9a879f959509..5f9086c65e48 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -22,11 +22,12 @@ | |||
22 | #include <asm/cputype.h> | 22 | #include <asm/cputype.h> |
23 | 23 | ||
24 | #include <plat/common.h> | 24 | #include <plat/common.h> |
25 | #include <plat/control.h> | ||
26 | #include <plat/cpu.h> | 25 | #include <plat/cpu.h> |
27 | 26 | ||
28 | #include <mach/id.h> | 27 | #include <mach/id.h> |
29 | 28 | ||
29 | #include "control.h" | ||
30 | |||
30 | static struct omap_chip_id omap_chip; | 31 | static struct omap_chip_id omap_chip; |
31 | static unsigned int omap_revision; | 32 | static unsigned int omap_revision; |
32 | 33 | ||
@@ -60,7 +61,7 @@ int omap_type(void) | |||
60 | } else if (cpu_is_omap34xx()) { | 61 | } else if (cpu_is_omap34xx()) { |
61 | val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS); | 62 | val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS); |
62 | } else if (cpu_is_omap44xx()) { | 63 | } else if (cpu_is_omap44xx()) { |
63 | val = omap_ctrl_readl(OMAP44XX_CONTROL_STATUS); | 64 | val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS); |
64 | } else { | 65 | } else { |
65 | pr_err("Cannot detect omap type!\n"); | 66 | pr_err("Cannot detect omap type!\n"); |
66 | goto out; | 67 | goto out; |
@@ -298,7 +299,6 @@ static void __init omap4_check_revision(void) | |||
298 | u32 idcode; | 299 | u32 idcode; |
299 | u16 hawkeye; | 300 | u16 hawkeye; |
300 | u8 rev; | 301 | u8 rev; |
301 | char *rev_name = "ES1.0"; | ||
302 | 302 | ||
303 | /* | 303 | /* |
304 | * The IC rev detection is done with hawkeye and rev. | 304 | * The IC rev detection is done with hawkeye and rev. |
@@ -309,14 +309,39 @@ static void __init omap4_check_revision(void) | |||
309 | hawkeye = (idcode >> 12) & 0xffff; | 309 | hawkeye = (idcode >> 12) & 0xffff; |
310 | rev = (idcode >> 28) & 0xff; | 310 | rev = (idcode >> 28) & 0xff; |
311 | 311 | ||
312 | if ((hawkeye == 0xb852) && (rev == 0x0)) { | 312 | /* |
313 | omap_revision = OMAP4430_REV_ES1_0; | 313 | * Few initial ES2.0 samples IDCODE is same as ES1.0 |
314 | omap_chip.oc |= CHIP_IS_OMAP4430ES1; | 314 | * Use ARM register to detect the correct ES version |
315 | pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name); | 315 | */ |
316 | return; | 316 | if (!rev) { |
317 | idcode = read_cpuid(CPUID_ID); | ||
318 | rev = (idcode & 0xf) - 1; | ||
319 | } | ||
320 | |||
321 | switch (hawkeye) { | ||
322 | case 0xb852: | ||
323 | switch (rev) { | ||
324 | case 0: | ||
325 | omap_revision = OMAP4430_REV_ES1_0; | ||
326 | omap_chip.oc |= CHIP_IS_OMAP4430ES1; | ||
327 | break; | ||
328 | case 1: | ||
329 | omap_revision = OMAP4430_REV_ES2_0; | ||
330 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; | ||
331 | break; | ||
332 | default: | ||
333 | omap_revision = OMAP4430_REV_ES2_0; | ||
334 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; | ||
335 | } | ||
336 | break; | ||
337 | default: | ||
338 | /* Unknown default to latest silicon rev as default*/ | ||
339 | omap_revision = OMAP4430_REV_ES2_0; | ||
340 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; | ||
317 | } | 341 | } |
318 | 342 | ||
319 | pr_err("Unknown OMAP4 CPU id\n"); | 343 | pr_info("OMAP%04x ES%d.0\n", |
344 | omap_rev() >> 16, ((omap_rev() >> 12) & 0xf) + 1); | ||
320 | } | 345 | } |
321 | 346 | ||
322 | #define OMAP3_SHOW_FEATURE(feat) \ | 347 | #define OMAP3_SHOW_FEATURE(feat) \ |
@@ -361,30 +386,54 @@ static void __init omap3_cpuinfo(void) | |||
361 | strcpy(cpu_name, "OMAP3503"); | 386 | strcpy(cpu_name, "OMAP3503"); |
362 | } | 387 | } |
363 | 388 | ||
364 | switch (rev) { | 389 | if (cpu_is_omap3630()) { |
365 | case OMAP_REVBITS_00: | 390 | switch (rev) { |
366 | strcpy(cpu_rev, "1.0"); | 391 | case OMAP_REVBITS_00: |
367 | break; | 392 | strcpy(cpu_rev, "1.0"); |
368 | case OMAP_REVBITS_01: | 393 | break; |
369 | strcpy(cpu_rev, "1.1"); | 394 | case OMAP_REVBITS_01: |
370 | break; | 395 | strcpy(cpu_rev, "1.1"); |
371 | case OMAP_REVBITS_02: | 396 | break; |
372 | strcpy(cpu_rev, "1.2"); | 397 | case OMAP_REVBITS_02: |
373 | break; | 398 | /* FALLTHROUGH */ |
374 | case OMAP_REVBITS_10: | 399 | default: |
375 | strcpy(cpu_rev, "2.0"); | 400 | /* Use the latest known revision as default */ |
376 | break; | 401 | strcpy(cpu_rev, "1.2"); |
377 | case OMAP_REVBITS_20: | 402 | } |
378 | strcpy(cpu_rev, "2.1"); | 403 | } else if (cpu_is_omap3505() || cpu_is_omap3517()) { |
379 | break; | 404 | switch (rev) { |
380 | case OMAP_REVBITS_30: | 405 | case OMAP_REVBITS_00: |
381 | strcpy(cpu_rev, "3.0"); | 406 | strcpy(cpu_rev, "1.0"); |
382 | break; | 407 | break; |
383 | case OMAP_REVBITS_40: | 408 | case OMAP_REVBITS_01: |
384 | /* FALLTHROUGH */ | 409 | /* FALLTHROUGH */ |
385 | default: | 410 | default: |
386 | /* Use the latest known revision as default */ | 411 | /* Use the latest known revision as default */ |
387 | strcpy(cpu_rev, "3.1"); | 412 | strcpy(cpu_rev, "1.1"); |
413 | } | ||
414 | } else { | ||
415 | switch (rev) { | ||
416 | case OMAP_REVBITS_00: | ||
417 | strcpy(cpu_rev, "1.0"); | ||
418 | break; | ||
419 | case OMAP_REVBITS_01: | ||
420 | strcpy(cpu_rev, "2.0"); | ||
421 | break; | ||
422 | case OMAP_REVBITS_02: | ||
423 | strcpy(cpu_rev, "2.1"); | ||
424 | break; | ||
425 | case OMAP_REVBITS_03: | ||
426 | strcpy(cpu_rev, "3.0"); | ||
427 | break; | ||
428 | case OMAP_REVBITS_04: | ||
429 | strcpy(cpu_rev, "3.1"); | ||
430 | break; | ||
431 | case OMAP_REVBITS_05: | ||
432 | /* FALLTHROUGH */ | ||
433 | default: | ||
434 | /* Use the latest known revision as default */ | ||
435 | strcpy(cpu_rev, "3.1.2"); | ||
436 | } | ||
388 | } | 437 | } |
389 | 438 | ||
390 | /* Print verbose information */ | 439 | /* Print verbose information */ |
diff --git a/arch/arm/mach-omap2/include/mach/board-rx51.h b/arch/arm/mach-omap2/include/mach/board-rx51.h new file mode 100644 index 000000000000..b76f49e7eed5 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/board-rx51.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * Defines for rx51 boards | ||
3 | */ | ||
4 | |||
5 | #ifndef _OMAP_BOARD_RX51_H | ||
6 | #define _OMAP_BOARD_RX51_H | ||
7 | |||
8 | extern void __init rx51_peripherals_init(void); | ||
9 | extern void __init rx51_video_mem_init(void); | ||
10 | |||
11 | #endif | ||
diff --git a/arch/arm/mach-omap2/include/mach/board-zoom.h b/arch/arm/mach-omap2/include/mach/board-zoom.h index 80591fda8f8f..f93ca3928c3b 100644 --- a/arch/arm/mach-omap2/include/mach/board-zoom.h +++ b/arch/arm/mach-omap2/include/mach/board-zoom.h | |||
@@ -1,12 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Defines for zoom boards | 2 | * Defines for zoom boards |
3 | */ | 3 | */ |
4 | #include <linux/mtd/mtd.h> | ||
5 | #include <linux/mtd/partitions.h> | ||
6 | |||
7 | #define ZOOM_NAND_CS 0 | 4 | #define ZOOM_NAND_CS 0 |
8 | 5 | ||
9 | extern void __init board_nand_init(struct mtd_partition *, u8 nr_parts, u8 cs); | ||
10 | extern int __init zoom_debugboard_init(void); | 6 | extern int __init zoom_debugboard_init(void); |
11 | extern void __init zoom_peripherals_init(void); | 7 | extern void __init zoom_peripherals_init(void); |
12 | 8 | ||
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_core_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_core_44xx.h new file mode 100644 index 000000000000..2f7ac70a20d8 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/ctrl_module_core_44xx.h | |||
@@ -0,0 +1,391 @@ | |||
1 | /* | ||
2 | * OMAP44xx CTRL_MODULE_CORE registers and bitfields | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | ||
5 | * | ||
6 | * Benoit Cousson (b-cousson@ti.com) | ||
7 | * Santosh Shilimkar (santosh.shilimkar@ti.com) | ||
8 | * | ||
9 | * This file is automatically generated from the OMAP hardware databases. | ||
10 | * We respectfully ask that any modifications to this file be coordinated | ||
11 | * with the public linux-omap@vger.kernel.org mailing list and the | ||
12 | * authors above to ensure that the autogeneration scripts are kept | ||
13 | * up-to-date with the file contents. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_CORE_44XX_H | ||
21 | #define __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_CORE_44XX_H | ||
22 | |||
23 | |||
24 | /* Base address */ | ||
25 | #define OMAP4_CTRL_MODULE_CORE 0x4a002000 | ||
26 | |||
27 | /* Registers offset */ | ||
28 | #define OMAP4_CTRL_MODULE_CORE_IP_REVISION 0x0000 | ||
29 | #define OMAP4_CTRL_MODULE_CORE_IP_HWINFO 0x0004 | ||
30 | #define OMAP4_CTRL_MODULE_CORE_IP_SYSCONFIG 0x0010 | ||
31 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_DIE_ID_0 0x0200 | ||
32 | #define OMAP4_CTRL_MODULE_CORE_ID_CODE 0x0204 | ||
33 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_DIE_ID_1 0x0208 | ||
34 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_DIE_ID_2 0x020c | ||
35 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_DIE_ID_3 0x0210 | ||
36 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_0 0x0214 | ||
37 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_1 0x0218 | ||
38 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_USB_CONF 0x021c | ||
39 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_OPP_VDD_WKUP 0x0228 | ||
40 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_OPP_BGAP 0x0260 | ||
41 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_OPP_DPLL_0 0x0264 | ||
42 | #define OMAP4_CTRL_MODULE_CORE_STD_FUSE_OPP_DPLL_1 0x0268 | ||
43 | #define OMAP4_CTRL_MODULE_CORE_STATUS 0x02c4 | ||
44 | #define OMAP4_CTRL_MODULE_CORE_DEV_CONF 0x0300 | ||
45 | #define OMAP4_CTRL_MODULE_CORE_LDOVBB_IVA_VOLTAGE_CTRL 0x0314 | ||
46 | #define OMAP4_CTRL_MODULE_CORE_LDOVBB_MPU_VOLTAGE_CTRL 0x0318 | ||
47 | #define OMAP4_CTRL_MODULE_CORE_LDOSRAM_IVA_VOLTAGE_CTRL 0x0320 | ||
48 | #define OMAP4_CTRL_MODULE_CORE_LDOSRAM_MPU_VOLTAGE_CTRL 0x0324 | ||
49 | #define OMAP4_CTRL_MODULE_CORE_LDOSRAM_CORE_VOLTAGE_CTRL 0x0328 | ||
50 | #define OMAP4_CTRL_MODULE_CORE_TEMP_SENSOR 0x032c | ||
51 | #define OMAP4_CTRL_MODULE_CORE_DPLL_NWELL_TRIM_0 0x0330 | ||
52 | #define OMAP4_CTRL_MODULE_CORE_DPLL_NWELL_TRIM_1 0x0334 | ||
53 | #define OMAP4_CTRL_MODULE_CORE_USBOTGHS_CONTROL 0x033c | ||
54 | #define OMAP4_CTRL_MODULE_CORE_DSS_CONTROL 0x0340 | ||
55 | #define OMAP4_CTRL_MODULE_CORE_HWOBS_CONTROL 0x0350 | ||
56 | #define OMAP4_CTRL_MODULE_CORE_DEBOBS_FINAL_MUX_SEL 0x0400 | ||
57 | #define OMAP4_CTRL_MODULE_CORE_DEBOBS_MMR_MPU 0x0408 | ||
58 | #define OMAP4_CTRL_MODULE_CORE_CONF_SDMA_REQ_SEL0 0x042c | ||
59 | #define OMAP4_CTRL_MODULE_CORE_CONF_SDMA_REQ_SEL1 0x0430 | ||
60 | #define OMAP4_CTRL_MODULE_CORE_CONF_SDMA_REQ_SEL2 0x0434 | ||
61 | #define OMAP4_CTRL_MODULE_CORE_CONF_SDMA_REQ_SEL3 0x0438 | ||
62 | #define OMAP4_CTRL_MODULE_CORE_CONF_CLK_SEL0 0x0440 | ||
63 | #define OMAP4_CTRL_MODULE_CORE_CONF_CLK_SEL1 0x0444 | ||
64 | #define OMAP4_CTRL_MODULE_CORE_CONF_CLK_SEL2 0x0448 | ||
65 | #define OMAP4_CTRL_MODULE_CORE_CONF_DPLL_FREQLOCK_SEL 0x044c | ||
66 | #define OMAP4_CTRL_MODULE_CORE_CONF_DPLL_TINITZ_SEL 0x0450 | ||
67 | #define OMAP4_CTRL_MODULE_CORE_CONF_DPLL_PHASELOCK_SEL 0x0454 | ||
68 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_0 0x0480 | ||
69 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_1 0x0484 | ||
70 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_2 0x0488 | ||
71 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_3 0x048c | ||
72 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_4 0x0490 | ||
73 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_5 0x0494 | ||
74 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_6 0x0498 | ||
75 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_7 0x049c | ||
76 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_8 0x04a0 | ||
77 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_9 0x04a4 | ||
78 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_10 0x04a8 | ||
79 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_11 0x04ac | ||
80 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_12 0x04b0 | ||
81 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_13 0x04b4 | ||
82 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_14 0x04b8 | ||
83 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_15 0x04bc | ||
84 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_16 0x04c0 | ||
85 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_17 0x04c4 | ||
86 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_18 0x04c8 | ||
87 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_19 0x04cc | ||
88 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_20 0x04d0 | ||
89 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_21 0x04d4 | ||
90 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_22 0x04d8 | ||
91 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_23 0x04dc | ||
92 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_24 0x04e0 | ||
93 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_25 0x04e4 | ||
94 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_26 0x04e8 | ||
95 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_27 0x04ec | ||
96 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_28 0x04f0 | ||
97 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_29 0x04f4 | ||
98 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_30 0x04f8 | ||
99 | #define OMAP4_CTRL_MODULE_CORE_CONF_DEBUG_SEL_TST_31 0x04fc | ||
100 | |||
101 | /* Registers shifts and masks */ | ||
102 | |||
103 | /* IP_REVISION */ | ||
104 | #define OMAP4_IP_REV_SCHEME_SHIFT 30 | ||
105 | #define OMAP4_IP_REV_SCHEME_MASK (0x3 << 30) | ||
106 | #define OMAP4_IP_REV_FUNC_SHIFT 16 | ||
107 | #define OMAP4_IP_REV_FUNC_MASK (0xfff << 16) | ||
108 | #define OMAP4_IP_REV_RTL_SHIFT 11 | ||
109 | #define OMAP4_IP_REV_RTL_MASK (0x1f << 11) | ||
110 | #define OMAP4_IP_REV_MAJOR_SHIFT 8 | ||
111 | #define OMAP4_IP_REV_MAJOR_MASK (0x7 << 8) | ||
112 | #define OMAP4_IP_REV_CUSTOM_SHIFT 6 | ||
113 | #define OMAP4_IP_REV_CUSTOM_MASK (0x3 << 6) | ||
114 | #define OMAP4_IP_REV_MINOR_SHIFT 0 | ||
115 | #define OMAP4_IP_REV_MINOR_MASK (0x3f << 0) | ||
116 | |||
117 | /* IP_HWINFO */ | ||
118 | #define OMAP4_IP_HWINFO_SHIFT 0 | ||
119 | #define OMAP4_IP_HWINFO_MASK (0xffffffff << 0) | ||
120 | |||
121 | /* IP_SYSCONFIG */ | ||
122 | #define OMAP4_IP_SYSCONFIG_IDLEMODE_SHIFT 2 | ||
123 | #define OMAP4_IP_SYSCONFIG_IDLEMODE_MASK (0x3 << 2) | ||
124 | |||
125 | /* STD_FUSE_DIE_ID_0 */ | ||
126 | #define OMAP4_STD_FUSE_DIE_ID_0_SHIFT 0 | ||
127 | #define OMAP4_STD_FUSE_DIE_ID_0_MASK (0xffffffff << 0) | ||
128 | |||
129 | /* ID_CODE */ | ||
130 | #define OMAP4_STD_FUSE_IDCODE_SHIFT 0 | ||
131 | #define OMAP4_STD_FUSE_IDCODE_MASK (0xffffffff << 0) | ||
132 | |||
133 | /* STD_FUSE_DIE_ID_1 */ | ||
134 | #define OMAP4_STD_FUSE_DIE_ID_1_SHIFT 0 | ||
135 | #define OMAP4_STD_FUSE_DIE_ID_1_MASK (0xffffffff << 0) | ||
136 | |||
137 | /* STD_FUSE_DIE_ID_2 */ | ||
138 | #define OMAP4_STD_FUSE_DIE_ID_2_SHIFT 0 | ||
139 | #define OMAP4_STD_FUSE_DIE_ID_2_MASK (0xffffffff << 0) | ||
140 | |||
141 | /* STD_FUSE_DIE_ID_3 */ | ||
142 | #define OMAP4_STD_FUSE_DIE_ID_3_SHIFT 0 | ||
143 | #define OMAP4_STD_FUSE_DIE_ID_3_MASK (0xffffffff << 0) | ||
144 | |||
145 | /* STD_FUSE_PROD_ID_0 */ | ||
146 | #define OMAP4_STD_FUSE_PROD_ID_0_SHIFT 0 | ||
147 | #define OMAP4_STD_FUSE_PROD_ID_0_MASK (0xffffffff << 0) | ||
148 | |||
149 | /* STD_FUSE_PROD_ID_1 */ | ||
150 | #define OMAP4_STD_FUSE_PROD_ID_1_SHIFT 0 | ||
151 | #define OMAP4_STD_FUSE_PROD_ID_1_MASK (0xffffffff << 0) | ||
152 | |||
153 | /* STD_FUSE_USB_CONF */ | ||
154 | #define OMAP4_USB_PROD_ID_SHIFT 16 | ||
155 | #define OMAP4_USB_PROD_ID_MASK (0xffff << 16) | ||
156 | #define OMAP4_USB_VENDOR_ID_SHIFT 0 | ||
157 | #define OMAP4_USB_VENDOR_ID_MASK (0xffff << 0) | ||
158 | |||
159 | /* STD_FUSE_OPP_VDD_WKUP */ | ||
160 | #define OMAP4_STD_FUSE_OPP_VDD_WKUP_SHIFT 0 | ||
161 | #define OMAP4_STD_FUSE_OPP_VDD_WKUP_MASK (0xffffffff << 0) | ||
162 | |||
163 | /* STD_FUSE_OPP_BGAP */ | ||
164 | #define OMAP4_STD_FUSE_OPP_BGAP_SHIFT 0 | ||
165 | #define OMAP4_STD_FUSE_OPP_BGAP_MASK (0xffffffff << 0) | ||
166 | |||
167 | /* STD_FUSE_OPP_DPLL_0 */ | ||
168 | #define OMAP4_STD_FUSE_OPP_DPLL_0_SHIFT 0 | ||
169 | #define OMAP4_STD_FUSE_OPP_DPLL_0_MASK (0xffffffff << 0) | ||
170 | |||
171 | /* STD_FUSE_OPP_DPLL_1 */ | ||
172 | #define OMAP4_STD_FUSE_OPP_DPLL_1_SHIFT 0 | ||
173 | #define OMAP4_STD_FUSE_OPP_DPLL_1_MASK (0xffffffff << 0) | ||
174 | |||
175 | /* STATUS */ | ||
176 | #define OMAP4_ATTILA_CONF_SHIFT 11 | ||
177 | #define OMAP4_ATTILA_CONF_MASK (0x3 << 11) | ||
178 | #define OMAP4_DEVICE_TYPE_SHIFT 8 | ||
179 | #define OMAP4_DEVICE_TYPE_MASK (0x7 << 8) | ||
180 | #define OMAP4_SYS_BOOT_SHIFT 0 | ||
181 | #define OMAP4_SYS_BOOT_MASK (0xff << 0) | ||
182 | |||
183 | /* DEV_CONF */ | ||
184 | #define OMAP4_DEV_CONF_SHIFT 1 | ||
185 | #define OMAP4_DEV_CONF_MASK (0x7fffffff << 1) | ||
186 | #define OMAP4_USBPHY_PD_SHIFT 0 | ||
187 | #define OMAP4_USBPHY_PD_MASK (1 << 0) | ||
188 | |||
189 | /* LDOVBB_IVA_VOLTAGE_CTRL */ | ||
190 | #define OMAP4_LDOVBBIVA_RBB_MUX_CTRL_SHIFT 26 | ||
191 | #define OMAP4_LDOVBBIVA_RBB_MUX_CTRL_MASK (1 << 26) | ||
192 | #define OMAP4_LDOVBBIVA_RBB_VSET_IN_SHIFT 21 | ||
193 | #define OMAP4_LDOVBBIVA_RBB_VSET_IN_MASK (0x1f << 21) | ||
194 | #define OMAP4_LDOVBBIVA_RBB_VSET_OUT_SHIFT 16 | ||
195 | #define OMAP4_LDOVBBIVA_RBB_VSET_OUT_MASK (0x1f << 16) | ||
196 | #define OMAP4_LDOVBBIVA_FBB_MUX_CTRL_SHIFT 10 | ||
197 | #define OMAP4_LDOVBBIVA_FBB_MUX_CTRL_MASK (1 << 10) | ||
198 | #define OMAP4_LDOVBBIVA_FBB_VSET_IN_SHIFT 5 | ||
199 | #define OMAP4_LDOVBBIVA_FBB_VSET_IN_MASK (0x1f << 5) | ||
200 | #define OMAP4_LDOVBBIVA_FBB_VSET_OUT_SHIFT 0 | ||
201 | #define OMAP4_LDOVBBIVA_FBB_VSET_OUT_MASK (0x1f << 0) | ||
202 | |||
203 | /* LDOVBB_MPU_VOLTAGE_CTRL */ | ||
204 | #define OMAP4_LDOVBBMPU_RBB_MUX_CTRL_SHIFT 26 | ||
205 | #define OMAP4_LDOVBBMPU_RBB_MUX_CTRL_MASK (1 << 26) | ||
206 | #define OMAP4_LDOVBBMPU_RBB_VSET_IN_SHIFT 21 | ||
207 | #define OMAP4_LDOVBBMPU_RBB_VSET_IN_MASK (0x1f << 21) | ||
208 | #define OMAP4_LDOVBBMPU_RBB_VSET_OUT_SHIFT 16 | ||
209 | #define OMAP4_LDOVBBMPU_RBB_VSET_OUT_MASK (0x1f << 16) | ||
210 | #define OMAP4_LDOVBBMPU_FBB_MUX_CTRL_SHIFT 10 | ||
211 | #define OMAP4_LDOVBBMPU_FBB_MUX_CTRL_MASK (1 << 10) | ||
212 | #define OMAP4_LDOVBBMPU_FBB_VSET_IN_SHIFT 5 | ||
213 | #define OMAP4_LDOVBBMPU_FBB_VSET_IN_MASK (0x1f << 5) | ||
214 | #define OMAP4_LDOVBBMPU_FBB_VSET_OUT_SHIFT 0 | ||
215 | #define OMAP4_LDOVBBMPU_FBB_VSET_OUT_MASK (0x1f << 0) | ||
216 | |||
217 | /* LDOSRAM_IVA_VOLTAGE_CTRL */ | ||
218 | #define OMAP4_LDOSRAMIVA_RETMODE_MUX_CTRL_SHIFT 26 | ||
219 | #define OMAP4_LDOSRAMIVA_RETMODE_MUX_CTRL_MASK (1 << 26) | ||
220 | #define OMAP4_LDOSRAMIVA_RETMODE_VSET_IN_SHIFT 21 | ||
221 | #define OMAP4_LDOSRAMIVA_RETMODE_VSET_IN_MASK (0x1f << 21) | ||
222 | #define OMAP4_LDOSRAMIVA_RETMODE_VSET_OUT_SHIFT 16 | ||
223 | #define OMAP4_LDOSRAMIVA_RETMODE_VSET_OUT_MASK (0x1f << 16) | ||
224 | #define OMAP4_LDOSRAMIVA_ACTMODE_MUX_CTRL_SHIFT 10 | ||
225 | #define OMAP4_LDOSRAMIVA_ACTMODE_MUX_CTRL_MASK (1 << 10) | ||
226 | #define OMAP4_LDOSRAMIVA_ACTMODE_VSET_IN_SHIFT 5 | ||
227 | #define OMAP4_LDOSRAMIVA_ACTMODE_VSET_IN_MASK (0x1f << 5) | ||
228 | #define OMAP4_LDOSRAMIVA_ACTMODE_VSET_OUT_SHIFT 0 | ||
229 | #define OMAP4_LDOSRAMIVA_ACTMODE_VSET_OUT_MASK (0x1f << 0) | ||
230 | |||
231 | /* LDOSRAM_MPU_VOLTAGE_CTRL */ | ||
232 | #define OMAP4_LDOSRAMMPU_RETMODE_MUX_CTRL_SHIFT 26 | ||
233 | #define OMAP4_LDOSRAMMPU_RETMODE_MUX_CTRL_MASK (1 << 26) | ||
234 | #define OMAP4_LDOSRAMMPU_RETMODE_VSET_IN_SHIFT 21 | ||
235 | #define OMAP4_LDOSRAMMPU_RETMODE_VSET_IN_MASK (0x1f << 21) | ||
236 | #define OMAP4_LDOSRAMMPU_RETMODE_VSET_OUT_SHIFT 16 | ||
237 | #define OMAP4_LDOSRAMMPU_RETMODE_VSET_OUT_MASK (0x1f << 16) | ||
238 | #define OMAP4_LDOSRAMMPU_ACTMODE_MUX_CTRL_SHIFT 10 | ||
239 | #define OMAP4_LDOSRAMMPU_ACTMODE_MUX_CTRL_MASK (1 << 10) | ||
240 | #define OMAP4_LDOSRAMMPU_ACTMODE_VSET_IN_SHIFT 5 | ||
241 | #define OMAP4_LDOSRAMMPU_ACTMODE_VSET_IN_MASK (0x1f << 5) | ||
242 | #define OMAP4_LDOSRAMMPU_ACTMODE_VSET_OUT_SHIFT 0 | ||
243 | #define OMAP4_LDOSRAMMPU_ACTMODE_VSET_OUT_MASK (0x1f << 0) | ||
244 | |||
245 | /* LDOSRAM_CORE_VOLTAGE_CTRL */ | ||
246 | #define OMAP4_LDOSRAMCORE_RETMODE_MUX_CTRL_SHIFT 26 | ||
247 | #define OMAP4_LDOSRAMCORE_RETMODE_MUX_CTRL_MASK (1 << 26) | ||
248 | #define OMAP4_LDOSRAMCORE_RETMODE_VSET_IN_SHIFT 21 | ||
249 | #define OMAP4_LDOSRAMCORE_RETMODE_VSET_IN_MASK (0x1f << 21) | ||
250 | #define OMAP4_LDOSRAMCORE_RETMODE_VSET_OUT_SHIFT 16 | ||
251 | #define OMAP4_LDOSRAMCORE_RETMODE_VSET_OUT_MASK (0x1f << 16) | ||
252 | #define OMAP4_LDOSRAMCORE_ACTMODE_MUX_CTRL_SHIFT 10 | ||
253 | #define OMAP4_LDOSRAMCORE_ACTMODE_MUX_CTRL_MASK (1 << 10) | ||
254 | #define OMAP4_LDOSRAMCORE_ACTMODE_VSET_IN_SHIFT 5 | ||
255 | #define OMAP4_LDOSRAMCORE_ACTMODE_VSET_IN_MASK (0x1f << 5) | ||
256 | #define OMAP4_LDOSRAMCORE_ACTMODE_VSET_OUT_SHIFT 0 | ||
257 | #define OMAP4_LDOSRAMCORE_ACTMODE_VSET_OUT_MASK (0x1f << 0) | ||
258 | |||
259 | /* TEMP_SENSOR */ | ||
260 | #define OMAP4_BGAP_TEMPSOFF_SHIFT 12 | ||
261 | #define OMAP4_BGAP_TEMPSOFF_MASK (1 << 12) | ||
262 | #define OMAP4_BGAP_TSHUT_SHIFT 11 | ||
263 | #define OMAP4_BGAP_TSHUT_MASK (1 << 11) | ||
264 | #define OMAP4_BGAP_TEMP_SENSOR_CONTCONV_SHIFT 10 | ||
265 | #define OMAP4_BGAP_TEMP_SENSOR_CONTCONV_MASK (1 << 10) | ||
266 | #define OMAP4_BGAP_TEMP_SENSOR_SOC_SHIFT 9 | ||
267 | #define OMAP4_BGAP_TEMP_SENSOR_SOC_MASK (1 << 9) | ||
268 | #define OMAP4_BGAP_TEMP_SENSOR_EOCZ_SHIFT 8 | ||
269 | #define OMAP4_BGAP_TEMP_SENSOR_EOCZ_MASK (1 << 8) | ||
270 | #define OMAP4_BGAP_TEMP_SENSOR_DTEMP_SHIFT 0 | ||
271 | #define OMAP4_BGAP_TEMP_SENSOR_DTEMP_MASK (0xff << 0) | ||
272 | |||
273 | /* DPLL_NWELL_TRIM_0 */ | ||
274 | #define OMAP4_DPLL_ABE_NWELL_TRIM_MUX_CTRL_SHIFT 29 | ||
275 | #define OMAP4_DPLL_ABE_NWELL_TRIM_MUX_CTRL_MASK (1 << 29) | ||
276 | #define OMAP4_DPLL_ABE_NWELL_TRIM_SHIFT 24 | ||
277 | #define OMAP4_DPLL_ABE_NWELL_TRIM_MASK (0x1f << 24) | ||
278 | #define OMAP4_DPLL_PER_NWELL_TRIM_MUX_CTRL_SHIFT 23 | ||
279 | #define OMAP4_DPLL_PER_NWELL_TRIM_MUX_CTRL_MASK (1 << 23) | ||
280 | #define OMAP4_DPLL_PER_NWELL_TRIM_SHIFT 18 | ||
281 | #define OMAP4_DPLL_PER_NWELL_TRIM_MASK (0x1f << 18) | ||
282 | #define OMAP4_DPLL_CORE_NWELL_TRIM_MUX_CTRL_SHIFT 17 | ||
283 | #define OMAP4_DPLL_CORE_NWELL_TRIM_MUX_CTRL_MASK (1 << 17) | ||
284 | #define OMAP4_DPLL_CORE_NWELL_TRIM_SHIFT 12 | ||
285 | #define OMAP4_DPLL_CORE_NWELL_TRIM_MASK (0x1f << 12) | ||
286 | #define OMAP4_DPLL_IVA_NWELL_TRIM_MUX_CTRL_SHIFT 11 | ||
287 | #define OMAP4_DPLL_IVA_NWELL_TRIM_MUX_CTRL_MASK (1 << 11) | ||
288 | #define OMAP4_DPLL_IVA_NWELL_TRIM_SHIFT 6 | ||
289 | #define OMAP4_DPLL_IVA_NWELL_TRIM_MASK (0x1f << 6) | ||
290 | #define OMAP4_DPLL_MPU_NWELL_TRIM_MUX_CTRL_SHIFT 5 | ||
291 | #define OMAP4_DPLL_MPU_NWELL_TRIM_MUX_CTRL_MASK (1 << 5) | ||
292 | #define OMAP4_DPLL_MPU_NWELL_TRIM_SHIFT 0 | ||
293 | #define OMAP4_DPLL_MPU_NWELL_TRIM_MASK (0x1f << 0) | ||
294 | |||
295 | /* DPLL_NWELL_TRIM_1 */ | ||
296 | #define OMAP4_DPLL_UNIPRO_NWELL_TRIM_MUX_CTRL_SHIFT 29 | ||
297 | #define OMAP4_DPLL_UNIPRO_NWELL_TRIM_MUX_CTRL_MASK (1 << 29) | ||
298 | #define OMAP4_DPLL_UNIPRO_NWELL_TRIM_SHIFT 24 | ||
299 | #define OMAP4_DPLL_UNIPRO_NWELL_TRIM_MASK (0x1f << 24) | ||
300 | #define OMAP4_DPLL_USB_NWELL_TRIM_MUX_CTRL_SHIFT 23 | ||
301 | #define OMAP4_DPLL_USB_NWELL_TRIM_MUX_CTRL_MASK (1 << 23) | ||
302 | #define OMAP4_DPLL_USB_NWELL_TRIM_SHIFT 18 | ||
303 | #define OMAP4_DPLL_USB_NWELL_TRIM_MASK (0x1f << 18) | ||
304 | #define OMAP4_DPLL_HDMI_NWELL_TRIM_MUX_CTRL_SHIFT 17 | ||
305 | #define OMAP4_DPLL_HDMI_NWELL_TRIM_MUX_CTRL_MASK (1 << 17) | ||
306 | #define OMAP4_DPLL_HDMI_NWELL_TRIM_SHIFT 12 | ||
307 | #define OMAP4_DPLL_HDMI_NWELL_TRIM_MASK (0x1f << 12) | ||
308 | #define OMAP4_DPLL_DSI2_NWELL_TRIM_MUX_CTRL_SHIFT 11 | ||
309 | #define OMAP4_DPLL_DSI2_NWELL_TRIM_MUX_CTRL_MASK (1 << 11) | ||
310 | #define OMAP4_DPLL_DSI2_NWELL_TRIM_SHIFT 6 | ||
311 | #define OMAP4_DPLL_DSI2_NWELL_TRIM_MASK (0x1f << 6) | ||
312 | #define OMAP4_DPLL_DSI1_NWELL_TRIM_MUX_CTRL_SHIFT 5 | ||
313 | #define OMAP4_DPLL_DSI1_NWELL_TRIM_MUX_CTRL_MASK (1 << 5) | ||
314 | #define OMAP4_DPLL_DSI1_NWELL_TRIM_SHIFT 0 | ||
315 | #define OMAP4_DPLL_DSI1_NWELL_TRIM_MASK (0x1f << 0) | ||
316 | |||
317 | /* USBOTGHS_CONTROL */ | ||
318 | #define OMAP4_DISCHRGVBUS_SHIFT 8 | ||
319 | #define OMAP4_DISCHRGVBUS_MASK (1 << 8) | ||
320 | #define OMAP4_CHRGVBUS_SHIFT 7 | ||
321 | #define OMAP4_CHRGVBUS_MASK (1 << 7) | ||
322 | #define OMAP4_DRVVBUS_SHIFT 6 | ||
323 | #define OMAP4_DRVVBUS_MASK (1 << 6) | ||
324 | #define OMAP4_IDPULLUP_SHIFT 5 | ||
325 | #define OMAP4_IDPULLUP_MASK (1 << 5) | ||
326 | #define OMAP4_IDDIG_SHIFT 4 | ||
327 | #define OMAP4_IDDIG_MASK (1 << 4) | ||
328 | #define OMAP4_SESSEND_SHIFT 3 | ||
329 | #define OMAP4_SESSEND_MASK (1 << 3) | ||
330 | #define OMAP4_VBUSVALID_SHIFT 2 | ||
331 | #define OMAP4_VBUSVALID_MASK (1 << 2) | ||
332 | #define OMAP4_BVALID_SHIFT 1 | ||
333 | #define OMAP4_BVALID_MASK (1 << 1) | ||
334 | #define OMAP4_AVALID_SHIFT 0 | ||
335 | #define OMAP4_AVALID_MASK (1 << 0) | ||
336 | |||
337 | /* DSS_CONTROL */ | ||
338 | #define OMAP4_DSS_MUX6_SELECT_SHIFT 0 | ||
339 | #define OMAP4_DSS_MUX6_SELECT_MASK (1 << 0) | ||
340 | |||
341 | /* HWOBS_CONTROL */ | ||
342 | #define OMAP4_HWOBS_CLKDIV_SEL_SHIFT 3 | ||
343 | #define OMAP4_HWOBS_CLKDIV_SEL_MASK (0x1f << 3) | ||
344 | #define OMAP4_HWOBS_ALL_ZERO_MODE_SHIFT 2 | ||
345 | #define OMAP4_HWOBS_ALL_ZERO_MODE_MASK (1 << 2) | ||
346 | #define OMAP4_HWOBS_ALL_ONE_MODE_SHIFT 1 | ||
347 | #define OMAP4_HWOBS_ALL_ONE_MODE_MASK (1 << 1) | ||
348 | #define OMAP4_HWOBS_MACRO_ENABLE_SHIFT 0 | ||
349 | #define OMAP4_HWOBS_MACRO_ENABLE_MASK (1 << 0) | ||
350 | |||
351 | /* DEBOBS_FINAL_MUX_SEL */ | ||
352 | #define OMAP4_SELECT_SHIFT 0 | ||
353 | #define OMAP4_SELECT_MASK (0xffffffff << 0) | ||
354 | |||
355 | /* DEBOBS_MMR_MPU */ | ||
356 | #define OMAP4_SELECT_DEBOBS_MMR_MPU_SHIFT 0 | ||
357 | #define OMAP4_SELECT_DEBOBS_MMR_MPU_MASK (0xf << 0) | ||
358 | |||
359 | /* CONF_SDMA_REQ_SEL0 */ | ||
360 | #define OMAP4_MULT_SHIFT 0 | ||
361 | #define OMAP4_MULT_MASK (0x7f << 0) | ||
362 | |||
363 | /* CONF_CLK_SEL0 */ | ||
364 | #define OMAP4_MULT_CONF_CLK_SEL0_SHIFT 0 | ||
365 | #define OMAP4_MULT_CONF_CLK_SEL0_MASK (0x7 << 0) | ||
366 | |||
367 | /* CONF_CLK_SEL1 */ | ||
368 | #define OMAP4_MULT_CONF_CLK_SEL1_SHIFT 0 | ||
369 | #define OMAP4_MULT_CONF_CLK_SEL1_MASK (0x7 << 0) | ||
370 | |||
371 | /* CONF_CLK_SEL2 */ | ||
372 | #define OMAP4_MULT_CONF_CLK_SEL2_SHIFT 0 | ||
373 | #define OMAP4_MULT_CONF_CLK_SEL2_MASK (0x7 << 0) | ||
374 | |||
375 | /* CONF_DPLL_FREQLOCK_SEL */ | ||
376 | #define OMAP4_MULT_CONF_DPLL_FREQLOCK_SEL_SHIFT 0 | ||
377 | #define OMAP4_MULT_CONF_DPLL_FREQLOCK_SEL_MASK (0x7 << 0) | ||
378 | |||
379 | /* CONF_DPLL_TINITZ_SEL */ | ||
380 | #define OMAP4_MULT_CONF_DPLL_TINITZ_SEL_SHIFT 0 | ||
381 | #define OMAP4_MULT_CONF_DPLL_TINITZ_SEL_MASK (0x7 << 0) | ||
382 | |||
383 | /* CONF_DPLL_PHASELOCK_SEL */ | ||
384 | #define OMAP4_MULT_CONF_DPLL_PHASELOCK_SEL_SHIFT 0 | ||
385 | #define OMAP4_MULT_CONF_DPLL_PHASELOCK_SEL_MASK (0x7 << 0) | ||
386 | |||
387 | /* CONF_DEBUG_SEL_TST_0 */ | ||
388 | #define OMAP4_MODE_SHIFT 0 | ||
389 | #define OMAP4_MODE_MASK (0xf << 0) | ||
390 | |||
391 | #endif | ||
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h new file mode 100644 index 000000000000..c88420de1151 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h | |||
@@ -0,0 +1,1409 @@ | |||
1 | /* | ||
2 | * OMAP44xx CTRL_MODULE_PAD_CORE registers and bitfields | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | ||
5 | * | ||
6 | * Benoit Cousson (b-cousson@ti.com) | ||
7 | * Santosh Shilimkar (santosh.shilimkar@ti.com) | ||
8 | * | ||
9 | * This file is automatically generated from the OMAP hardware databases. | ||
10 | * We respectfully ask that any modifications to this file be coordinated | ||
11 | * with the public linux-omap@vger.kernel.org mailing list and the | ||
12 | * authors above to ensure that the autogeneration scripts are kept | ||
13 | * up-to-date with the file contents. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_PAD_CORE_44XX_H | ||
21 | #define __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_PAD_CORE_44XX_H | ||
22 | |||
23 | |||
24 | /* Base address */ | ||
25 | #define OMAP4_CTRL_MODULE_PAD_CORE 0x4a100000 | ||
26 | |||
27 | /* Registers offset */ | ||
28 | #define OMAP4_CTRL_MODULE_PAD_CORE_IP_REVISION 0x0000 | ||
29 | #define OMAP4_CTRL_MODULE_PAD_CORE_IP_HWINFO 0x0004 | ||
30 | #define OMAP4_CTRL_MODULE_PAD_CORE_IP_SYSCONFIG 0x0010 | ||
31 | #define OMAP4_CTRL_MODULE_PAD_CORE_PADCONF_WAKEUPEVENT_0 0x01d8 | ||
32 | #define OMAP4_CTRL_MODULE_PAD_CORE_PADCONF_WAKEUPEVENT_1 0x01dc | ||
33 | #define OMAP4_CTRL_MODULE_PAD_CORE_PADCONF_WAKEUPEVENT_2 0x01e0 | ||
34 | #define OMAP4_CTRL_MODULE_PAD_CORE_PADCONF_WAKEUPEVENT_3 0x01e4 | ||
35 | #define OMAP4_CTRL_MODULE_PAD_CORE_PADCONF_WAKEUPEVENT_4 0x01e8 | ||
36 | #define OMAP4_CTRL_MODULE_PAD_CORE_PADCONF_WAKEUPEVENT_5 0x01ec | ||
37 | #define OMAP4_CTRL_MODULE_PAD_CORE_PADCONF_WAKEUPEVENT_6 0x01f0 | ||
38 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_PADCONF_GLOBAL 0x05a0 | ||
39 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_PADCONF_MODE 0x05a4 | ||
40 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART1IO_PADCONF_0 0x05a8 | ||
41 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART1IO_PADCONF_1 0x05ac | ||
42 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART2IO_PADCONF_0 0x05b0 | ||
43 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART2IO_PADCONF_1 0x05b4 | ||
44 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART3IO_PADCONF_0 0x05b8 | ||
45 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART3IO_PADCONF_1 0x05bc | ||
46 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SMART3IO_PADCONF_2 0x05c0 | ||
47 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_USBB_HSIC 0x05c4 | ||
48 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_SLIMBUS 0x05c8 | ||
49 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_PBIASLITE 0x0600 | ||
50 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_I2C_0 0x0604 | ||
51 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_CAMERA_RX 0x0608 | ||
52 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_AVDAC 0x060c | ||
53 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_HDMI_TX_PHY 0x0610 | ||
54 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MMC2 0x0614 | ||
55 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY 0x0618 | ||
56 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MCBSPLP 0x061c | ||
57 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_USB2PHYCORE 0x0620 | ||
58 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_I2C_1 0x0624 | ||
59 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MMC1 0x0628 | ||
60 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_HSI 0x062c | ||
61 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_USB 0x0630 | ||
62 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_HDQ 0x0634 | ||
63 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_LPDDR2IO1_0 0x0638 | ||
64 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_LPDDR2IO1_1 0x063c | ||
65 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_LPDDR2IO1_2 0x0640 | ||
66 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_LPDDR2IO1_3 0x0644 | ||
67 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_LPDDR2IO2_0 0x0648 | ||
68 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_LPDDR2IO2_1 0x064c | ||
69 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_LPDDR2IO2_2 0x0650 | ||
70 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_LPDDR2IO2_3 0x0654 | ||
71 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_BUS_HOLD 0x0658 | ||
72 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_C2C 0x065c | ||
73 | #define OMAP4_CTRL_MODULE_PAD_CORE_CORE_CONTROL_SPARE_RW 0x0660 | ||
74 | #define OMAP4_CTRL_MODULE_PAD_CORE_CORE_CONTROL_SPARE_R 0x0664 | ||
75 | #define OMAP4_CTRL_MODULE_PAD_CORE_CORE_CONTROL_SPARE_R_C0 0x0668 | ||
76 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_EFUSE_1 0x0700 | ||
77 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_EFUSE_2 0x0704 | ||
78 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_EFUSE_3 0x0708 | ||
79 | #define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_EFUSE_4 0x070c | ||
80 | |||
81 | /* Registers shifts and masks */ | ||
82 | |||
83 | /* IP_REVISION */ | ||
84 | #define OMAP4_IP_REV_SCHEME_SHIFT 30 | ||
85 | #define OMAP4_IP_REV_SCHEME_MASK (0x3 << 30) | ||
86 | #define OMAP4_IP_REV_FUNC_SHIFT 16 | ||
87 | #define OMAP4_IP_REV_FUNC_MASK (0xfff << 16) | ||
88 | #define OMAP4_IP_REV_RTL_SHIFT 11 | ||
89 | #define OMAP4_IP_REV_RTL_MASK (0x1f << 11) | ||
90 | #define OMAP4_IP_REV_MAJOR_SHIFT 8 | ||
91 | #define OMAP4_IP_REV_MAJOR_MASK (0x7 << 8) | ||
92 | #define OMAP4_IP_REV_CUSTOM_SHIFT 6 | ||
93 | #define OMAP4_IP_REV_CUSTOM_MASK (0x3 << 6) | ||
94 | #define OMAP4_IP_REV_MINOR_SHIFT 0 | ||
95 | #define OMAP4_IP_REV_MINOR_MASK (0x3f << 0) | ||
96 | |||
97 | /* IP_HWINFO */ | ||
98 | #define OMAP4_IP_HWINFO_SHIFT 0 | ||
99 | #define OMAP4_IP_HWINFO_MASK (0xffffffff << 0) | ||
100 | |||
101 | /* IP_SYSCONFIG */ | ||
102 | #define OMAP4_IP_SYSCONFIG_IDLEMODE_SHIFT 2 | ||
103 | #define OMAP4_IP_SYSCONFIG_IDLEMODE_MASK (0x3 << 2) | ||
104 | |||
105 | /* PADCONF_WAKEUPEVENT_0 */ | ||
106 | #define OMAP4_GPMC_CLK_DUPLICATEWAKEUPEVENT_SHIFT 31 | ||
107 | #define OMAP4_GPMC_CLK_DUPLICATEWAKEUPEVENT_MASK (1 << 31) | ||
108 | #define OMAP4_GPMC_NWP_DUPLICATEWAKEUPEVENT_SHIFT 30 | ||
109 | #define OMAP4_GPMC_NWP_DUPLICATEWAKEUPEVENT_MASK (1 << 30) | ||
110 | #define OMAP4_GPMC_NCS3_DUPLICATEWAKEUPEVENT_SHIFT 29 | ||
111 | #define OMAP4_GPMC_NCS3_DUPLICATEWAKEUPEVENT_MASK (1 << 29) | ||
112 | #define OMAP4_GPMC_NCS2_DUPLICATEWAKEUPEVENT_SHIFT 28 | ||
113 | #define OMAP4_GPMC_NCS2_DUPLICATEWAKEUPEVENT_MASK (1 << 28) | ||
114 | #define OMAP4_GPMC_NCS1_DUPLICATEWAKEUPEVENT_SHIFT 27 | ||
115 | #define OMAP4_GPMC_NCS1_DUPLICATEWAKEUPEVENT_MASK (1 << 27) | ||
116 | #define OMAP4_GPMC_NCS0_DUPLICATEWAKEUPEVENT_SHIFT 26 | ||
117 | #define OMAP4_GPMC_NCS0_DUPLICATEWAKEUPEVENT_MASK (1 << 26) | ||
118 | #define OMAP4_GPMC_A25_DUPLICATEWAKEUPEVENT_SHIFT 25 | ||
119 | #define OMAP4_GPMC_A25_DUPLICATEWAKEUPEVENT_MASK (1 << 25) | ||
120 | #define OMAP4_GPMC_A24_DUPLICATEWAKEUPEVENT_SHIFT 24 | ||
121 | #define OMAP4_GPMC_A24_DUPLICATEWAKEUPEVENT_MASK (1 << 24) | ||
122 | #define OMAP4_GPMC_A23_DUPLICATEWAKEUPEVENT_SHIFT 23 | ||
123 | #define OMAP4_GPMC_A23_DUPLICATEWAKEUPEVENT_MASK (1 << 23) | ||
124 | #define OMAP4_GPMC_A22_DUPLICATEWAKEUPEVENT_SHIFT 22 | ||
125 | #define OMAP4_GPMC_A22_DUPLICATEWAKEUPEVENT_MASK (1 << 22) | ||
126 | #define OMAP4_GPMC_A21_DUPLICATEWAKEUPEVENT_SHIFT 21 | ||
127 | #define OMAP4_GPMC_A21_DUPLICATEWAKEUPEVENT_MASK (1 << 21) | ||
128 | #define OMAP4_GPMC_A20_DUPLICATEWAKEUPEVENT_SHIFT 20 | ||
129 | #define OMAP4_GPMC_A20_DUPLICATEWAKEUPEVENT_MASK (1 << 20) | ||
130 | #define OMAP4_GPMC_A19_DUPLICATEWAKEUPEVENT_SHIFT 19 | ||
131 | #define OMAP4_GPMC_A19_DUPLICATEWAKEUPEVENT_MASK (1 << 19) | ||
132 | #define OMAP4_GPMC_A18_DUPLICATEWAKEUPEVENT_SHIFT 18 | ||
133 | #define OMAP4_GPMC_A18_DUPLICATEWAKEUPEVENT_MASK (1 << 18) | ||
134 | #define OMAP4_GPMC_A17_DUPLICATEWAKEUPEVENT_SHIFT 17 | ||
135 | #define OMAP4_GPMC_A17_DUPLICATEWAKEUPEVENT_MASK (1 << 17) | ||
136 | #define OMAP4_GPMC_A16_DUPLICATEWAKEUPEVENT_SHIFT 16 | ||
137 | #define OMAP4_GPMC_A16_DUPLICATEWAKEUPEVENT_MASK (1 << 16) | ||
138 | #define OMAP4_GPMC_AD15_DUPLICATEWAKEUPEVENT_SHIFT 15 | ||
139 | #define OMAP4_GPMC_AD15_DUPLICATEWAKEUPEVENT_MASK (1 << 15) | ||
140 | #define OMAP4_GPMC_AD14_DUPLICATEWAKEUPEVENT_SHIFT 14 | ||
141 | #define OMAP4_GPMC_AD14_DUPLICATEWAKEUPEVENT_MASK (1 << 14) | ||
142 | #define OMAP4_GPMC_AD13_DUPLICATEWAKEUPEVENT_SHIFT 13 | ||
143 | #define OMAP4_GPMC_AD13_DUPLICATEWAKEUPEVENT_MASK (1 << 13) | ||
144 | #define OMAP4_GPMC_AD12_DUPLICATEWAKEUPEVENT_SHIFT 12 | ||
145 | #define OMAP4_GPMC_AD12_DUPLICATEWAKEUPEVENT_MASK (1 << 12) | ||
146 | #define OMAP4_GPMC_AD11_DUPLICATEWAKEUPEVENT_SHIFT 11 | ||
147 | #define OMAP4_GPMC_AD11_DUPLICATEWAKEUPEVENT_MASK (1 << 11) | ||
148 | #define OMAP4_GPMC_AD10_DUPLICATEWAKEUPEVENT_SHIFT 10 | ||
149 | #define OMAP4_GPMC_AD10_DUPLICATEWAKEUPEVENT_MASK (1 << 10) | ||
150 | #define OMAP4_GPMC_AD9_DUPLICATEWAKEUPEVENT_SHIFT 9 | ||
151 | #define OMAP4_GPMC_AD9_DUPLICATEWAKEUPEVENT_MASK (1 << 9) | ||
152 | #define OMAP4_GPMC_AD8_DUPLICATEWAKEUPEVENT_SHIFT 8 | ||
153 | #define OMAP4_GPMC_AD8_DUPLICATEWAKEUPEVENT_MASK (1 << 8) | ||
154 | #define OMAP4_GPMC_AD7_DUPLICATEWAKEUPEVENT_SHIFT 7 | ||
155 | #define OMAP4_GPMC_AD7_DUPLICATEWAKEUPEVENT_MASK (1 << 7) | ||
156 | #define OMAP4_GPMC_AD6_DUPLICATEWAKEUPEVENT_SHIFT 6 | ||
157 | #define OMAP4_GPMC_AD6_DUPLICATEWAKEUPEVENT_MASK (1 << 6) | ||
158 | #define OMAP4_GPMC_AD5_DUPLICATEWAKEUPEVENT_SHIFT 5 | ||
159 | #define OMAP4_GPMC_AD5_DUPLICATEWAKEUPEVENT_MASK (1 << 5) | ||
160 | #define OMAP4_GPMC_AD4_DUPLICATEWAKEUPEVENT_SHIFT 4 | ||
161 | #define OMAP4_GPMC_AD4_DUPLICATEWAKEUPEVENT_MASK (1 << 4) | ||
162 | #define OMAP4_GPMC_AD3_DUPLICATEWAKEUPEVENT_SHIFT 3 | ||
163 | #define OMAP4_GPMC_AD3_DUPLICATEWAKEUPEVENT_MASK (1 << 3) | ||
164 | #define OMAP4_GPMC_AD2_DUPLICATEWAKEUPEVENT_SHIFT 2 | ||
165 | #define OMAP4_GPMC_AD2_DUPLICATEWAKEUPEVENT_MASK (1 << 2) | ||
166 | #define OMAP4_GPMC_AD1_DUPLICATEWAKEUPEVENT_SHIFT 1 | ||
167 | #define OMAP4_GPMC_AD1_DUPLICATEWAKEUPEVENT_MASK (1 << 1) | ||
168 | #define OMAP4_GPMC_AD0_DUPLICATEWAKEUPEVENT_SHIFT 0 | ||
169 | #define OMAP4_GPMC_AD0_DUPLICATEWAKEUPEVENT_MASK (1 << 0) | ||
170 | |||
171 | /* PADCONF_WAKEUPEVENT_1 */ | ||
172 | #define OMAP4_CAM_STROBE_DUPLICATEWAKEUPEVENT_SHIFT 31 | ||
173 | #define OMAP4_CAM_STROBE_DUPLICATEWAKEUPEVENT_MASK (1 << 31) | ||
174 | #define OMAP4_CAM_SHUTTER_DUPLICATEWAKEUPEVENT_SHIFT 30 | ||
175 | #define OMAP4_CAM_SHUTTER_DUPLICATEWAKEUPEVENT_MASK (1 << 30) | ||
176 | #define OMAP4_CSI22_DY1_DUPLICATEWAKEUPEVENT_SHIFT 29 | ||
177 | #define OMAP4_CSI22_DY1_DUPLICATEWAKEUPEVENT_MASK (1 << 29) | ||
178 | #define OMAP4_CSI22_DX1_DUPLICATEWAKEUPEVENT_SHIFT 28 | ||
179 | #define OMAP4_CSI22_DX1_DUPLICATEWAKEUPEVENT_MASK (1 << 28) | ||
180 | #define OMAP4_CSI22_DY0_DUPLICATEWAKEUPEVENT_SHIFT 27 | ||
181 | #define OMAP4_CSI22_DY0_DUPLICATEWAKEUPEVENT_MASK (1 << 27) | ||
182 | #define OMAP4_CSI22_DX0_DUPLICATEWAKEUPEVENT_SHIFT 26 | ||
183 | #define OMAP4_CSI22_DX0_DUPLICATEWAKEUPEVENT_MASK (1 << 26) | ||
184 | #define OMAP4_CSI21_DY4_DUPLICATEWAKEUPEVENT_SHIFT 25 | ||
185 | #define OMAP4_CSI21_DY4_DUPLICATEWAKEUPEVENT_MASK (1 << 25) | ||
186 | #define OMAP4_CSI21_DX4_DUPLICATEWAKEUPEVENT_SHIFT 24 | ||
187 | #define OMAP4_CSI21_DX4_DUPLICATEWAKEUPEVENT_MASK (1 << 24) | ||
188 | #define OMAP4_CSI21_DY3_DUPLICATEWAKEUPEVENT_SHIFT 23 | ||
189 | #define OMAP4_CSI21_DY3_DUPLICATEWAKEUPEVENT_MASK (1 << 23) | ||
190 | #define OMAP4_CSI21_DX3_DUPLICATEWAKEUPEVENT_SHIFT 22 | ||
191 | #define OMAP4_CSI21_DX3_DUPLICATEWAKEUPEVENT_MASK (1 << 22) | ||
192 | #define OMAP4_CSI21_DY2_DUPLICATEWAKEUPEVENT_SHIFT 21 | ||
193 | #define OMAP4_CSI21_DY2_DUPLICATEWAKEUPEVENT_MASK (1 << 21) | ||
194 | #define OMAP4_CSI21_DX2_DUPLICATEWAKEUPEVENT_SHIFT 20 | ||
195 | #define OMAP4_CSI21_DX2_DUPLICATEWAKEUPEVENT_MASK (1 << 20) | ||
196 | #define OMAP4_CSI21_DY1_DUPLICATEWAKEUPEVENT_SHIFT 19 | ||
197 | #define OMAP4_CSI21_DY1_DUPLICATEWAKEUPEVENT_MASK (1 << 19) | ||
198 | #define OMAP4_CSI21_DX1_DUPLICATEWAKEUPEVENT_SHIFT 18 | ||
199 | #define OMAP4_CSI21_DX1_DUPLICATEWAKEUPEVENT_MASK (1 << 18) | ||
200 | #define OMAP4_CSI21_DY0_DUPLICATEWAKEUPEVENT_SHIFT 17 | ||
201 | #define OMAP4_CSI21_DY0_DUPLICATEWAKEUPEVENT_MASK (1 << 17) | ||
202 | #define OMAP4_CSI21_DX0_DUPLICATEWAKEUPEVENT_SHIFT 16 | ||
203 | #define OMAP4_CSI21_DX0_DUPLICATEWAKEUPEVENT_MASK (1 << 16) | ||
204 | #define OMAP4_HDMI_DDC_SDA_DUPLICATEWAKEUPEVENT_SHIFT 15 | ||
205 | #define OMAP4_HDMI_DDC_SDA_DUPLICATEWAKEUPEVENT_MASK (1 << 15) | ||
206 | #define OMAP4_HDMI_DDC_SCL_DUPLICATEWAKEUPEVENT_SHIFT 14 | ||
207 | #define OMAP4_HDMI_DDC_SCL_DUPLICATEWAKEUPEVENT_MASK (1 << 14) | ||
208 | #define OMAP4_HDMI_CEC_DUPLICATEWAKEUPEVENT_SHIFT 13 | ||
209 | #define OMAP4_HDMI_CEC_DUPLICATEWAKEUPEVENT_MASK (1 << 13) | ||
210 | #define OMAP4_HDMI_HPD_DUPLICATEWAKEUPEVENT_SHIFT 12 | ||
211 | #define OMAP4_HDMI_HPD_DUPLICATEWAKEUPEVENT_MASK (1 << 12) | ||
212 | #define OMAP4_C2C_DATA15_DUPLICATEWAKEUPEVENT_SHIFT 11 | ||
213 | #define OMAP4_C2C_DATA15_DUPLICATEWAKEUPEVENT_MASK (1 << 11) | ||
214 | #define OMAP4_C2C_DATA14_DUPLICATEWAKEUPEVENT_SHIFT 10 | ||
215 | #define OMAP4_C2C_DATA14_DUPLICATEWAKEUPEVENT_MASK (1 << 10) | ||
216 | #define OMAP4_C2C_DATA13_DUPLICATEWAKEUPEVENT_SHIFT 9 | ||
217 | #define OMAP4_C2C_DATA13_DUPLICATEWAKEUPEVENT_MASK (1 << 9) | ||
218 | #define OMAP4_C2C_DATA12_DUPLICATEWAKEUPEVENT_SHIFT 8 | ||
219 | #define OMAP4_C2C_DATA12_DUPLICATEWAKEUPEVENT_MASK (1 << 8) | ||
220 | #define OMAP4_C2C_DATA11_DUPLICATEWAKEUPEVENT_SHIFT 7 | ||
221 | #define OMAP4_C2C_DATA11_DUPLICATEWAKEUPEVENT_MASK (1 << 7) | ||
222 | #define OMAP4_GPMC_WAIT1_DUPLICATEWAKEUPEVENT_SHIFT 6 | ||
223 | #define OMAP4_GPMC_WAIT1_DUPLICATEWAKEUPEVENT_MASK (1 << 6) | ||
224 | #define OMAP4_GPMC_WAIT0_DUPLICATEWAKEUPEVENT_SHIFT 5 | ||
225 | #define OMAP4_GPMC_WAIT0_DUPLICATEWAKEUPEVENT_MASK (1 << 5) | ||
226 | #define OMAP4_GPMC_NBE1_DUPLICATEWAKEUPEVENT_SHIFT 4 | ||
227 | #define OMAP4_GPMC_NBE1_DUPLICATEWAKEUPEVENT_MASK (1 << 4) | ||
228 | #define OMAP4_GPMC_NBE0_CLE_DUPLICATEWAKEUPEVENT_SHIFT 3 | ||
229 | #define OMAP4_GPMC_NBE0_CLE_DUPLICATEWAKEUPEVENT_MASK (1 << 3) | ||
230 | #define OMAP4_GPMC_NWE_DUPLICATEWAKEUPEVENT_SHIFT 2 | ||
231 | #define OMAP4_GPMC_NWE_DUPLICATEWAKEUPEVENT_MASK (1 << 2) | ||
232 | #define OMAP4_GPMC_NOE_DUPLICATEWAKEUPEVENT_SHIFT 1 | ||
233 | #define OMAP4_GPMC_NOE_DUPLICATEWAKEUPEVENT_MASK (1 << 1) | ||
234 | #define OMAP4_GPMC_NADV_ALE_DUPLICATEWAKEUPEVENT_SHIFT 0 | ||
235 | #define OMAP4_GPMC_NADV_ALE_DUPLICATEWAKEUPEVENT_MASK (1 << 0) | ||
236 | |||
237 | /* PADCONF_WAKEUPEVENT_2 */ | ||
238 | #define OMAP4_ABE_MCBSP1_CLKX_DUPLICATEWAKEUPEVENT_SHIFT 31 | ||
239 | #define OMAP4_ABE_MCBSP1_CLKX_DUPLICATEWAKEUPEVENT_MASK (1 << 31) | ||
240 | #define OMAP4_ABE_MCBSP2_FSX_DUPLICATEWAKEUPEVENT_SHIFT 30 | ||
241 | #define OMAP4_ABE_MCBSP2_FSX_DUPLICATEWAKEUPEVENT_MASK (1 << 30) | ||
242 | #define OMAP4_ABE_MCBSP2_DX_DUPLICATEWAKEUPEVENT_SHIFT 29 | ||
243 | #define OMAP4_ABE_MCBSP2_DX_DUPLICATEWAKEUPEVENT_MASK (1 << 29) | ||
244 | #define OMAP4_ABE_MCBSP2_DR_DUPLICATEWAKEUPEVENT_SHIFT 28 | ||
245 | #define OMAP4_ABE_MCBSP2_DR_DUPLICATEWAKEUPEVENT_MASK (1 << 28) | ||
246 | #define OMAP4_ABE_MCBSP2_CLKX_DUPLICATEWAKEUPEVENT_SHIFT 27 | ||
247 | #define OMAP4_ABE_MCBSP2_CLKX_DUPLICATEWAKEUPEVENT_MASK (1 << 27) | ||
248 | #define OMAP4_SDMMC1_DAT7_DUPLICATEWAKEUPEVENT_SHIFT 26 | ||
249 | #define OMAP4_SDMMC1_DAT7_DUPLICATEWAKEUPEVENT_MASK (1 << 26) | ||
250 | #define OMAP4_SDMMC1_DAT6_DUPLICATEWAKEUPEVENT_SHIFT 25 | ||
251 | #define OMAP4_SDMMC1_DAT6_DUPLICATEWAKEUPEVENT_MASK (1 << 25) | ||
252 | #define OMAP4_SDMMC1_DAT5_DUPLICATEWAKEUPEVENT_SHIFT 24 | ||
253 | #define OMAP4_SDMMC1_DAT5_DUPLICATEWAKEUPEVENT_MASK (1 << 24) | ||
254 | #define OMAP4_SDMMC1_DAT4_DUPLICATEWAKEUPEVENT_SHIFT 23 | ||
255 | #define OMAP4_SDMMC1_DAT4_DUPLICATEWAKEUPEVENT_MASK (1 << 23) | ||
256 | #define OMAP4_SDMMC1_DAT3_DUPLICATEWAKEUPEVENT_SHIFT 22 | ||
257 | #define OMAP4_SDMMC1_DAT3_DUPLICATEWAKEUPEVENT_MASK (1 << 22) | ||
258 | #define OMAP4_SDMMC1_DAT2_DUPLICATEWAKEUPEVENT_SHIFT 21 | ||
259 | #define OMAP4_SDMMC1_DAT2_DUPLICATEWAKEUPEVENT_MASK (1 << 21) | ||
260 | #define OMAP4_SDMMC1_DAT1_DUPLICATEWAKEUPEVENT_SHIFT 20 | ||
261 | #define OMAP4_SDMMC1_DAT1_DUPLICATEWAKEUPEVENT_MASK (1 << 20) | ||
262 | #define OMAP4_SDMMC1_DAT0_DUPLICATEWAKEUPEVENT_SHIFT 19 | ||
263 | #define OMAP4_SDMMC1_DAT0_DUPLICATEWAKEUPEVENT_MASK (1 << 19) | ||
264 | #define OMAP4_SDMMC1_CMD_DUPLICATEWAKEUPEVENT_SHIFT 18 | ||
265 | #define OMAP4_SDMMC1_CMD_DUPLICATEWAKEUPEVENT_MASK (1 << 18) | ||
266 | #define OMAP4_SDMMC1_CLK_DUPLICATEWAKEUPEVENT_SHIFT 17 | ||
267 | #define OMAP4_SDMMC1_CLK_DUPLICATEWAKEUPEVENT_MASK (1 << 17) | ||
268 | #define OMAP4_USBC1_ICUSB_DM_DUPLICATEWAKEUPEVENT_SHIFT 16 | ||
269 | #define OMAP4_USBC1_ICUSB_DM_DUPLICATEWAKEUPEVENT_MASK (1 << 16) | ||
270 | #define OMAP4_USBC1_ICUSB_DP_DUPLICATEWAKEUPEVENT_SHIFT 15 | ||
271 | #define OMAP4_USBC1_ICUSB_DP_DUPLICATEWAKEUPEVENT_MASK (1 << 15) | ||
272 | #define OMAP4_USBB1_HSIC_STROBE_DUPLICATEWAKEUPEVENT_SHIFT 14 | ||
273 | #define OMAP4_USBB1_HSIC_STROBE_DUPLICATEWAKEUPEVENT_MASK (1 << 14) | ||
274 | #define OMAP4_USBB1_HSIC_DATA_DUPLICATEWAKEUPEVENT_SHIFT 13 | ||
275 | #define OMAP4_USBB1_HSIC_DATA_DUPLICATEWAKEUPEVENT_MASK (1 << 13) | ||
276 | #define OMAP4_USBB1_ULPITLL_DAT7_DUPLICATEWAKEUPEVENT_SHIFT 12 | ||
277 | #define OMAP4_USBB1_ULPITLL_DAT7_DUPLICATEWAKEUPEVENT_MASK (1 << 12) | ||
278 | #define OMAP4_USBB1_ULPITLL_DAT6_DUPLICATEWAKEUPEVENT_SHIFT 11 | ||
279 | #define OMAP4_USBB1_ULPITLL_DAT6_DUPLICATEWAKEUPEVENT_MASK (1 << 11) | ||
280 | #define OMAP4_USBB1_ULPITLL_DAT5_DUPLICATEWAKEUPEVENT_SHIFT 10 | ||
281 | #define OMAP4_USBB1_ULPITLL_DAT5_DUPLICATEWAKEUPEVENT_MASK (1 << 10) | ||
282 | #define OMAP4_USBB1_ULPITLL_DAT4_DUPLICATEWAKEUPEVENT_SHIFT 9 | ||
283 | #define OMAP4_USBB1_ULPITLL_DAT4_DUPLICATEWAKEUPEVENT_MASK (1 << 9) | ||
284 | #define OMAP4_USBB1_ULPITLL_DAT3_DUPLICATEWAKEUPEVENT_SHIFT 8 | ||
285 | #define OMAP4_USBB1_ULPITLL_DAT3_DUPLICATEWAKEUPEVENT_MASK (1 << 8) | ||
286 | #define OMAP4_USBB1_ULPITLL_DAT2_DUPLICATEWAKEUPEVENT_SHIFT 7 | ||
287 | #define OMAP4_USBB1_ULPITLL_DAT2_DUPLICATEWAKEUPEVENT_MASK (1 << 7) | ||
288 | #define OMAP4_USBB1_ULPITLL_DAT1_DUPLICATEWAKEUPEVENT_SHIFT 6 | ||
289 | #define OMAP4_USBB1_ULPITLL_DAT1_DUPLICATEWAKEUPEVENT_MASK (1 << 6) | ||
290 | #define OMAP4_USBB1_ULPITLL_DAT0_DUPLICATEWAKEUPEVENT_SHIFT 5 | ||
291 | #define OMAP4_USBB1_ULPITLL_DAT0_DUPLICATEWAKEUPEVENT_MASK (1 << 5) | ||
292 | #define OMAP4_USBB1_ULPITLL_NXT_DUPLICATEWAKEUPEVENT_SHIFT 4 | ||
293 | #define OMAP4_USBB1_ULPITLL_NXT_DUPLICATEWAKEUPEVENT_MASK (1 << 4) | ||
294 | #define OMAP4_USBB1_ULPITLL_DIR_DUPLICATEWAKEUPEVENT_SHIFT 3 | ||
295 | #define OMAP4_USBB1_ULPITLL_DIR_DUPLICATEWAKEUPEVENT_MASK (1 << 3) | ||
296 | #define OMAP4_USBB1_ULPITLL_STP_DUPLICATEWAKEUPEVENT_SHIFT 2 | ||
297 | #define OMAP4_USBB1_ULPITLL_STP_DUPLICATEWAKEUPEVENT_MASK (1 << 2) | ||
298 | #define OMAP4_USBB1_ULPITLL_CLK_DUPLICATEWAKEUPEVENT_SHIFT 1 | ||
299 | #define OMAP4_USBB1_ULPITLL_CLK_DUPLICATEWAKEUPEVENT_MASK (1 << 1) | ||
300 | #define OMAP4_CAM_GLOBALRESET_DUPLICATEWAKEUPEVENT_SHIFT 0 | ||
301 | #define OMAP4_CAM_GLOBALRESET_DUPLICATEWAKEUPEVENT_MASK (1 << 0) | ||
302 | |||
303 | /* PADCONF_WAKEUPEVENT_3 */ | ||
304 | #define OMAP4_MCSPI1_CS3_DUPLICATEWAKEUPEVENT_SHIFT 31 | ||
305 | #define OMAP4_MCSPI1_CS3_DUPLICATEWAKEUPEVENT_MASK (1 << 31) | ||
306 | #define OMAP4_MCSPI1_CS2_DUPLICATEWAKEUPEVENT_SHIFT 30 | ||
307 | #define OMAP4_MCSPI1_CS2_DUPLICATEWAKEUPEVENT_MASK (1 << 30) | ||
308 | #define OMAP4_MCSPI1_CS1_DUPLICATEWAKEUPEVENT_SHIFT 29 | ||
309 | #define OMAP4_MCSPI1_CS1_DUPLICATEWAKEUPEVENT_MASK (1 << 29) | ||
310 | #define OMAP4_MCSPI1_CS0_DUPLICATEWAKEUPEVENT_SHIFT 28 | ||
311 | #define OMAP4_MCSPI1_CS0_DUPLICATEWAKEUPEVENT_MASK (1 << 28) | ||
312 | #define OMAP4_MCSPI1_SIMO_DUPLICATEWAKEUPEVENT_SHIFT 27 | ||
313 | #define OMAP4_MCSPI1_SIMO_DUPLICATEWAKEUPEVENT_MASK (1 << 27) | ||
314 | #define OMAP4_MCSPI1_SOMI_DUPLICATEWAKEUPEVENT_SHIFT 26 | ||
315 | #define OMAP4_MCSPI1_SOMI_DUPLICATEWAKEUPEVENT_MASK (1 << 26) | ||
316 | #define OMAP4_MCSPI1_CLK_DUPLICATEWAKEUPEVENT_SHIFT 25 | ||
317 | #define OMAP4_MCSPI1_CLK_DUPLICATEWAKEUPEVENT_MASK (1 << 25) | ||
318 | #define OMAP4_I2C4_SDA_DUPLICATEWAKEUPEVENT_SHIFT 24 | ||
319 | #define OMAP4_I2C4_SDA_DUPLICATEWAKEUPEVENT_MASK (1 << 24) | ||
320 | #define OMAP4_I2C4_SCL_DUPLICATEWAKEUPEVENT_SHIFT 23 | ||
321 | #define OMAP4_I2C4_SCL_DUPLICATEWAKEUPEVENT_MASK (1 << 23) | ||
322 | #define OMAP4_I2C3_SDA_DUPLICATEWAKEUPEVENT_SHIFT 22 | ||
323 | #define OMAP4_I2C3_SDA_DUPLICATEWAKEUPEVENT_MASK (1 << 22) | ||
324 | #define OMAP4_I2C3_SCL_DUPLICATEWAKEUPEVENT_SHIFT 21 | ||
325 | #define OMAP4_I2C3_SCL_DUPLICATEWAKEUPEVENT_MASK (1 << 21) | ||
326 | #define OMAP4_I2C2_SDA_DUPLICATEWAKEUPEVENT_SHIFT 20 | ||
327 | #define OMAP4_I2C2_SDA_DUPLICATEWAKEUPEVENT_MASK (1 << 20) | ||
328 | #define OMAP4_I2C2_SCL_DUPLICATEWAKEUPEVENT_SHIFT 19 | ||
329 | #define OMAP4_I2C2_SCL_DUPLICATEWAKEUPEVENT_MASK (1 << 19) | ||
330 | #define OMAP4_I2C1_SDA_DUPLICATEWAKEUPEVENT_SHIFT 18 | ||
331 | #define OMAP4_I2C1_SDA_DUPLICATEWAKEUPEVENT_MASK (1 << 18) | ||
332 | #define OMAP4_I2C1_SCL_DUPLICATEWAKEUPEVENT_SHIFT 17 | ||
333 | #define OMAP4_I2C1_SCL_DUPLICATEWAKEUPEVENT_MASK (1 << 17) | ||
334 | #define OMAP4_HDQ_SIO_DUPLICATEWAKEUPEVENT_SHIFT 16 | ||
335 | #define OMAP4_HDQ_SIO_DUPLICATEWAKEUPEVENT_MASK (1 << 16) | ||
336 | #define OMAP4_UART2_TX_DUPLICATEWAKEUPEVENT_SHIFT 15 | ||
337 | #define OMAP4_UART2_TX_DUPLICATEWAKEUPEVENT_MASK (1 << 15) | ||
338 | #define OMAP4_UART2_RX_DUPLICATEWAKEUPEVENT_SHIFT 14 | ||
339 | #define OMAP4_UART2_RX_DUPLICATEWAKEUPEVENT_MASK (1 << 14) | ||
340 | #define OMAP4_UART2_RTS_DUPLICATEWAKEUPEVENT_SHIFT 13 | ||
341 | #define OMAP4_UART2_RTS_DUPLICATEWAKEUPEVENT_MASK (1 << 13) | ||
342 | #define OMAP4_UART2_CTS_DUPLICATEWAKEUPEVENT_SHIFT 12 | ||
343 | #define OMAP4_UART2_CTS_DUPLICATEWAKEUPEVENT_MASK (1 << 12) | ||
344 | #define OMAP4_ABE_DMIC_DIN3_DUPLICATEWAKEUPEVENT_SHIFT 11 | ||
345 | #define OMAP4_ABE_DMIC_DIN3_DUPLICATEWAKEUPEVENT_MASK (1 << 11) | ||
346 | #define OMAP4_ABE_DMIC_DIN2_DUPLICATEWAKEUPEVENT_SHIFT 10 | ||
347 | #define OMAP4_ABE_DMIC_DIN2_DUPLICATEWAKEUPEVENT_MASK (1 << 10) | ||
348 | #define OMAP4_ABE_DMIC_DIN1_DUPLICATEWAKEUPEVENT_SHIFT 9 | ||
349 | #define OMAP4_ABE_DMIC_DIN1_DUPLICATEWAKEUPEVENT_MASK (1 << 9) | ||
350 | #define OMAP4_ABE_DMIC_CLK1_DUPLICATEWAKEUPEVENT_SHIFT 8 | ||
351 | #define OMAP4_ABE_DMIC_CLK1_DUPLICATEWAKEUPEVENT_MASK (1 << 8) | ||
352 | #define OMAP4_ABE_CLKS_DUPLICATEWAKEUPEVENT_SHIFT 7 | ||
353 | #define OMAP4_ABE_CLKS_DUPLICATEWAKEUPEVENT_MASK (1 << 7) | ||
354 | #define OMAP4_ABE_PDM_LB_CLK_DUPLICATEWAKEUPEVENT_SHIFT 6 | ||
355 | #define OMAP4_ABE_PDM_LB_CLK_DUPLICATEWAKEUPEVENT_MASK (1 << 6) | ||
356 | #define OMAP4_ABE_PDM_FRAME_DUPLICATEWAKEUPEVENT_SHIFT 5 | ||
357 | #define OMAP4_ABE_PDM_FRAME_DUPLICATEWAKEUPEVENT_MASK (1 << 5) | ||
358 | #define OMAP4_ABE_PDM_DL_DATA_DUPLICATEWAKEUPEVENT_SHIFT 4 | ||
359 | #define OMAP4_ABE_PDM_DL_DATA_DUPLICATEWAKEUPEVENT_MASK (1 << 4) | ||
360 | #define OMAP4_ABE_PDM_UL_DATA_DUPLICATEWAKEUPEVENT_SHIFT 3 | ||
361 | #define OMAP4_ABE_PDM_UL_DATA_DUPLICATEWAKEUPEVENT_MASK (1 << 3) | ||
362 | #define OMAP4_ABE_MCBSP1_FSX_DUPLICATEWAKEUPEVENT_SHIFT 2 | ||
363 | #define OMAP4_ABE_MCBSP1_FSX_DUPLICATEWAKEUPEVENT_MASK (1 << 2) | ||
364 | #define OMAP4_ABE_MCBSP1_DX_DUPLICATEWAKEUPEVENT_SHIFT 1 | ||
365 | #define OMAP4_ABE_MCBSP1_DX_DUPLICATEWAKEUPEVENT_MASK (1 << 1) | ||
366 | #define OMAP4_ABE_MCBSP1_DR_DUPLICATEWAKEUPEVENT_SHIFT 0 | ||
367 | #define OMAP4_ABE_MCBSP1_DR_DUPLICATEWAKEUPEVENT_MASK (1 << 0) | ||
368 | |||
369 | /* PADCONF_WAKEUPEVENT_4 */ | ||
370 | #define OMAP4_UNIPRO_TY0_DUPLICATEWAKEUPEVENT_SHIFT 31 | ||
371 | #define OMAP4_UNIPRO_TY0_DUPLICATEWAKEUPEVENT_MASK (1 << 31) | ||
372 | #define OMAP4_UNIPRO_TX0_DUPLICATEWAKEUPEVENT_SHIFT 30 | ||
373 | #define OMAP4_UNIPRO_TX0_DUPLICATEWAKEUPEVENT_MASK (1 << 30) | ||
374 | #define OMAP4_USBB2_HSIC_STROBE_DUPLICATEWAKEUPEVENT_SHIFT 29 | ||
375 | #define OMAP4_USBB2_HSIC_STROBE_DUPLICATEWAKEUPEVENT_MASK (1 << 29) | ||
376 | #define OMAP4_USBB2_HSIC_DATA_DUPLICATEWAKEUPEVENT_SHIFT 28 | ||
377 | #define OMAP4_USBB2_HSIC_DATA_DUPLICATEWAKEUPEVENT_MASK (1 << 28) | ||
378 | #define OMAP4_USBB2_ULPITLL_DAT7_DUPLICATEWAKEUPEVENT_SHIFT 27 | ||
379 | #define OMAP4_USBB2_ULPITLL_DAT7_DUPLICATEWAKEUPEVENT_MASK (1 << 27) | ||
380 | #define OMAP4_USBB2_ULPITLL_DAT6_DUPLICATEWAKEUPEVENT_SHIFT 26 | ||
381 | #define OMAP4_USBB2_ULPITLL_DAT6_DUPLICATEWAKEUPEVENT_MASK (1 << 26) | ||
382 | #define OMAP4_USBB2_ULPITLL_DAT5_DUPLICATEWAKEUPEVENT_SHIFT 25 | ||
383 | #define OMAP4_USBB2_ULPITLL_DAT5_DUPLICATEWAKEUPEVENT_MASK (1 << 25) | ||
384 | #define OMAP4_USBB2_ULPITLL_DAT4_DUPLICATEWAKEUPEVENT_SHIFT 24 | ||
385 | #define OMAP4_USBB2_ULPITLL_DAT4_DUPLICATEWAKEUPEVENT_MASK (1 << 24) | ||
386 | #define OMAP4_USBB2_ULPITLL_DAT3_DUPLICATEWAKEUPEVENT_SHIFT 23 | ||
387 | #define OMAP4_USBB2_ULPITLL_DAT3_DUPLICATEWAKEUPEVENT_MASK (1 << 23) | ||
388 | #define OMAP4_USBB2_ULPITLL_DAT2_DUPLICATEWAKEUPEVENT_SHIFT 22 | ||
389 | #define OMAP4_USBB2_ULPITLL_DAT2_DUPLICATEWAKEUPEVENT_MASK (1 << 22) | ||
390 | #define OMAP4_USBB2_ULPITLL_DAT1_DUPLICATEWAKEUPEVENT_SHIFT 21 | ||
391 | #define OMAP4_USBB2_ULPITLL_DAT1_DUPLICATEWAKEUPEVENT_MASK (1 << 21) | ||
392 | #define OMAP4_USBB2_ULPITLL_DAT0_DUPLICATEWAKEUPEVENT_SHIFT 20 | ||
393 | #define OMAP4_USBB2_ULPITLL_DAT0_DUPLICATEWAKEUPEVENT_MASK (1 << 20) | ||
394 | #define OMAP4_USBB2_ULPITLL_NXT_DUPLICATEWAKEUPEVENT_SHIFT 19 | ||
395 | #define OMAP4_USBB2_ULPITLL_NXT_DUPLICATEWAKEUPEVENT_MASK (1 << 19) | ||
396 | #define OMAP4_USBB2_ULPITLL_DIR_DUPLICATEWAKEUPEVENT_SHIFT 18 | ||
397 | #define OMAP4_USBB2_ULPITLL_DIR_DUPLICATEWAKEUPEVENT_MASK (1 << 18) | ||
398 | #define OMAP4_USBB2_ULPITLL_STP_DUPLICATEWAKEUPEVENT_SHIFT 17 | ||
399 | #define OMAP4_USBB2_ULPITLL_STP_DUPLICATEWAKEUPEVENT_MASK (1 << 17) | ||
400 | #define OMAP4_USBB2_ULPITLL_CLK_DUPLICATEWAKEUPEVENT_SHIFT 16 | ||
401 | #define OMAP4_USBB2_ULPITLL_CLK_DUPLICATEWAKEUPEVENT_MASK (1 << 16) | ||
402 | #define OMAP4_UART4_TX_DUPLICATEWAKEUPEVENT_SHIFT 15 | ||
403 | #define OMAP4_UART4_TX_DUPLICATEWAKEUPEVENT_MASK (1 << 15) | ||
404 | #define OMAP4_UART4_RX_DUPLICATEWAKEUPEVENT_SHIFT 14 | ||
405 | #define OMAP4_UART4_RX_DUPLICATEWAKEUPEVENT_MASK (1 << 14) | ||
406 | #define OMAP4_MCSPI4_CS0_DUPLICATEWAKEUPEVENT_SHIFT 13 | ||
407 | #define OMAP4_MCSPI4_CS0_DUPLICATEWAKEUPEVENT_MASK (1 << 13) | ||
408 | #define OMAP4_MCSPI4_SOMI_DUPLICATEWAKEUPEVENT_SHIFT 12 | ||
409 | #define OMAP4_MCSPI4_SOMI_DUPLICATEWAKEUPEVENT_MASK (1 << 12) | ||
410 | #define OMAP4_MCSPI4_SIMO_DUPLICATEWAKEUPEVENT_SHIFT 11 | ||
411 | #define OMAP4_MCSPI4_SIMO_DUPLICATEWAKEUPEVENT_MASK (1 << 11) | ||
412 | #define OMAP4_MCSPI4_CLK_DUPLICATEWAKEUPEVENT_SHIFT 10 | ||
413 | #define OMAP4_MCSPI4_CLK_DUPLICATEWAKEUPEVENT_MASK (1 << 10) | ||
414 | #define OMAP4_SDMMC5_DAT3_DUPLICATEWAKEUPEVENT_SHIFT 9 | ||
415 | #define OMAP4_SDMMC5_DAT3_DUPLICATEWAKEUPEVENT_MASK (1 << 9) | ||
416 | #define OMAP4_SDMMC5_DAT2_DUPLICATEWAKEUPEVENT_SHIFT 8 | ||
417 | #define OMAP4_SDMMC5_DAT2_DUPLICATEWAKEUPEVENT_MASK (1 << 8) | ||
418 | #define OMAP4_SDMMC5_DAT1_DUPLICATEWAKEUPEVENT_SHIFT 7 | ||
419 | #define OMAP4_SDMMC5_DAT1_DUPLICATEWAKEUPEVENT_MASK (1 << 7) | ||
420 | #define OMAP4_SDMMC5_DAT0_DUPLICATEWAKEUPEVENT_SHIFT 6 | ||
421 | #define OMAP4_SDMMC5_DAT0_DUPLICATEWAKEUPEVENT_MASK (1 << 6) | ||
422 | #define OMAP4_SDMMC5_CMD_DUPLICATEWAKEUPEVENT_SHIFT 5 | ||
423 | #define OMAP4_SDMMC5_CMD_DUPLICATEWAKEUPEVENT_MASK (1 << 5) | ||
424 | #define OMAP4_SDMMC5_CLK_DUPLICATEWAKEUPEVENT_SHIFT 4 | ||
425 | #define OMAP4_SDMMC5_CLK_DUPLICATEWAKEUPEVENT_MASK (1 << 4) | ||
426 | #define OMAP4_UART3_TX_IRTX_DUPLICATEWAKEUPEVENT_SHIFT 3 | ||
427 | #define OMAP4_UART3_TX_IRTX_DUPLICATEWAKEUPEVENT_MASK (1 << 3) | ||
428 | #define OMAP4_UART3_RX_IRRX_DUPLICATEWAKEUPEVENT_SHIFT 2 | ||
429 | #define OMAP4_UART3_RX_IRRX_DUPLICATEWAKEUPEVENT_MASK (1 << 2) | ||
430 | #define OMAP4_UART3_RTS_SD_DUPLICATEWAKEUPEVENT_SHIFT 1 | ||
431 | #define OMAP4_UART3_RTS_SD_DUPLICATEWAKEUPEVENT_MASK (1 << 1) | ||
432 | #define OMAP4_UART3_CTS_RCTX_DUPLICATEWAKEUPEVENT_SHIFT 0 | ||
433 | #define OMAP4_UART3_CTS_RCTX_DUPLICATEWAKEUPEVENT_MASK (1 << 0) | ||
434 | |||
435 | /* PADCONF_WAKEUPEVENT_5 */ | ||
436 | #define OMAP4_DPM_EMU11_DUPLICATEWAKEUPEVENT_SHIFT 31 | ||
437 | #define OMAP4_DPM_EMU11_DUPLICATEWAKEUPEVENT_MASK (1 << 31) | ||
438 | #define OMAP4_DPM_EMU10_DUPLICATEWAKEUPEVENT_SHIFT 30 | ||
439 | #define OMAP4_DPM_EMU10_DUPLICATEWAKEUPEVENT_MASK (1 << 30) | ||
440 | #define OMAP4_DPM_EMU9_DUPLICATEWAKEUPEVENT_SHIFT 29 | ||
441 | #define OMAP4_DPM_EMU9_DUPLICATEWAKEUPEVENT_MASK (1 << 29) | ||
442 | #define OMAP4_DPM_EMU8_DUPLICATEWAKEUPEVENT_SHIFT 28 | ||
443 | #define OMAP4_DPM_EMU8_DUPLICATEWAKEUPEVENT_MASK (1 << 28) | ||
444 | #define OMAP4_DPM_EMU7_DUPLICATEWAKEUPEVENT_SHIFT 27 | ||
445 | #define OMAP4_DPM_EMU7_DUPLICATEWAKEUPEVENT_MASK (1 << 27) | ||
446 | #define OMAP4_DPM_EMU6_DUPLICATEWAKEUPEVENT_SHIFT 26 | ||
447 | #define OMAP4_DPM_EMU6_DUPLICATEWAKEUPEVENT_MASK (1 << 26) | ||
448 | #define OMAP4_DPM_EMU5_DUPLICATEWAKEUPEVENT_SHIFT 25 | ||
449 | #define OMAP4_DPM_EMU5_DUPLICATEWAKEUPEVENT_MASK (1 << 25) | ||
450 | #define OMAP4_DPM_EMU4_DUPLICATEWAKEUPEVENT_SHIFT 24 | ||
451 | #define OMAP4_DPM_EMU4_DUPLICATEWAKEUPEVENT_MASK (1 << 24) | ||
452 | #define OMAP4_DPM_EMU3_DUPLICATEWAKEUPEVENT_SHIFT 23 | ||
453 | #define OMAP4_DPM_EMU3_DUPLICATEWAKEUPEVENT_MASK (1 << 23) | ||
454 | #define OMAP4_DPM_EMU2_DUPLICATEWAKEUPEVENT_SHIFT 22 | ||
455 | #define OMAP4_DPM_EMU2_DUPLICATEWAKEUPEVENT_MASK (1 << 22) | ||
456 | #define OMAP4_DPM_EMU1_DUPLICATEWAKEUPEVENT_SHIFT 21 | ||
457 | #define OMAP4_DPM_EMU1_DUPLICATEWAKEUPEVENT_MASK (1 << 21) | ||
458 | #define OMAP4_DPM_EMU0_DUPLICATEWAKEUPEVENT_SHIFT 20 | ||
459 | #define OMAP4_DPM_EMU0_DUPLICATEWAKEUPEVENT_MASK (1 << 20) | ||
460 | #define OMAP4_SYS_BOOT5_DUPLICATEWAKEUPEVENT_SHIFT 19 | ||
461 | #define OMAP4_SYS_BOOT5_DUPLICATEWAKEUPEVENT_MASK (1 << 19) | ||
462 | #define OMAP4_SYS_BOOT4_DUPLICATEWAKEUPEVENT_SHIFT 18 | ||
463 | #define OMAP4_SYS_BOOT4_DUPLICATEWAKEUPEVENT_MASK (1 << 18) | ||
464 | #define OMAP4_SYS_BOOT3_DUPLICATEWAKEUPEVENT_SHIFT 17 | ||
465 | #define OMAP4_SYS_BOOT3_DUPLICATEWAKEUPEVENT_MASK (1 << 17) | ||
466 | #define OMAP4_SYS_BOOT2_DUPLICATEWAKEUPEVENT_SHIFT 16 | ||
467 | #define OMAP4_SYS_BOOT2_DUPLICATEWAKEUPEVENT_MASK (1 << 16) | ||
468 | #define OMAP4_SYS_BOOT1_DUPLICATEWAKEUPEVENT_SHIFT 15 | ||
469 | #define OMAP4_SYS_BOOT1_DUPLICATEWAKEUPEVENT_MASK (1 << 15) | ||
470 | #define OMAP4_SYS_BOOT0_DUPLICATEWAKEUPEVENT_SHIFT 14 | ||
471 | #define OMAP4_SYS_BOOT0_DUPLICATEWAKEUPEVENT_MASK (1 << 14) | ||
472 | #define OMAP4_SYS_NIRQ2_DUPLICATEWAKEUPEVENT_SHIFT 13 | ||
473 | #define OMAP4_SYS_NIRQ2_DUPLICATEWAKEUPEVENT_MASK (1 << 13) | ||
474 | #define OMAP4_SYS_NIRQ1_DUPLICATEWAKEUPEVENT_SHIFT 12 | ||
475 | #define OMAP4_SYS_NIRQ1_DUPLICATEWAKEUPEVENT_MASK (1 << 12) | ||
476 | #define OMAP4_FREF_CLK2_OUT_DUPLICATEWAKEUPEVENT_SHIFT 11 | ||
477 | #define OMAP4_FREF_CLK2_OUT_DUPLICATEWAKEUPEVENT_MASK (1 << 11) | ||
478 | #define OMAP4_FREF_CLK1_OUT_DUPLICATEWAKEUPEVENT_SHIFT 10 | ||
479 | #define OMAP4_FREF_CLK1_OUT_DUPLICATEWAKEUPEVENT_MASK (1 << 10) | ||
480 | #define OMAP4_UNIPRO_RY2_DUPLICATEWAKEUPEVENT_SHIFT 9 | ||
481 | #define OMAP4_UNIPRO_RY2_DUPLICATEWAKEUPEVENT_MASK (1 << 9) | ||
482 | #define OMAP4_UNIPRO_RX2_DUPLICATEWAKEUPEVENT_SHIFT 8 | ||
483 | #define OMAP4_UNIPRO_RX2_DUPLICATEWAKEUPEVENT_MASK (1 << 8) | ||
484 | #define OMAP4_UNIPRO_RY1_DUPLICATEWAKEUPEVENT_SHIFT 7 | ||
485 | #define OMAP4_UNIPRO_RY1_DUPLICATEWAKEUPEVENT_MASK (1 << 7) | ||
486 | #define OMAP4_UNIPRO_RX1_DUPLICATEWAKEUPEVENT_SHIFT 6 | ||
487 | #define OMAP4_UNIPRO_RX1_DUPLICATEWAKEUPEVENT_MASK (1 << 6) | ||
488 | #define OMAP4_UNIPRO_RY0_DUPLICATEWAKEUPEVENT_SHIFT 5 | ||
489 | #define OMAP4_UNIPRO_RY0_DUPLICATEWAKEUPEVENT_MASK (1 << 5) | ||
490 | #define OMAP4_UNIPRO_RX0_DUPLICATEWAKEUPEVENT_SHIFT 4 | ||
491 | #define OMAP4_UNIPRO_RX0_DUPLICATEWAKEUPEVENT_MASK (1 << 4) | ||
492 | #define OMAP4_UNIPRO_TY2_DUPLICATEWAKEUPEVENT_SHIFT 3 | ||
493 | #define OMAP4_UNIPRO_TY2_DUPLICATEWAKEUPEVENT_MASK (1 << 3) | ||
494 | #define OMAP4_UNIPRO_TX2_DUPLICATEWAKEUPEVENT_SHIFT 2 | ||
495 | #define OMAP4_UNIPRO_TX2_DUPLICATEWAKEUPEVENT_MASK (1 << 2) | ||
496 | #define OMAP4_UNIPRO_TY1_DUPLICATEWAKEUPEVENT_SHIFT 1 | ||
497 | #define OMAP4_UNIPRO_TY1_DUPLICATEWAKEUPEVENT_MASK (1 << 1) | ||
498 | #define OMAP4_UNIPRO_TX1_DUPLICATEWAKEUPEVENT_SHIFT 0 | ||
499 | #define OMAP4_UNIPRO_TX1_DUPLICATEWAKEUPEVENT_MASK (1 << 0) | ||
500 | |||
501 | /* PADCONF_WAKEUPEVENT_6 */ | ||
502 | #define OMAP4_DPM_EMU19_DUPLICATEWAKEUPEVENT_SHIFT 7 | ||
503 | #define OMAP4_DPM_EMU19_DUPLICATEWAKEUPEVENT_MASK (1 << 7) | ||
504 | #define OMAP4_DPM_EMU18_DUPLICATEWAKEUPEVENT_SHIFT 6 | ||
505 | #define OMAP4_DPM_EMU18_DUPLICATEWAKEUPEVENT_MASK (1 << 6) | ||
506 | #define OMAP4_DPM_EMU17_DUPLICATEWAKEUPEVENT_SHIFT 5 | ||
507 | #define OMAP4_DPM_EMU17_DUPLICATEWAKEUPEVENT_MASK (1 << 5) | ||
508 | #define OMAP4_DPM_EMU16_DUPLICATEWAKEUPEVENT_SHIFT 4 | ||
509 | #define OMAP4_DPM_EMU16_DUPLICATEWAKEUPEVENT_MASK (1 << 4) | ||
510 | #define OMAP4_DPM_EMU15_DUPLICATEWAKEUPEVENT_SHIFT 3 | ||
511 | #define OMAP4_DPM_EMU15_DUPLICATEWAKEUPEVENT_MASK (1 << 3) | ||
512 | #define OMAP4_DPM_EMU14_DUPLICATEWAKEUPEVENT_SHIFT 2 | ||
513 | #define OMAP4_DPM_EMU14_DUPLICATEWAKEUPEVENT_MASK (1 << 2) | ||
514 | #define OMAP4_DPM_EMU13_DUPLICATEWAKEUPEVENT_SHIFT 1 | ||
515 | #define OMAP4_DPM_EMU13_DUPLICATEWAKEUPEVENT_MASK (1 << 1) | ||
516 | #define OMAP4_DPM_EMU12_DUPLICATEWAKEUPEVENT_SHIFT 0 | ||
517 | #define OMAP4_DPM_EMU12_DUPLICATEWAKEUPEVENT_MASK (1 << 0) | ||
518 | |||
519 | /* CONTROL_PADCONF_GLOBAL */ | ||
520 | #define OMAP4_FORCE_OFFMODE_EN_SHIFT 31 | ||
521 | #define OMAP4_FORCE_OFFMODE_EN_MASK (1 << 31) | ||
522 | |||
523 | /* CONTROL_PADCONF_MODE */ | ||
524 | #define OMAP4_VDDS_DV_BANK0_SHIFT 31 | ||
525 | #define OMAP4_VDDS_DV_BANK0_MASK (1 << 31) | ||
526 | #define OMAP4_VDDS_DV_BANK1_SHIFT 30 | ||
527 | #define OMAP4_VDDS_DV_BANK1_MASK (1 << 30) | ||
528 | #define OMAP4_VDDS_DV_BANK3_SHIFT 29 | ||
529 | #define OMAP4_VDDS_DV_BANK3_MASK (1 << 29) | ||
530 | #define OMAP4_VDDS_DV_BANK4_SHIFT 28 | ||
531 | #define OMAP4_VDDS_DV_BANK4_MASK (1 << 28) | ||
532 | #define OMAP4_VDDS_DV_BANK5_SHIFT 27 | ||
533 | #define OMAP4_VDDS_DV_BANK5_MASK (1 << 27) | ||
534 | #define OMAP4_VDDS_DV_BANK6_SHIFT 26 | ||
535 | #define OMAP4_VDDS_DV_BANK6_MASK (1 << 26) | ||
536 | #define OMAP4_VDDS_DV_C2C_SHIFT 25 | ||
537 | #define OMAP4_VDDS_DV_C2C_MASK (1 << 25) | ||
538 | #define OMAP4_VDDS_DV_CAM_SHIFT 24 | ||
539 | #define OMAP4_VDDS_DV_CAM_MASK (1 << 24) | ||
540 | #define OMAP4_VDDS_DV_GPMC_SHIFT 23 | ||
541 | #define OMAP4_VDDS_DV_GPMC_MASK (1 << 23) | ||
542 | #define OMAP4_VDDS_DV_SDMMC2_SHIFT 22 | ||
543 | #define OMAP4_VDDS_DV_SDMMC2_MASK (1 << 22) | ||
544 | |||
545 | /* CONTROL_SMART1IO_PADCONF_0 */ | ||
546 | #define OMAP4_ABE_DR0_SC_SHIFT 30 | ||
547 | #define OMAP4_ABE_DR0_SC_MASK (0x3 << 30) | ||
548 | #define OMAP4_CAM_DR0_SC_SHIFT 28 | ||
549 | #define OMAP4_CAM_DR0_SC_MASK (0x3 << 28) | ||
550 | #define OMAP4_FREF_DR2_SC_SHIFT 26 | ||
551 | #define OMAP4_FREF_DR2_SC_MASK (0x3 << 26) | ||
552 | #define OMAP4_FREF_DR3_SC_SHIFT 24 | ||
553 | #define OMAP4_FREF_DR3_SC_MASK (0x3 << 24) | ||
554 | #define OMAP4_GPIO_DR8_SC_SHIFT 22 | ||
555 | #define OMAP4_GPIO_DR8_SC_MASK (0x3 << 22) | ||
556 | #define OMAP4_GPIO_DR9_SC_SHIFT 20 | ||
557 | #define OMAP4_GPIO_DR9_SC_MASK (0x3 << 20) | ||
558 | #define OMAP4_GPMC_DR2_SC_SHIFT 18 | ||
559 | #define OMAP4_GPMC_DR2_SC_MASK (0x3 << 18) | ||
560 | #define OMAP4_GPMC_DR3_SC_SHIFT 16 | ||
561 | #define OMAP4_GPMC_DR3_SC_MASK (0x3 << 16) | ||
562 | #define OMAP4_GPMC_DR6_SC_SHIFT 14 | ||
563 | #define OMAP4_GPMC_DR6_SC_MASK (0x3 << 14) | ||
564 | #define OMAP4_HDMI_DR0_SC_SHIFT 12 | ||
565 | #define OMAP4_HDMI_DR0_SC_MASK (0x3 << 12) | ||
566 | #define OMAP4_MCSPI1_DR0_SC_SHIFT 10 | ||
567 | #define OMAP4_MCSPI1_DR0_SC_MASK (0x3 << 10) | ||
568 | #define OMAP4_UART1_DR0_SC_SHIFT 8 | ||
569 | #define OMAP4_UART1_DR0_SC_MASK (0x3 << 8) | ||
570 | #define OMAP4_UART3_DR0_SC_SHIFT 6 | ||
571 | #define OMAP4_UART3_DR0_SC_MASK (0x3 << 6) | ||
572 | #define OMAP4_UART3_DR1_SC_SHIFT 4 | ||
573 | #define OMAP4_UART3_DR1_SC_MASK (0x3 << 4) | ||
574 | #define OMAP4_UNIPRO_DR0_SC_SHIFT 2 | ||
575 | #define OMAP4_UNIPRO_DR0_SC_MASK (0x3 << 2) | ||
576 | #define OMAP4_UNIPRO_DR1_SC_SHIFT 0 | ||
577 | #define OMAP4_UNIPRO_DR1_SC_MASK (0x3 << 0) | ||
578 | |||
579 | /* CONTROL_SMART1IO_PADCONF_1 */ | ||
580 | #define OMAP4_ABE_DR0_LB_SHIFT 30 | ||
581 | #define OMAP4_ABE_DR0_LB_MASK (0x3 << 30) | ||
582 | #define OMAP4_CAM_DR0_LB_SHIFT 28 | ||
583 | #define OMAP4_CAM_DR0_LB_MASK (0x3 << 28) | ||
584 | #define OMAP4_FREF_DR2_LB_SHIFT 26 | ||
585 | #define OMAP4_FREF_DR2_LB_MASK (0x3 << 26) | ||
586 | #define OMAP4_FREF_DR3_LB_SHIFT 24 | ||
587 | #define OMAP4_FREF_DR3_LB_MASK (0x3 << 24) | ||
588 | #define OMAP4_GPIO_DR8_LB_SHIFT 22 | ||
589 | #define OMAP4_GPIO_DR8_LB_MASK (0x3 << 22) | ||
590 | #define OMAP4_GPIO_DR9_LB_SHIFT 20 | ||
591 | #define OMAP4_GPIO_DR9_LB_MASK (0x3 << 20) | ||
592 | #define OMAP4_GPMC_DR2_LB_SHIFT 18 | ||
593 | #define OMAP4_GPMC_DR2_LB_MASK (0x3 << 18) | ||
594 | #define OMAP4_GPMC_DR3_LB_SHIFT 16 | ||
595 | #define OMAP4_GPMC_DR3_LB_MASK (0x3 << 16) | ||
596 | #define OMAP4_GPMC_DR6_LB_SHIFT 14 | ||
597 | #define OMAP4_GPMC_DR6_LB_MASK (0x3 << 14) | ||
598 | #define OMAP4_HDMI_DR0_LB_SHIFT 12 | ||
599 | #define OMAP4_HDMI_DR0_LB_MASK (0x3 << 12) | ||
600 | #define OMAP4_MCSPI1_DR0_LB_SHIFT 10 | ||
601 | #define OMAP4_MCSPI1_DR0_LB_MASK (0x3 << 10) | ||
602 | #define OMAP4_UART1_DR0_LB_SHIFT 8 | ||
603 | #define OMAP4_UART1_DR0_LB_MASK (0x3 << 8) | ||
604 | #define OMAP4_UART3_DR0_LB_SHIFT 6 | ||
605 | #define OMAP4_UART3_DR0_LB_MASK (0x3 << 6) | ||
606 | #define OMAP4_UART3_DR1_LB_SHIFT 4 | ||
607 | #define OMAP4_UART3_DR1_LB_MASK (0x3 << 4) | ||
608 | #define OMAP4_UNIPRO_DR0_LB_SHIFT 2 | ||
609 | #define OMAP4_UNIPRO_DR0_LB_MASK (0x3 << 2) | ||
610 | #define OMAP4_UNIPRO_DR1_LB_SHIFT 0 | ||
611 | #define OMAP4_UNIPRO_DR1_LB_MASK (0x3 << 0) | ||
612 | |||
613 | /* CONTROL_SMART2IO_PADCONF_0 */ | ||
614 | #define OMAP4_C2C_DR0_LB_SHIFT 31 | ||
615 | #define OMAP4_C2C_DR0_LB_MASK (1 << 31) | ||
616 | #define OMAP4_DPM_DR1_LB_SHIFT 30 | ||
617 | #define OMAP4_DPM_DR1_LB_MASK (1 << 30) | ||
618 | #define OMAP4_DPM_DR2_LB_SHIFT 29 | ||
619 | #define OMAP4_DPM_DR2_LB_MASK (1 << 29) | ||
620 | #define OMAP4_DPM_DR3_LB_SHIFT 28 | ||
621 | #define OMAP4_DPM_DR3_LB_MASK (1 << 28) | ||
622 | #define OMAP4_GPIO_DR0_LB_SHIFT 27 | ||
623 | #define OMAP4_GPIO_DR0_LB_MASK (1 << 27) | ||
624 | #define OMAP4_GPIO_DR1_LB_SHIFT 26 | ||
625 | #define OMAP4_GPIO_DR1_LB_MASK (1 << 26) | ||
626 | #define OMAP4_GPIO_DR10_LB_SHIFT 25 | ||
627 | #define OMAP4_GPIO_DR10_LB_MASK (1 << 25) | ||
628 | #define OMAP4_GPIO_DR2_LB_SHIFT 24 | ||
629 | #define OMAP4_GPIO_DR2_LB_MASK (1 << 24) | ||
630 | #define OMAP4_GPMC_DR0_LB_SHIFT 23 | ||
631 | #define OMAP4_GPMC_DR0_LB_MASK (1 << 23) | ||
632 | #define OMAP4_GPMC_DR1_LB_SHIFT 22 | ||
633 | #define OMAP4_GPMC_DR1_LB_MASK (1 << 22) | ||
634 | #define OMAP4_GPMC_DR4_LB_SHIFT 21 | ||
635 | #define OMAP4_GPMC_DR4_LB_MASK (1 << 21) | ||
636 | #define OMAP4_GPMC_DR5_LB_SHIFT 20 | ||
637 | #define OMAP4_GPMC_DR5_LB_MASK (1 << 20) | ||
638 | #define OMAP4_GPMC_DR7_LB_SHIFT 19 | ||
639 | #define OMAP4_GPMC_DR7_LB_MASK (1 << 19) | ||
640 | #define OMAP4_HSI2_DR0_LB_SHIFT 18 | ||
641 | #define OMAP4_HSI2_DR0_LB_MASK (1 << 18) | ||
642 | #define OMAP4_HSI2_DR1_LB_SHIFT 17 | ||
643 | #define OMAP4_HSI2_DR1_LB_MASK (1 << 17) | ||
644 | #define OMAP4_HSI2_DR2_LB_SHIFT 16 | ||
645 | #define OMAP4_HSI2_DR2_LB_MASK (1 << 16) | ||
646 | #define OMAP4_KPD_DR0_LB_SHIFT 15 | ||
647 | #define OMAP4_KPD_DR0_LB_MASK (1 << 15) | ||
648 | #define OMAP4_KPD_DR1_LB_SHIFT 14 | ||
649 | #define OMAP4_KPD_DR1_LB_MASK (1 << 14) | ||
650 | #define OMAP4_PDM_DR0_LB_SHIFT 13 | ||
651 | #define OMAP4_PDM_DR0_LB_MASK (1 << 13) | ||
652 | #define OMAP4_SDMMC2_DR0_LB_SHIFT 12 | ||
653 | #define OMAP4_SDMMC2_DR0_LB_MASK (1 << 12) | ||
654 | #define OMAP4_SDMMC3_DR0_LB_SHIFT 11 | ||
655 | #define OMAP4_SDMMC3_DR0_LB_MASK (1 << 11) | ||
656 | #define OMAP4_SDMMC4_DR0_LB_SHIFT 10 | ||
657 | #define OMAP4_SDMMC4_DR0_LB_MASK (1 << 10) | ||
658 | #define OMAP4_SDMMC4_DR1_LB_SHIFT 9 | ||
659 | #define OMAP4_SDMMC4_DR1_LB_MASK (1 << 9) | ||
660 | #define OMAP4_SPI3_DR0_LB_SHIFT 8 | ||
661 | #define OMAP4_SPI3_DR0_LB_MASK (1 << 8) | ||
662 | #define OMAP4_SPI3_DR1_LB_SHIFT 7 | ||
663 | #define OMAP4_SPI3_DR1_LB_MASK (1 << 7) | ||
664 | #define OMAP4_UART3_DR2_LB_SHIFT 6 | ||
665 | #define OMAP4_UART3_DR2_LB_MASK (1 << 6) | ||
666 | #define OMAP4_UART3_DR3_LB_SHIFT 5 | ||
667 | #define OMAP4_UART3_DR3_LB_MASK (1 << 5) | ||
668 | #define OMAP4_UART3_DR4_LB_SHIFT 4 | ||
669 | #define OMAP4_UART3_DR4_LB_MASK (1 << 4) | ||
670 | #define OMAP4_UART3_DR5_LB_SHIFT 3 | ||
671 | #define OMAP4_UART3_DR5_LB_MASK (1 << 3) | ||
672 | #define OMAP4_USBA0_DR1_LB_SHIFT 2 | ||
673 | #define OMAP4_USBA0_DR1_LB_MASK (1 << 2) | ||
674 | #define OMAP4_USBA_DR2_LB_SHIFT 1 | ||
675 | #define OMAP4_USBA_DR2_LB_MASK (1 << 1) | ||
676 | |||
677 | /* CONTROL_SMART2IO_PADCONF_1 */ | ||
678 | #define OMAP4_USBB1_DR0_LB_SHIFT 31 | ||
679 | #define OMAP4_USBB1_DR0_LB_MASK (1 << 31) | ||
680 | #define OMAP4_USBB2_DR0_LB_SHIFT 30 | ||
681 | #define OMAP4_USBB2_DR0_LB_MASK (1 << 30) | ||
682 | #define OMAP4_USBA0_DR0_LB_SHIFT 29 | ||
683 | #define OMAP4_USBA0_DR0_LB_MASK (1 << 29) | ||
684 | |||
685 | /* CONTROL_SMART3IO_PADCONF_0 */ | ||
686 | #define OMAP4_DMIC_DR0_MB_SHIFT 30 | ||
687 | #define OMAP4_DMIC_DR0_MB_MASK (0x3 << 30) | ||
688 | #define OMAP4_GPIO_DR3_MB_SHIFT 28 | ||
689 | #define OMAP4_GPIO_DR3_MB_MASK (0x3 << 28) | ||
690 | #define OMAP4_GPIO_DR4_MB_SHIFT 26 | ||
691 | #define OMAP4_GPIO_DR4_MB_MASK (0x3 << 26) | ||
692 | #define OMAP4_GPIO_DR5_MB_SHIFT 24 | ||
693 | #define OMAP4_GPIO_DR5_MB_MASK (0x3 << 24) | ||
694 | #define OMAP4_GPIO_DR6_MB_SHIFT 22 | ||
695 | #define OMAP4_GPIO_DR6_MB_MASK (0x3 << 22) | ||
696 | #define OMAP4_HSI_DR1_MB_SHIFT 20 | ||
697 | #define OMAP4_HSI_DR1_MB_MASK (0x3 << 20) | ||
698 | #define OMAP4_HSI_DR2_MB_SHIFT 18 | ||
699 | #define OMAP4_HSI_DR2_MB_MASK (0x3 << 18) | ||
700 | #define OMAP4_HSI_DR3_MB_SHIFT 16 | ||
701 | #define OMAP4_HSI_DR3_MB_MASK (0x3 << 16) | ||
702 | #define OMAP4_MCBSP2_DR0_MB_SHIFT 14 | ||
703 | #define OMAP4_MCBSP2_DR0_MB_MASK (0x3 << 14) | ||
704 | #define OMAP4_MCSPI4_DR0_MB_SHIFT 12 | ||
705 | #define OMAP4_MCSPI4_DR0_MB_MASK (0x3 << 12) | ||
706 | #define OMAP4_MCSPI4_DR1_MB_SHIFT 10 | ||
707 | #define OMAP4_MCSPI4_DR1_MB_MASK (0x3 << 10) | ||
708 | #define OMAP4_SDMMC3_DR0_MB_SHIFT 8 | ||
709 | #define OMAP4_SDMMC3_DR0_MB_MASK (0x3 << 8) | ||
710 | #define OMAP4_SPI2_DR0_MB_SHIFT 0 | ||
711 | #define OMAP4_SPI2_DR0_MB_MASK (0x3 << 0) | ||
712 | |||
713 | /* CONTROL_SMART3IO_PADCONF_1 */ | ||
714 | #define OMAP4_SPI2_DR1_MB_SHIFT 30 | ||
715 | #define OMAP4_SPI2_DR1_MB_MASK (0x3 << 30) | ||
716 | #define OMAP4_SPI2_DR2_MB_SHIFT 28 | ||
717 | #define OMAP4_SPI2_DR2_MB_MASK (0x3 << 28) | ||
718 | #define OMAP4_UART2_DR0_MB_SHIFT 26 | ||
719 | #define OMAP4_UART2_DR0_MB_MASK (0x3 << 26) | ||
720 | #define OMAP4_UART2_DR1_MB_SHIFT 24 | ||
721 | #define OMAP4_UART2_DR1_MB_MASK (0x3 << 24) | ||
722 | #define OMAP4_UART4_DR0_MB_SHIFT 22 | ||
723 | #define OMAP4_UART4_DR0_MB_MASK (0x3 << 22) | ||
724 | #define OMAP4_HSI_DR0_MB_SHIFT 20 | ||
725 | #define OMAP4_HSI_DR0_MB_MASK (0x3 << 20) | ||
726 | |||
727 | /* CONTROL_SMART3IO_PADCONF_2 */ | ||
728 | #define OMAP4_DMIC_DR0_LB_SHIFT 31 | ||
729 | #define OMAP4_DMIC_DR0_LB_MASK (1 << 31) | ||
730 | #define OMAP4_GPIO_DR3_LB_SHIFT 30 | ||
731 | #define OMAP4_GPIO_DR3_LB_MASK (1 << 30) | ||
732 | #define OMAP4_GPIO_DR4_LB_SHIFT 29 | ||
733 | #define OMAP4_GPIO_DR4_LB_MASK (1 << 29) | ||
734 | #define OMAP4_GPIO_DR5_LB_SHIFT 28 | ||
735 | #define OMAP4_GPIO_DR5_LB_MASK (1 << 28) | ||
736 | #define OMAP4_GPIO_DR6_LB_SHIFT 27 | ||
737 | #define OMAP4_GPIO_DR6_LB_MASK (1 << 27) | ||
738 | #define OMAP4_HSI_DR1_LB_SHIFT 26 | ||
739 | #define OMAP4_HSI_DR1_LB_MASK (1 << 26) | ||
740 | #define OMAP4_HSI_DR2_LB_SHIFT 25 | ||
741 | #define OMAP4_HSI_DR2_LB_MASK (1 << 25) | ||
742 | #define OMAP4_HSI_DR3_LB_SHIFT 24 | ||
743 | #define OMAP4_HSI_DR3_LB_MASK (1 << 24) | ||
744 | #define OMAP4_MCBSP2_DR0_LB_SHIFT 23 | ||
745 | #define OMAP4_MCBSP2_DR0_LB_MASK (1 << 23) | ||
746 | #define OMAP4_MCSPI4_DR0_LB_SHIFT 22 | ||
747 | #define OMAP4_MCSPI4_DR0_LB_MASK (1 << 22) | ||
748 | #define OMAP4_MCSPI4_DR1_LB_SHIFT 21 | ||
749 | #define OMAP4_MCSPI4_DR1_LB_MASK (1 << 21) | ||
750 | #define OMAP4_SLIMBUS2_DR0_LB_SHIFT 18 | ||
751 | #define OMAP4_SLIMBUS2_DR0_LB_MASK (1 << 18) | ||
752 | #define OMAP4_SPI2_DR0_LB_SHIFT 16 | ||
753 | #define OMAP4_SPI2_DR0_LB_MASK (1 << 16) | ||
754 | #define OMAP4_SPI2_DR1_LB_SHIFT 15 | ||
755 | #define OMAP4_SPI2_DR1_LB_MASK (1 << 15) | ||
756 | #define OMAP4_SPI2_DR2_LB_SHIFT 14 | ||
757 | #define OMAP4_SPI2_DR2_LB_MASK (1 << 14) | ||
758 | #define OMAP4_UART2_DR0_LB_SHIFT 13 | ||
759 | #define OMAP4_UART2_DR0_LB_MASK (1 << 13) | ||
760 | #define OMAP4_UART2_DR1_LB_SHIFT 12 | ||
761 | #define OMAP4_UART2_DR1_LB_MASK (1 << 12) | ||
762 | #define OMAP4_UART4_DR0_LB_SHIFT 11 | ||
763 | #define OMAP4_UART4_DR0_LB_MASK (1 << 11) | ||
764 | #define OMAP4_HSI_DR0_LB_SHIFT 10 | ||
765 | #define OMAP4_HSI_DR0_LB_MASK (1 << 10) | ||
766 | |||
767 | /* CONTROL_USBB_HSIC */ | ||
768 | #define OMAP4_USBB2_DR1_SR_SHIFT 30 | ||
769 | #define OMAP4_USBB2_DR1_SR_MASK (0x3 << 30) | ||
770 | #define OMAP4_USBB2_DR1_I_SHIFT 27 | ||
771 | #define OMAP4_USBB2_DR1_I_MASK (0x7 << 27) | ||
772 | #define OMAP4_USBB1_DR1_SR_SHIFT 25 | ||
773 | #define OMAP4_USBB1_DR1_SR_MASK (0x3 << 25) | ||
774 | #define OMAP4_USBB1_DR1_I_SHIFT 22 | ||
775 | #define OMAP4_USBB1_DR1_I_MASK (0x7 << 22) | ||
776 | #define OMAP4_USBB1_HSIC_DATA_WD_SHIFT 20 | ||
777 | #define OMAP4_USBB1_HSIC_DATA_WD_MASK (0x3 << 20) | ||
778 | #define OMAP4_USBB1_HSIC_STROBE_WD_SHIFT 18 | ||
779 | #define OMAP4_USBB1_HSIC_STROBE_WD_MASK (0x3 << 18) | ||
780 | #define OMAP4_USBB2_HSIC_DATA_WD_SHIFT 16 | ||
781 | #define OMAP4_USBB2_HSIC_DATA_WD_MASK (0x3 << 16) | ||
782 | #define OMAP4_USBB2_HSIC_STROBE_WD_SHIFT 14 | ||
783 | #define OMAP4_USBB2_HSIC_STROBE_WD_MASK (0x3 << 14) | ||
784 | #define OMAP4_USBB1_HSIC_DATA_OFFMODE_WD_ENABLE_SHIFT 13 | ||
785 | #define OMAP4_USBB1_HSIC_DATA_OFFMODE_WD_ENABLE_MASK (1 << 13) | ||
786 | #define OMAP4_USBB1_HSIC_DATA_OFFMODE_WD_SHIFT 11 | ||
787 | #define OMAP4_USBB1_HSIC_DATA_OFFMODE_WD_MASK (0x3 << 11) | ||
788 | #define OMAP4_USBB1_HSIC_STROBE_OFFMODE_WD_ENABLE_SHIFT 10 | ||
789 | #define OMAP4_USBB1_HSIC_STROBE_OFFMODE_WD_ENABLE_MASK (1 << 10) | ||
790 | #define OMAP4_USBB1_HSIC_STROBE_OFFMODE_WD_SHIFT 8 | ||
791 | #define OMAP4_USBB1_HSIC_STROBE_OFFMODE_WD_MASK (0x3 << 8) | ||
792 | #define OMAP4_USBB2_HSIC_DATA_OFFMODE_WD_ENABLE_SHIFT 7 | ||
793 | #define OMAP4_USBB2_HSIC_DATA_OFFMODE_WD_ENABLE_MASK (1 << 7) | ||
794 | #define OMAP4_USBB2_HSIC_DATA_OFFMODE_WD_SHIFT 5 | ||
795 | #define OMAP4_USBB2_HSIC_DATA_OFFMODE_WD_MASK (0x3 << 5) | ||
796 | #define OMAP4_USBB2_HSIC_STROBE_OFFMODE_WD_ENABLE_SHIFT 4 | ||
797 | #define OMAP4_USBB2_HSIC_STROBE_OFFMODE_WD_ENABLE_MASK (1 << 4) | ||
798 | #define OMAP4_USBB2_HSIC_STROBE_OFFMODE_WD_SHIFT 2 | ||
799 | #define OMAP4_USBB2_HSIC_STROBE_OFFMODE_WD_MASK (0x3 << 2) | ||
800 | |||
801 | /* CONTROL_SLIMBUS */ | ||
802 | #define OMAP4_SLIMBUS1_DR0_MB_SHIFT 30 | ||
803 | #define OMAP4_SLIMBUS1_DR0_MB_MASK (0x3 << 30) | ||
804 | #define OMAP4_SLIMBUS1_DR1_MB_SHIFT 28 | ||
805 | #define OMAP4_SLIMBUS1_DR1_MB_MASK (0x3 << 28) | ||
806 | #define OMAP4_SLIMBUS2_DR0_MB_SHIFT 26 | ||
807 | #define OMAP4_SLIMBUS2_DR0_MB_MASK (0x3 << 26) | ||
808 | #define OMAP4_SLIMBUS2_DR1_MB_SHIFT 24 | ||
809 | #define OMAP4_SLIMBUS2_DR1_MB_MASK (0x3 << 24) | ||
810 | #define OMAP4_SLIMBUS2_DR2_MB_SHIFT 22 | ||
811 | #define OMAP4_SLIMBUS2_DR2_MB_MASK (0x3 << 22) | ||
812 | #define OMAP4_SLIMBUS2_DR3_MB_SHIFT 20 | ||
813 | #define OMAP4_SLIMBUS2_DR3_MB_MASK (0x3 << 20) | ||
814 | #define OMAP4_SLIMBUS1_DR0_LB_SHIFT 19 | ||
815 | #define OMAP4_SLIMBUS1_DR0_LB_MASK (1 << 19) | ||
816 | #define OMAP4_SLIMBUS2_DR1_LB_SHIFT 18 | ||
817 | #define OMAP4_SLIMBUS2_DR1_LB_MASK (1 << 18) | ||
818 | |||
819 | /* CONTROL_PBIASLITE */ | ||
820 | #define OMAP4_USIM_PBIASLITE_HIZ_MODE_SHIFT 31 | ||
821 | #define OMAP4_USIM_PBIASLITE_HIZ_MODE_MASK (1 << 31) | ||
822 | #define OMAP4_USIM_PBIASLITE_SUPPLY_HI_OUT_SHIFT 30 | ||
823 | #define OMAP4_USIM_PBIASLITE_SUPPLY_HI_OUT_MASK (1 << 30) | ||
824 | #define OMAP4_USIM_PBIASLITE_VMODE_ERROR_SHIFT 29 | ||
825 | #define OMAP4_USIM_PBIASLITE_VMODE_ERROR_MASK (1 << 29) | ||
826 | #define OMAP4_USIM_PBIASLITE_PWRDNZ_SHIFT 28 | ||
827 | #define OMAP4_USIM_PBIASLITE_PWRDNZ_MASK (1 << 28) | ||
828 | #define OMAP4_USIM_PBIASLITE_VMODE_SHIFT 27 | ||
829 | #define OMAP4_USIM_PBIASLITE_VMODE_MASK (1 << 27) | ||
830 | #define OMAP4_MMC1_PWRDNZ_SHIFT 26 | ||
831 | #define OMAP4_MMC1_PWRDNZ_MASK (1 << 26) | ||
832 | #define OMAP4_MMC1_PBIASLITE_HIZ_MODE_SHIFT 25 | ||
833 | #define OMAP4_MMC1_PBIASLITE_HIZ_MODE_MASK (1 << 25) | ||
834 | #define OMAP4_MMC1_PBIASLITE_SUPPLY_HI_OUT_SHIFT 24 | ||
835 | #define OMAP4_MMC1_PBIASLITE_SUPPLY_HI_OUT_MASK (1 << 24) | ||
836 | #define OMAP4_MMC1_PBIASLITE_VMODE_ERROR_SHIFT 23 | ||
837 | #define OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK (1 << 23) | ||
838 | #define OMAP4_MMC1_PBIASLITE_PWRDNZ_SHIFT 22 | ||
839 | #define OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK (1 << 22) | ||
840 | #define OMAP4_MMC1_PBIASLITE_VMODE_SHIFT 21 | ||
841 | #define OMAP4_MMC1_PBIASLITE_VMODE_MASK (1 << 21) | ||
842 | #define OMAP4_USBC1_ICUSB_PWRDNZ_SHIFT 20 | ||
843 | #define OMAP4_USBC1_ICUSB_PWRDNZ_MASK (1 << 20) | ||
844 | |||
845 | /* CONTROL_I2C_0 */ | ||
846 | #define OMAP4_I2C4_SDA_GLFENB_SHIFT 31 | ||
847 | #define OMAP4_I2C4_SDA_GLFENB_MASK (1 << 31) | ||
848 | #define OMAP4_I2C4_SDA_LOAD_BITS_SHIFT 29 | ||
849 | #define OMAP4_I2C4_SDA_LOAD_BITS_MASK (0x3 << 29) | ||
850 | #define OMAP4_I2C4_SDA_PULLUPRESX_SHIFT 28 | ||
851 | #define OMAP4_I2C4_SDA_PULLUPRESX_MASK (1 << 28) | ||
852 | #define OMAP4_I2C3_SDA_GLFENB_SHIFT 27 | ||
853 | #define OMAP4_I2C3_SDA_GLFENB_MASK (1 << 27) | ||
854 | #define OMAP4_I2C3_SDA_LOAD_BITS_SHIFT 25 | ||
855 | #define OMAP4_I2C3_SDA_LOAD_BITS_MASK (0x3 << 25) | ||
856 | #define OMAP4_I2C3_SDA_PULLUPRESX_SHIFT 24 | ||
857 | #define OMAP4_I2C3_SDA_PULLUPRESX_MASK (1 << 24) | ||
858 | #define OMAP4_I2C2_SDA_GLFENB_SHIFT 23 | ||
859 | #define OMAP4_I2C2_SDA_GLFENB_MASK (1 << 23) | ||
860 | #define OMAP4_I2C2_SDA_LOAD_BITS_SHIFT 21 | ||
861 | #define OMAP4_I2C2_SDA_LOAD_BITS_MASK (0x3 << 21) | ||
862 | #define OMAP4_I2C2_SDA_PULLUPRESX_SHIFT 20 | ||
863 | #define OMAP4_I2C2_SDA_PULLUPRESX_MASK (1 << 20) | ||
864 | #define OMAP4_I2C1_SDA_GLFENB_SHIFT 19 | ||
865 | #define OMAP4_I2C1_SDA_GLFENB_MASK (1 << 19) | ||
866 | #define OMAP4_I2C1_SDA_LOAD_BITS_SHIFT 17 | ||
867 | #define OMAP4_I2C1_SDA_LOAD_BITS_MASK (0x3 << 17) | ||
868 | #define OMAP4_I2C1_SDA_PULLUPRESX_SHIFT 16 | ||
869 | #define OMAP4_I2C1_SDA_PULLUPRESX_MASK (1 << 16) | ||
870 | #define OMAP4_I2C4_SCL_GLFENB_SHIFT 15 | ||
871 | #define OMAP4_I2C4_SCL_GLFENB_MASK (1 << 15) | ||
872 | #define OMAP4_I2C4_SCL_LOAD_BITS_SHIFT 13 | ||
873 | #define OMAP4_I2C4_SCL_LOAD_BITS_MASK (0x3 << 13) | ||
874 | #define OMAP4_I2C4_SCL_PULLUPRESX_SHIFT 12 | ||
875 | #define OMAP4_I2C4_SCL_PULLUPRESX_MASK (1 << 12) | ||
876 | #define OMAP4_I2C3_SCL_GLFENB_SHIFT 11 | ||
877 | #define OMAP4_I2C3_SCL_GLFENB_MASK (1 << 11) | ||
878 | #define OMAP4_I2C3_SCL_LOAD_BITS_SHIFT 9 | ||
879 | #define OMAP4_I2C3_SCL_LOAD_BITS_MASK (0x3 << 9) | ||
880 | #define OMAP4_I2C3_SCL_PULLUPRESX_SHIFT 8 | ||
881 | #define OMAP4_I2C3_SCL_PULLUPRESX_MASK (1 << 8) | ||
882 | #define OMAP4_I2C2_SCL_GLFENB_SHIFT 7 | ||
883 | #define OMAP4_I2C2_SCL_GLFENB_MASK (1 << 7) | ||
884 | #define OMAP4_I2C2_SCL_LOAD_BITS_SHIFT 5 | ||
885 | #define OMAP4_I2C2_SCL_LOAD_BITS_MASK (0x3 << 5) | ||
886 | #define OMAP4_I2C2_SCL_PULLUPRESX_SHIFT 4 | ||
887 | #define OMAP4_I2C2_SCL_PULLUPRESX_MASK (1 << 4) | ||
888 | #define OMAP4_I2C1_SCL_GLFENB_SHIFT 3 | ||
889 | #define OMAP4_I2C1_SCL_GLFENB_MASK (1 << 3) | ||
890 | #define OMAP4_I2C1_SCL_LOAD_BITS_SHIFT 1 | ||
891 | #define OMAP4_I2C1_SCL_LOAD_BITS_MASK (0x3 << 1) | ||
892 | #define OMAP4_I2C1_SCL_PULLUPRESX_SHIFT 0 | ||
893 | #define OMAP4_I2C1_SCL_PULLUPRESX_MASK (1 << 0) | ||
894 | |||
895 | /* CONTROL_CAMERA_RX */ | ||
896 | #define OMAP4_CAMERARX_UNIPRO_CTRLCLKEN_SHIFT 31 | ||
897 | #define OMAP4_CAMERARX_UNIPRO_CTRLCLKEN_MASK (1 << 31) | ||
898 | #define OMAP4_CAMERARX_CSI22_LANEENABLE_SHIFT 29 | ||
899 | #define OMAP4_CAMERARX_CSI22_LANEENABLE_MASK (0x3 << 29) | ||
900 | #define OMAP4_CAMERARX_CSI21_LANEENABLE_SHIFT 24 | ||
901 | #define OMAP4_CAMERARX_CSI21_LANEENABLE_MASK (0x1f << 24) | ||
902 | #define OMAP4_CAMERARX_UNIPRO_CAMMODE_SHIFT 22 | ||
903 | #define OMAP4_CAMERARX_UNIPRO_CAMMODE_MASK (0x3 << 22) | ||
904 | #define OMAP4_CAMERARX_CSI22_CTRLCLKEN_SHIFT 21 | ||
905 | #define OMAP4_CAMERARX_CSI22_CTRLCLKEN_MASK (1 << 21) | ||
906 | #define OMAP4_CAMERARX_CSI22_CAMMODE_SHIFT 19 | ||
907 | #define OMAP4_CAMERARX_CSI22_CAMMODE_MASK (0x3 << 19) | ||
908 | #define OMAP4_CAMERARX_CSI21_CTRLCLKEN_SHIFT 18 | ||
909 | #define OMAP4_CAMERARX_CSI21_CTRLCLKEN_MASK (1 << 18) | ||
910 | #define OMAP4_CAMERARX_CSI21_CAMMODE_SHIFT 16 | ||
911 | #define OMAP4_CAMERARX_CSI21_CAMMODE_MASK (0x3 << 16) | ||
912 | |||
913 | /* CONTROL_AVDAC */ | ||
914 | #define OMAP4_AVDAC_ACEN_SHIFT 31 | ||
915 | #define OMAP4_AVDAC_ACEN_MASK (1 << 31) | ||
916 | #define OMAP4_AVDAC_TVOUTBYPASS_SHIFT 30 | ||
917 | #define OMAP4_AVDAC_TVOUTBYPASS_MASK (1 << 30) | ||
918 | #define OMAP4_AVDAC_INPUTINV_SHIFT 29 | ||
919 | #define OMAP4_AVDAC_INPUTINV_MASK (1 << 29) | ||
920 | #define OMAP4_AVDAC_CTL_SHIFT 13 | ||
921 | #define OMAP4_AVDAC_CTL_MASK (0xffff << 13) | ||
922 | #define OMAP4_AVDAC_CTL_WR_ACK_SHIFT 12 | ||
923 | #define OMAP4_AVDAC_CTL_WR_ACK_MASK (1 << 12) | ||
924 | |||
925 | /* CONTROL_HDMI_TX_PHY */ | ||
926 | #define OMAP4_HDMITXPHY_PADORDER_SHIFT 31 | ||
927 | #define OMAP4_HDMITXPHY_PADORDER_MASK (1 << 31) | ||
928 | #define OMAP4_HDMITXPHY_TXVALID_SHIFT 30 | ||
929 | #define OMAP4_HDMITXPHY_TXVALID_MASK (1 << 30) | ||
930 | #define OMAP4_HDMITXPHY_ENBYPASSCLK_SHIFT 29 | ||
931 | #define OMAP4_HDMITXPHY_ENBYPASSCLK_MASK (1 << 29) | ||
932 | #define OMAP4_HDMITXPHY_PD_PULLUPDET_SHIFT 28 | ||
933 | #define OMAP4_HDMITXPHY_PD_PULLUPDET_MASK (1 << 28) | ||
934 | |||
935 | /* CONTROL_MMC2 */ | ||
936 | #define OMAP4_MMC2_FEEDBACK_CLK_SEL_SHIFT 31 | ||
937 | #define OMAP4_MMC2_FEEDBACK_CLK_SEL_MASK (1 << 31) | ||
938 | |||
939 | /* CONTROL_DSIPHY */ | ||
940 | #define OMAP4_DSI2_LANEENABLE_SHIFT 29 | ||
941 | #define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) | ||
942 | #define OMAP4_DSI1_LANEENABLE_SHIFT 24 | ||
943 | #define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) | ||
944 | #define OMAP4_DSI1_PIPD_SHIFT 19 | ||
945 | #define OMAP4_DSI1_PIPD_MASK (0x1f << 19) | ||
946 | #define OMAP4_DSI2_PIPD_SHIFT 14 | ||
947 | #define OMAP4_DSI2_PIPD_MASK (0x1f << 14) | ||
948 | |||
949 | /* CONTROL_MCBSPLP */ | ||
950 | #define OMAP4_ALBCTRLRX_FSX_SHIFT 31 | ||
951 | #define OMAP4_ALBCTRLRX_FSX_MASK (1 << 31) | ||
952 | #define OMAP4_ALBCTRLRX_CLKX_SHIFT 30 | ||
953 | #define OMAP4_ALBCTRLRX_CLKX_MASK (1 << 30) | ||
954 | #define OMAP4_ABE_MCBSP1_DR_EN_SHIFT 29 | ||
955 | #define OMAP4_ABE_MCBSP1_DR_EN_MASK (1 << 29) | ||
956 | |||
957 | /* CONTROL_USB2PHYCORE */ | ||
958 | #define OMAP4_USB2PHY_AUTORESUME_EN_SHIFT 31 | ||
959 | #define OMAP4_USB2PHY_AUTORESUME_EN_MASK (1 << 31) | ||
960 | #define OMAP4_USB2PHY_DISCHGDET_SHIFT 30 | ||
961 | #define OMAP4_USB2PHY_DISCHGDET_MASK (1 << 30) | ||
962 | #define OMAP4_USB2PHY_GPIOMODE_SHIFT 29 | ||
963 | #define OMAP4_USB2PHY_GPIOMODE_MASK (1 << 29) | ||
964 | #define OMAP4_USB2PHY_CHG_DET_EXT_CTL_SHIFT 28 | ||
965 | #define OMAP4_USB2PHY_CHG_DET_EXT_CTL_MASK (1 << 28) | ||
966 | #define OMAP4_USB2PHY_RDM_PD_CHGDET_EN_SHIFT 27 | ||
967 | #define OMAP4_USB2PHY_RDM_PD_CHGDET_EN_MASK (1 << 27) | ||
968 | #define OMAP4_USB2PHY_RDP_PU_CHGDET_EN_SHIFT 26 | ||
969 | #define OMAP4_USB2PHY_RDP_PU_CHGDET_EN_MASK (1 << 26) | ||
970 | #define OMAP4_USB2PHY_CHG_VSRC_EN_SHIFT 25 | ||
971 | #define OMAP4_USB2PHY_CHG_VSRC_EN_MASK (1 << 25) | ||
972 | #define OMAP4_USB2PHY_CHG_ISINK_EN_SHIFT 24 | ||
973 | #define OMAP4_USB2PHY_CHG_ISINK_EN_MASK (1 << 24) | ||
974 | #define OMAP4_USB2PHY_CHG_DET_STATUS_SHIFT 21 | ||
975 | #define OMAP4_USB2PHY_CHG_DET_STATUS_MASK (0x7 << 21) | ||
976 | #define OMAP4_USB2PHY_CHG_DET_DM_COMP_SHIFT 20 | ||
977 | #define OMAP4_USB2PHY_CHG_DET_DM_COMP_MASK (1 << 20) | ||
978 | #define OMAP4_USB2PHY_CHG_DET_DP_COMP_SHIFT 19 | ||
979 | #define OMAP4_USB2PHY_CHG_DET_DP_COMP_MASK (1 << 19) | ||
980 | #define OMAP4_USB2PHY_DATADET_SHIFT 18 | ||
981 | #define OMAP4_USB2PHY_DATADET_MASK (1 << 18) | ||
982 | #define OMAP4_USB2PHY_SINKONDP_SHIFT 17 | ||
983 | #define OMAP4_USB2PHY_SINKONDP_MASK (1 << 17) | ||
984 | #define OMAP4_USB2PHY_SRCONDM_SHIFT 16 | ||
985 | #define OMAP4_USB2PHY_SRCONDM_MASK (1 << 16) | ||
986 | #define OMAP4_USB2PHY_RESTARTCHGDET_SHIFT 15 | ||
987 | #define OMAP4_USB2PHY_RESTARTCHGDET_MASK (1 << 15) | ||
988 | #define OMAP4_USB2PHY_CHGDETDONE_SHIFT 14 | ||
989 | #define OMAP4_USB2PHY_CHGDETDONE_MASK (1 << 14) | ||
990 | #define OMAP4_USB2PHY_CHGDETECTED_SHIFT 13 | ||
991 | #define OMAP4_USB2PHY_CHGDETECTED_MASK (1 << 13) | ||
992 | #define OMAP4_USB2PHY_MCPCPUEN_SHIFT 12 | ||
993 | #define OMAP4_USB2PHY_MCPCPUEN_MASK (1 << 12) | ||
994 | #define OMAP4_USB2PHY_MCPCMODEEN_SHIFT 11 | ||
995 | #define OMAP4_USB2PHY_MCPCMODEEN_MASK (1 << 11) | ||
996 | #define OMAP4_USB2PHY_RESETDONEMCLK_SHIFT 10 | ||
997 | #define OMAP4_USB2PHY_RESETDONEMCLK_MASK (1 << 10) | ||
998 | #define OMAP4_USB2PHY_UTMIRESETDONE_SHIFT 9 | ||
999 | #define OMAP4_USB2PHY_UTMIRESETDONE_MASK (1 << 9) | ||
1000 | #define OMAP4_USB2PHY_TXBITSTUFFENABLE_SHIFT 8 | ||
1001 | #define OMAP4_USB2PHY_TXBITSTUFFENABLE_MASK (1 << 8) | ||
1002 | #define OMAP4_USB2PHY_DATAPOLARITYN_SHIFT 7 | ||
1003 | #define OMAP4_USB2PHY_DATAPOLARITYN_MASK (1 << 7) | ||
1004 | #define OMAP4_USBDPLL_FREQLOCK_SHIFT 6 | ||
1005 | #define OMAP4_USBDPLL_FREQLOCK_MASK (1 << 6) | ||
1006 | #define OMAP4_USB2PHY_RESETDONETCLK_SHIFT 5 | ||
1007 | #define OMAP4_USB2PHY_RESETDONETCLK_MASK (1 << 5) | ||
1008 | |||
1009 | /* CONTROL_I2C_1 */ | ||
1010 | #define OMAP4_HDMI_DDC_SDA_GLFENB_SHIFT 31 | ||
1011 | #define OMAP4_HDMI_DDC_SDA_GLFENB_MASK (1 << 31) | ||
1012 | #define OMAP4_HDMI_DDC_SDA_LOAD_BITS_SHIFT 29 | ||
1013 | #define OMAP4_HDMI_DDC_SDA_LOAD_BITS_MASK (0x3 << 29) | ||
1014 | #define OMAP4_HDMI_DDC_SDA_PULLUPRESX_SHIFT 28 | ||
1015 | #define OMAP4_HDMI_DDC_SDA_PULLUPRESX_MASK (1 << 28) | ||
1016 | #define OMAP4_HDMI_DDC_SCL_GLFENB_SHIFT 27 | ||
1017 | #define OMAP4_HDMI_DDC_SCL_GLFENB_MASK (1 << 27) | ||
1018 | #define OMAP4_HDMI_DDC_SCL_LOAD_BITS_SHIFT 25 | ||
1019 | #define OMAP4_HDMI_DDC_SCL_LOAD_BITS_MASK (0x3 << 25) | ||
1020 | #define OMAP4_HDMI_DDC_SCL_PULLUPRESX_SHIFT 24 | ||
1021 | #define OMAP4_HDMI_DDC_SCL_PULLUPRESX_MASK (1 << 24) | ||
1022 | #define OMAP4_HDMI_DDC_SDA_HSMODE_SHIFT 23 | ||
1023 | #define OMAP4_HDMI_DDC_SDA_HSMODE_MASK (1 << 23) | ||
1024 | #define OMAP4_HDMI_DDC_SDA_NMODE_SHIFT 22 | ||
1025 | #define OMAP4_HDMI_DDC_SDA_NMODE_MASK (1 << 22) | ||
1026 | #define OMAP4_HDMI_DDC_SCL_HSMODE_SHIFT 21 | ||
1027 | #define OMAP4_HDMI_DDC_SCL_HSMODE_MASK (1 << 21) | ||
1028 | #define OMAP4_HDMI_DDC_SCL_NMODE_SHIFT 20 | ||
1029 | #define OMAP4_HDMI_DDC_SCL_NMODE_MASK (1 << 20) | ||
1030 | |||
1031 | /* CONTROL_MMC1 */ | ||
1032 | #define OMAP4_SDMMC1_PUSTRENGTH_GRP0_SHIFT 31 | ||
1033 | #define OMAP4_SDMMC1_PUSTRENGTH_GRP0_MASK (1 << 31) | ||
1034 | #define OMAP4_SDMMC1_PUSTRENGTH_GRP1_SHIFT 30 | ||
1035 | #define OMAP4_SDMMC1_PUSTRENGTH_GRP1_MASK (1 << 30) | ||
1036 | #define OMAP4_SDMMC1_PUSTRENGTH_GRP2_SHIFT 29 | ||
1037 | #define OMAP4_SDMMC1_PUSTRENGTH_GRP2_MASK (1 << 29) | ||
1038 | #define OMAP4_SDMMC1_PUSTRENGTH_GRP3_SHIFT 28 | ||
1039 | #define OMAP4_SDMMC1_PUSTRENGTH_GRP3_MASK (1 << 28) | ||
1040 | #define OMAP4_SDMMC1_DR0_SPEEDCTRL_SHIFT 27 | ||
1041 | #define OMAP4_SDMMC1_DR0_SPEEDCTRL_MASK (1 << 27) | ||
1042 | #define OMAP4_SDMMC1_DR1_SPEEDCTRL_SHIFT 26 | ||
1043 | #define OMAP4_SDMMC1_DR1_SPEEDCTRL_MASK (1 << 26) | ||
1044 | #define OMAP4_SDMMC1_DR2_SPEEDCTRL_SHIFT 25 | ||
1045 | #define OMAP4_SDMMC1_DR2_SPEEDCTRL_MASK (1 << 25) | ||
1046 | #define OMAP4_USBC1_DR0_SPEEDCTRL_SHIFT 24 | ||
1047 | #define OMAP4_USBC1_DR0_SPEEDCTRL_MASK (1 << 24) | ||
1048 | #define OMAP4_USB_FD_CDEN_SHIFT 23 | ||
1049 | #define OMAP4_USB_FD_CDEN_MASK (1 << 23) | ||
1050 | #define OMAP4_USBC1_ICUSB_DP_PDDIS_SHIFT 22 | ||
1051 | #define OMAP4_USBC1_ICUSB_DP_PDDIS_MASK (1 << 22) | ||
1052 | #define OMAP4_USBC1_ICUSB_DM_PDDIS_SHIFT 21 | ||
1053 | #define OMAP4_USBC1_ICUSB_DM_PDDIS_MASK (1 << 21) | ||
1054 | |||
1055 | /* CONTROL_HSI */ | ||
1056 | #define OMAP4_HSI1_CALLOOP_SEL_SHIFT 31 | ||
1057 | #define OMAP4_HSI1_CALLOOP_SEL_MASK (1 << 31) | ||
1058 | #define OMAP4_HSI1_CALMUX_SEL_SHIFT 30 | ||
1059 | #define OMAP4_HSI1_CALMUX_SEL_MASK (1 << 30) | ||
1060 | #define OMAP4_HSI2_CALLOOP_SEL_SHIFT 29 | ||
1061 | #define OMAP4_HSI2_CALLOOP_SEL_MASK (1 << 29) | ||
1062 | #define OMAP4_HSI2_CALMUX_SEL_SHIFT 28 | ||
1063 | #define OMAP4_HSI2_CALMUX_SEL_MASK (1 << 28) | ||
1064 | |||
1065 | /* CONTROL_USB */ | ||
1066 | #define OMAP4_CARKIT_USBA0_ULPIPHY_DAT0_AUTO_EN_SHIFT 31 | ||
1067 | #define OMAP4_CARKIT_USBA0_ULPIPHY_DAT0_AUTO_EN_MASK (1 << 31) | ||
1068 | #define OMAP4_CARKIT_USBA0_ULPIPHY_DAT1_AUTO_EN_SHIFT 30 | ||
1069 | #define OMAP4_CARKIT_USBA0_ULPIPHY_DAT1_AUTO_EN_MASK (1 << 30) | ||
1070 | |||
1071 | /* CONTROL_HDQ */ | ||
1072 | #define OMAP4_HDQ_SIO_PWRDNZ_SHIFT 31 | ||
1073 | #define OMAP4_HDQ_SIO_PWRDNZ_MASK (1 << 31) | ||
1074 | |||
1075 | /* CONTROL_LPDDR2IO1_0 */ | ||
1076 | #define OMAP4_LPDDR2IO1_GR4_SR_SHIFT 30 | ||
1077 | #define OMAP4_LPDDR2IO1_GR4_SR_MASK (0x3 << 30) | ||
1078 | #define OMAP4_LPDDR2IO1_GR4_I_SHIFT 27 | ||
1079 | #define OMAP4_LPDDR2IO1_GR4_I_MASK (0x7 << 27) | ||
1080 | #define OMAP4_LPDDR2IO1_GR4_WD_SHIFT 25 | ||
1081 | #define OMAP4_LPDDR2IO1_GR4_WD_MASK (0x3 << 25) | ||
1082 | #define OMAP4_LPDDR2IO1_GR3_SR_SHIFT 22 | ||
1083 | #define OMAP4_LPDDR2IO1_GR3_SR_MASK (0x3 << 22) | ||
1084 | #define OMAP4_LPDDR2IO1_GR3_I_SHIFT 19 | ||
1085 | #define OMAP4_LPDDR2IO1_GR3_I_MASK (0x7 << 19) | ||
1086 | #define OMAP4_LPDDR2IO1_GR3_WD_SHIFT 17 | ||
1087 | #define OMAP4_LPDDR2IO1_GR3_WD_MASK (0x3 << 17) | ||
1088 | #define OMAP4_LPDDR2IO1_GR2_SR_SHIFT 14 | ||
1089 | #define OMAP4_LPDDR2IO1_GR2_SR_MASK (0x3 << 14) | ||
1090 | #define OMAP4_LPDDR2IO1_GR2_I_SHIFT 11 | ||
1091 | #define OMAP4_LPDDR2IO1_GR2_I_MASK (0x7 << 11) | ||
1092 | #define OMAP4_LPDDR2IO1_GR2_WD_SHIFT 9 | ||
1093 | #define OMAP4_LPDDR2IO1_GR2_WD_MASK (0x3 << 9) | ||
1094 | #define OMAP4_LPDDR2IO1_GR1_SR_SHIFT 6 | ||
1095 | #define OMAP4_LPDDR2IO1_GR1_SR_MASK (0x3 << 6) | ||
1096 | #define OMAP4_LPDDR2IO1_GR1_I_SHIFT 3 | ||
1097 | #define OMAP4_LPDDR2IO1_GR1_I_MASK (0x7 << 3) | ||
1098 | #define OMAP4_LPDDR2IO1_GR1_WD_SHIFT 1 | ||
1099 | #define OMAP4_LPDDR2IO1_GR1_WD_MASK (0x3 << 1) | ||
1100 | |||
1101 | /* CONTROL_LPDDR2IO1_1 */ | ||
1102 | #define OMAP4_LPDDR2IO1_GR8_SR_SHIFT 30 | ||
1103 | #define OMAP4_LPDDR2IO1_GR8_SR_MASK (0x3 << 30) | ||
1104 | #define OMAP4_LPDDR2IO1_GR8_I_SHIFT 27 | ||
1105 | #define OMAP4_LPDDR2IO1_GR8_I_MASK (0x7 << 27) | ||
1106 | #define OMAP4_LPDDR2IO1_GR8_WD_SHIFT 25 | ||
1107 | #define OMAP4_LPDDR2IO1_GR8_WD_MASK (0x3 << 25) | ||
1108 | #define OMAP4_LPDDR2IO1_GR7_SR_SHIFT 22 | ||
1109 | #define OMAP4_LPDDR2IO1_GR7_SR_MASK (0x3 << 22) | ||
1110 | #define OMAP4_LPDDR2IO1_GR7_I_SHIFT 19 | ||
1111 | #define OMAP4_LPDDR2IO1_GR7_I_MASK (0x7 << 19) | ||
1112 | #define OMAP4_LPDDR2IO1_GR7_WD_SHIFT 17 | ||
1113 | #define OMAP4_LPDDR2IO1_GR7_WD_MASK (0x3 << 17) | ||
1114 | #define OMAP4_LPDDR2IO1_GR6_SR_SHIFT 14 | ||
1115 | #define OMAP4_LPDDR2IO1_GR6_SR_MASK (0x3 << 14) | ||
1116 | #define OMAP4_LPDDR2IO1_GR6_I_SHIFT 11 | ||
1117 | #define OMAP4_LPDDR2IO1_GR6_I_MASK (0x7 << 11) | ||
1118 | #define OMAP4_LPDDR2IO1_GR6_WD_SHIFT 9 | ||
1119 | #define OMAP4_LPDDR2IO1_GR6_WD_MASK (0x3 << 9) | ||
1120 | #define OMAP4_LPDDR2IO1_GR5_SR_SHIFT 6 | ||
1121 | #define OMAP4_LPDDR2IO1_GR5_SR_MASK (0x3 << 6) | ||
1122 | #define OMAP4_LPDDR2IO1_GR5_I_SHIFT 3 | ||
1123 | #define OMAP4_LPDDR2IO1_GR5_I_MASK (0x7 << 3) | ||
1124 | #define OMAP4_LPDDR2IO1_GR5_WD_SHIFT 1 | ||
1125 | #define OMAP4_LPDDR2IO1_GR5_WD_MASK (0x3 << 1) | ||
1126 | |||
1127 | /* CONTROL_LPDDR2IO1_2 */ | ||
1128 | #define OMAP4_LPDDR2IO1_GR11_SR_SHIFT 30 | ||
1129 | #define OMAP4_LPDDR2IO1_GR11_SR_MASK (0x3 << 30) | ||
1130 | #define OMAP4_LPDDR2IO1_GR11_I_SHIFT 27 | ||
1131 | #define OMAP4_LPDDR2IO1_GR11_I_MASK (0x7 << 27) | ||
1132 | #define OMAP4_LPDDR2IO1_GR11_WD_SHIFT 25 | ||
1133 | #define OMAP4_LPDDR2IO1_GR11_WD_MASK (0x3 << 25) | ||
1134 | #define OMAP4_LPDDR2IO1_GR10_SR_SHIFT 22 | ||
1135 | #define OMAP4_LPDDR2IO1_GR10_SR_MASK (0x3 << 22) | ||
1136 | #define OMAP4_LPDDR2IO1_GR10_I_SHIFT 19 | ||
1137 | #define OMAP4_LPDDR2IO1_GR10_I_MASK (0x7 << 19) | ||
1138 | #define OMAP4_LPDDR2IO1_GR10_WD_SHIFT 17 | ||
1139 | #define OMAP4_LPDDR2IO1_GR10_WD_MASK (0x3 << 17) | ||
1140 | #define OMAP4_LPDDR2IO1_GR9_SR_SHIFT 14 | ||
1141 | #define OMAP4_LPDDR2IO1_GR9_SR_MASK (0x3 << 14) | ||
1142 | #define OMAP4_LPDDR2IO1_GR9_I_SHIFT 11 | ||
1143 | #define OMAP4_LPDDR2IO1_GR9_I_MASK (0x7 << 11) | ||
1144 | #define OMAP4_LPDDR2IO1_GR9_WD_SHIFT 9 | ||
1145 | #define OMAP4_LPDDR2IO1_GR9_WD_MASK (0x3 << 9) | ||
1146 | |||
1147 | /* CONTROL_LPDDR2IO1_3 */ | ||
1148 | #define OMAP4_LPDDR21_VREF_CA_CCAP0_SHIFT 31 | ||
1149 | #define OMAP4_LPDDR21_VREF_CA_CCAP0_MASK (1 << 31) | ||
1150 | #define OMAP4_LPDDR21_VREF_CA_CCAP1_SHIFT 30 | ||
1151 | #define OMAP4_LPDDR21_VREF_CA_CCAP1_MASK (1 << 30) | ||
1152 | #define OMAP4_LPDDR21_VREF_CA_INT_CCAP0_SHIFT 29 | ||
1153 | #define OMAP4_LPDDR21_VREF_CA_INT_CCAP0_MASK (1 << 29) | ||
1154 | #define OMAP4_LPDDR21_VREF_CA_INT_CCAP1_SHIFT 28 | ||
1155 | #define OMAP4_LPDDR21_VREF_CA_INT_CCAP1_MASK (1 << 28) | ||
1156 | #define OMAP4_LPDDR21_VREF_CA_INT_TAP0_SHIFT 27 | ||
1157 | #define OMAP4_LPDDR21_VREF_CA_INT_TAP0_MASK (1 << 27) | ||
1158 | #define OMAP4_LPDDR21_VREF_CA_INT_TAP1_SHIFT 26 | ||
1159 | #define OMAP4_LPDDR21_VREF_CA_INT_TAP1_MASK (1 << 26) | ||
1160 | #define OMAP4_LPDDR21_VREF_CA_TAP0_SHIFT 25 | ||
1161 | #define OMAP4_LPDDR21_VREF_CA_TAP0_MASK (1 << 25) | ||
1162 | #define OMAP4_LPDDR21_VREF_CA_TAP1_SHIFT 24 | ||
1163 | #define OMAP4_LPDDR21_VREF_CA_TAP1_MASK (1 << 24) | ||
1164 | #define OMAP4_LPDDR21_VREF_DQ0_INT_CCAP0_SHIFT 23 | ||
1165 | #define OMAP4_LPDDR21_VREF_DQ0_INT_CCAP0_MASK (1 << 23) | ||
1166 | #define OMAP4_LPDDR21_VREF_DQ0_INT_CCAP1_SHIFT 22 | ||
1167 | #define OMAP4_LPDDR21_VREF_DQ0_INT_CCAP1_MASK (1 << 22) | ||
1168 | #define OMAP4_LPDDR21_VREF_DQ0_INT_TAP0_SHIFT 21 | ||
1169 | #define OMAP4_LPDDR21_VREF_DQ0_INT_TAP0_MASK (1 << 21) | ||
1170 | #define OMAP4_LPDDR21_VREF_DQ0_INT_TAP1_SHIFT 20 | ||
1171 | #define OMAP4_LPDDR21_VREF_DQ0_INT_TAP1_MASK (1 << 20) | ||
1172 | #define OMAP4_LPDDR21_VREF_DQ1_INT_CCAP0_SHIFT 19 | ||
1173 | #define OMAP4_LPDDR21_VREF_DQ1_INT_CCAP0_MASK (1 << 19) | ||
1174 | #define OMAP4_LPDDR21_VREF_DQ1_INT_CCAP1_SHIFT 18 | ||
1175 | #define OMAP4_LPDDR21_VREF_DQ1_INT_CCAP1_MASK (1 << 18) | ||
1176 | #define OMAP4_LPDDR21_VREF_DQ1_INT_TAP0_SHIFT 17 | ||
1177 | #define OMAP4_LPDDR21_VREF_DQ1_INT_TAP0_MASK (1 << 17) | ||
1178 | #define OMAP4_LPDDR21_VREF_DQ1_INT_TAP1_SHIFT 16 | ||
1179 | #define OMAP4_LPDDR21_VREF_DQ1_INT_TAP1_MASK (1 << 16) | ||
1180 | #define OMAP4_LPDDR21_VREF_DQ_CCAP0_SHIFT 15 | ||
1181 | #define OMAP4_LPDDR21_VREF_DQ_CCAP0_MASK (1 << 15) | ||
1182 | #define OMAP4_LPDDR21_VREF_DQ_CCAP1_SHIFT 14 | ||
1183 | #define OMAP4_LPDDR21_VREF_DQ_CCAP1_MASK (1 << 14) | ||
1184 | #define OMAP4_LPDDR21_VREF_DQ_TAP0_SHIFT 13 | ||
1185 | #define OMAP4_LPDDR21_VREF_DQ_TAP0_MASK (1 << 13) | ||
1186 | #define OMAP4_LPDDR21_VREF_DQ_TAP1_SHIFT 12 | ||
1187 | #define OMAP4_LPDDR21_VREF_DQ_TAP1_MASK (1 << 12) | ||
1188 | |||
1189 | /* CONTROL_LPDDR2IO2_0 */ | ||
1190 | #define OMAP4_LPDDR2IO2_GR4_SR_SHIFT 30 | ||
1191 | #define OMAP4_LPDDR2IO2_GR4_SR_MASK (0x3 << 30) | ||
1192 | #define OMAP4_LPDDR2IO2_GR4_I_SHIFT 27 | ||
1193 | #define OMAP4_LPDDR2IO2_GR4_I_MASK (0x7 << 27) | ||
1194 | #define OMAP4_LPDDR2IO2_GR4_WD_SHIFT 25 | ||
1195 | #define OMAP4_LPDDR2IO2_GR4_WD_MASK (0x3 << 25) | ||
1196 | #define OMAP4_LPDDR2IO2_GR3_SR_SHIFT 22 | ||
1197 | #define OMAP4_LPDDR2IO2_GR3_SR_MASK (0x3 << 22) | ||
1198 | #define OMAP4_LPDDR2IO2_GR3_I_SHIFT 19 | ||
1199 | #define OMAP4_LPDDR2IO2_GR3_I_MASK (0x7 << 19) | ||
1200 | #define OMAP4_LPDDR2IO2_GR3_WD_SHIFT 17 | ||
1201 | #define OMAP4_LPDDR2IO2_GR3_WD_MASK (0x3 << 17) | ||
1202 | #define OMAP4_LPDDR2IO2_GR2_SR_SHIFT 14 | ||
1203 | #define OMAP4_LPDDR2IO2_GR2_SR_MASK (0x3 << 14) | ||
1204 | #define OMAP4_LPDDR2IO2_GR2_I_SHIFT 11 | ||
1205 | #define OMAP4_LPDDR2IO2_GR2_I_MASK (0x7 << 11) | ||
1206 | #define OMAP4_LPDDR2IO2_GR2_WD_SHIFT 9 | ||
1207 | #define OMAP4_LPDDR2IO2_GR2_WD_MASK (0x3 << 9) | ||
1208 | #define OMAP4_LPDDR2IO2_GR1_SR_SHIFT 6 | ||
1209 | #define OMAP4_LPDDR2IO2_GR1_SR_MASK (0x3 << 6) | ||
1210 | #define OMAP4_LPDDR2IO2_GR1_I_SHIFT 3 | ||
1211 | #define OMAP4_LPDDR2IO2_GR1_I_MASK (0x7 << 3) | ||
1212 | #define OMAP4_LPDDR2IO2_GR1_WD_SHIFT 1 | ||
1213 | #define OMAP4_LPDDR2IO2_GR1_WD_MASK (0x3 << 1) | ||
1214 | |||
1215 | /* CONTROL_LPDDR2IO2_1 */ | ||
1216 | #define OMAP4_LPDDR2IO2_GR8_SR_SHIFT 30 | ||
1217 | #define OMAP4_LPDDR2IO2_GR8_SR_MASK (0x3 << 30) | ||
1218 | #define OMAP4_LPDDR2IO2_GR8_I_SHIFT 27 | ||
1219 | #define OMAP4_LPDDR2IO2_GR8_I_MASK (0x7 << 27) | ||
1220 | #define OMAP4_LPDDR2IO2_GR8_WD_SHIFT 25 | ||
1221 | #define OMAP4_LPDDR2IO2_GR8_WD_MASK (0x3 << 25) | ||
1222 | #define OMAP4_LPDDR2IO2_GR7_SR_SHIFT 22 | ||
1223 | #define OMAP4_LPDDR2IO2_GR7_SR_MASK (0x3 << 22) | ||
1224 | #define OMAP4_LPDDR2IO2_GR7_I_SHIFT 19 | ||
1225 | #define OMAP4_LPDDR2IO2_GR7_I_MASK (0x7 << 19) | ||
1226 | #define OMAP4_LPDDR2IO2_GR7_WD_SHIFT 17 | ||
1227 | #define OMAP4_LPDDR2IO2_GR7_WD_MASK (0x3 << 17) | ||
1228 | #define OMAP4_LPDDR2IO2_GR6_SR_SHIFT 14 | ||
1229 | #define OMAP4_LPDDR2IO2_GR6_SR_MASK (0x3 << 14) | ||
1230 | #define OMAP4_LPDDR2IO2_GR6_I_SHIFT 11 | ||
1231 | #define OMAP4_LPDDR2IO2_GR6_I_MASK (0x7 << 11) | ||
1232 | #define OMAP4_LPDDR2IO2_GR6_WD_SHIFT 9 | ||
1233 | #define OMAP4_LPDDR2IO2_GR6_WD_MASK (0x3 << 9) | ||
1234 | #define OMAP4_LPDDR2IO2_GR5_SR_SHIFT 6 | ||
1235 | #define OMAP4_LPDDR2IO2_GR5_SR_MASK (0x3 << 6) | ||
1236 | #define OMAP4_LPDDR2IO2_GR5_I_SHIFT 3 | ||
1237 | #define OMAP4_LPDDR2IO2_GR5_I_MASK (0x7 << 3) | ||
1238 | #define OMAP4_LPDDR2IO2_GR5_WD_SHIFT 1 | ||
1239 | #define OMAP4_LPDDR2IO2_GR5_WD_MASK (0x3 << 1) | ||
1240 | |||
1241 | /* CONTROL_LPDDR2IO2_2 */ | ||
1242 | #define OMAP4_LPDDR2IO2_GR11_SR_SHIFT 30 | ||
1243 | #define OMAP4_LPDDR2IO2_GR11_SR_MASK (0x3 << 30) | ||
1244 | #define OMAP4_LPDDR2IO2_GR11_I_SHIFT 27 | ||
1245 | #define OMAP4_LPDDR2IO2_GR11_I_MASK (0x7 << 27) | ||
1246 | #define OMAP4_LPDDR2IO2_GR11_WD_SHIFT 25 | ||
1247 | #define OMAP4_LPDDR2IO2_GR11_WD_MASK (0x3 << 25) | ||
1248 | #define OMAP4_LPDDR2IO2_GR10_SR_SHIFT 22 | ||
1249 | #define OMAP4_LPDDR2IO2_GR10_SR_MASK (0x3 << 22) | ||
1250 | #define OMAP4_LPDDR2IO2_GR10_I_SHIFT 19 | ||
1251 | #define OMAP4_LPDDR2IO2_GR10_I_MASK (0x7 << 19) | ||
1252 | #define OMAP4_LPDDR2IO2_GR10_WD_SHIFT 17 | ||
1253 | #define OMAP4_LPDDR2IO2_GR10_WD_MASK (0x3 << 17) | ||
1254 | #define OMAP4_LPDDR2IO2_GR9_SR_SHIFT 14 | ||
1255 | #define OMAP4_LPDDR2IO2_GR9_SR_MASK (0x3 << 14) | ||
1256 | #define OMAP4_LPDDR2IO2_GR9_I_SHIFT 11 | ||
1257 | #define OMAP4_LPDDR2IO2_GR9_I_MASK (0x7 << 11) | ||
1258 | #define OMAP4_LPDDR2IO2_GR9_WD_SHIFT 9 | ||
1259 | #define OMAP4_LPDDR2IO2_GR9_WD_MASK (0x3 << 9) | ||
1260 | |||
1261 | /* CONTROL_LPDDR2IO2_3 */ | ||
1262 | #define OMAP4_LPDDR22_VREF_CA_CCAP0_SHIFT 31 | ||
1263 | #define OMAP4_LPDDR22_VREF_CA_CCAP0_MASK (1 << 31) | ||
1264 | #define OMAP4_LPDDR22_VREF_CA_CCAP1_SHIFT 30 | ||
1265 | #define OMAP4_LPDDR22_VREF_CA_CCAP1_MASK (1 << 30) | ||
1266 | #define OMAP4_LPDDR22_VREF_CA_INT_CCAP0_SHIFT 29 | ||
1267 | #define OMAP4_LPDDR22_VREF_CA_INT_CCAP0_MASK (1 << 29) | ||
1268 | #define OMAP4_LPDDR22_VREF_CA_INT_CCAP1_SHIFT 28 | ||
1269 | #define OMAP4_LPDDR22_VREF_CA_INT_CCAP1_MASK (1 << 28) | ||
1270 | #define OMAP4_LPDDR22_VREF_CA_INT_TAP0_SHIFT 27 | ||
1271 | #define OMAP4_LPDDR22_VREF_CA_INT_TAP0_MASK (1 << 27) | ||
1272 | #define OMAP4_LPDDR22_VREF_CA_INT_TAP1_SHIFT 26 | ||
1273 | #define OMAP4_LPDDR22_VREF_CA_INT_TAP1_MASK (1 << 26) | ||
1274 | #define OMAP4_LPDDR22_VREF_CA_TAP0_SHIFT 25 | ||
1275 | #define OMAP4_LPDDR22_VREF_CA_TAP0_MASK (1 << 25) | ||
1276 | #define OMAP4_LPDDR22_VREF_CA_TAP1_SHIFT 24 | ||
1277 | #define OMAP4_LPDDR22_VREF_CA_TAP1_MASK (1 << 24) | ||
1278 | #define OMAP4_LPDDR22_VREF_DQ0_INT_CCAP0_SHIFT 23 | ||
1279 | #define OMAP4_LPDDR22_VREF_DQ0_INT_CCAP0_MASK (1 << 23) | ||
1280 | #define OMAP4_LPDDR22_VREF_DQ0_INT_CCAP1_SHIFT 22 | ||
1281 | #define OMAP4_LPDDR22_VREF_DQ0_INT_CCAP1_MASK (1 << 22) | ||
1282 | #define OMAP4_LPDDR22_VREF_DQ0_INT_TAP0_SHIFT 21 | ||
1283 | #define OMAP4_LPDDR22_VREF_DQ0_INT_TAP0_MASK (1 << 21) | ||
1284 | #define OMAP4_LPDDR22_VREF_DQ0_INT_TAP1_SHIFT 20 | ||
1285 | #define OMAP4_LPDDR22_VREF_DQ0_INT_TAP1_MASK (1 << 20) | ||
1286 | #define OMAP4_LPDDR22_VREF_DQ1_INT_CCAP0_SHIFT 19 | ||
1287 | #define OMAP4_LPDDR22_VREF_DQ1_INT_CCAP0_MASK (1 << 19) | ||
1288 | #define OMAP4_LPDDR22_VREF_DQ1_INT_CCAP1_SHIFT 18 | ||
1289 | #define OMAP4_LPDDR22_VREF_DQ1_INT_CCAP1_MASK (1 << 18) | ||
1290 | #define OMAP4_LPDDR22_VREF_DQ1_INT_TAP0_SHIFT 17 | ||
1291 | #define OMAP4_LPDDR22_VREF_DQ1_INT_TAP0_MASK (1 << 17) | ||
1292 | #define OMAP4_LPDDR22_VREF_DQ1_INT_TAP1_SHIFT 16 | ||
1293 | #define OMAP4_LPDDR22_VREF_DQ1_INT_TAP1_MASK (1 << 16) | ||
1294 | #define OMAP4_LPDDR22_VREF_DQ_CCAP0_SHIFT 15 | ||
1295 | #define OMAP4_LPDDR22_VREF_DQ_CCAP0_MASK (1 << 15) | ||
1296 | #define OMAP4_LPDDR22_VREF_DQ_CCAP1_SHIFT 14 | ||
1297 | #define OMAP4_LPDDR22_VREF_DQ_CCAP1_MASK (1 << 14) | ||
1298 | #define OMAP4_LPDDR22_VREF_DQ_TAP0_SHIFT 13 | ||
1299 | #define OMAP4_LPDDR22_VREF_DQ_TAP0_MASK (1 << 13) | ||
1300 | #define OMAP4_LPDDR22_VREF_DQ_TAP1_SHIFT 12 | ||
1301 | #define OMAP4_LPDDR22_VREF_DQ_TAP1_MASK (1 << 12) | ||
1302 | |||
1303 | /* CONTROL_BUS_HOLD */ | ||
1304 | #define OMAP4_ABE_DMIC_DIN3_EN_SHIFT 31 | ||
1305 | #define OMAP4_ABE_DMIC_DIN3_EN_MASK (1 << 31) | ||
1306 | #define OMAP4_MCSPI1_CS3_EN_SHIFT 30 | ||
1307 | #define OMAP4_MCSPI1_CS3_EN_MASK (1 << 30) | ||
1308 | |||
1309 | /* CONTROL_C2C */ | ||
1310 | #define OMAP4_MIRROR_MODE_EN_SHIFT 31 | ||
1311 | #define OMAP4_MIRROR_MODE_EN_MASK (1 << 31) | ||
1312 | #define OMAP4_C2C_SPARE_SHIFT 24 | ||
1313 | #define OMAP4_C2C_SPARE_MASK (0x7f << 24) | ||
1314 | |||
1315 | /* CORE_CONTROL_SPARE_RW */ | ||
1316 | #define OMAP4_CORE_CONTROL_SPARE_RW_SHIFT 0 | ||
1317 | #define OMAP4_CORE_CONTROL_SPARE_RW_MASK (0xffffffff << 0) | ||
1318 | |||
1319 | /* CORE_CONTROL_SPARE_R */ | ||
1320 | #define OMAP4_CORE_CONTROL_SPARE_R_SHIFT 0 | ||
1321 | #define OMAP4_CORE_CONTROL_SPARE_R_MASK (0xffffffff << 0) | ||
1322 | |||
1323 | /* CORE_CONTROL_SPARE_R_C0 */ | ||
1324 | #define OMAP4_CORE_CONTROL_SPARE_R_C0_SHIFT 31 | ||
1325 | #define OMAP4_CORE_CONTROL_SPARE_R_C0_MASK (1 << 31) | ||
1326 | #define OMAP4_CORE_CONTROL_SPARE_R_C1_SHIFT 30 | ||
1327 | #define OMAP4_CORE_CONTROL_SPARE_R_C1_MASK (1 << 30) | ||
1328 | #define OMAP4_CORE_CONTROL_SPARE_R_C2_SHIFT 29 | ||
1329 | #define OMAP4_CORE_CONTROL_SPARE_R_C2_MASK (1 << 29) | ||
1330 | #define OMAP4_CORE_CONTROL_SPARE_R_C3_SHIFT 28 | ||
1331 | #define OMAP4_CORE_CONTROL_SPARE_R_C3_MASK (1 << 28) | ||
1332 | #define OMAP4_CORE_CONTROL_SPARE_R_C4_SHIFT 27 | ||
1333 | #define OMAP4_CORE_CONTROL_SPARE_R_C4_MASK (1 << 27) | ||
1334 | #define OMAP4_CORE_CONTROL_SPARE_R_C5_SHIFT 26 | ||
1335 | #define OMAP4_CORE_CONTROL_SPARE_R_C5_MASK (1 << 26) | ||
1336 | #define OMAP4_CORE_CONTROL_SPARE_R_C6_SHIFT 25 | ||
1337 | #define OMAP4_CORE_CONTROL_SPARE_R_C6_MASK (1 << 25) | ||
1338 | #define OMAP4_CORE_CONTROL_SPARE_R_C7_SHIFT 24 | ||
1339 | #define OMAP4_CORE_CONTROL_SPARE_R_C7_MASK (1 << 24) | ||
1340 | |||
1341 | /* CONTROL_EFUSE_1 */ | ||
1342 | #define OMAP4_AVDAC_TRIM_BYTE3_SHIFT 24 | ||
1343 | #define OMAP4_AVDAC_TRIM_BYTE3_MASK (0x7f << 24) | ||
1344 | #define OMAP4_AVDAC_TRIM_BYTE2_SHIFT 16 | ||
1345 | #define OMAP4_AVDAC_TRIM_BYTE2_MASK (0xff << 16) | ||
1346 | #define OMAP4_AVDAC_TRIM_BYTE1_SHIFT 8 | ||
1347 | #define OMAP4_AVDAC_TRIM_BYTE1_MASK (0xff << 8) | ||
1348 | #define OMAP4_AVDAC_TRIM_BYTE0_SHIFT 0 | ||
1349 | #define OMAP4_AVDAC_TRIM_BYTE0_MASK (0xff << 0) | ||
1350 | |||
1351 | /* CONTROL_EFUSE_2 */ | ||
1352 | #define OMAP4_EFUSE_SMART2TEST_P0_SHIFT 31 | ||
1353 | #define OMAP4_EFUSE_SMART2TEST_P0_MASK (1 << 31) | ||
1354 | #define OMAP4_EFUSE_SMART2TEST_P1_SHIFT 30 | ||
1355 | #define OMAP4_EFUSE_SMART2TEST_P1_MASK (1 << 30) | ||
1356 | #define OMAP4_EFUSE_SMART2TEST_P2_SHIFT 29 | ||
1357 | #define OMAP4_EFUSE_SMART2TEST_P2_MASK (1 << 29) | ||
1358 | #define OMAP4_EFUSE_SMART2TEST_P3_SHIFT 28 | ||
1359 | #define OMAP4_EFUSE_SMART2TEST_P3_MASK (1 << 28) | ||
1360 | #define OMAP4_EFUSE_SMART2TEST_N0_SHIFT 27 | ||
1361 | #define OMAP4_EFUSE_SMART2TEST_N0_MASK (1 << 27) | ||
1362 | #define OMAP4_EFUSE_SMART2TEST_N1_SHIFT 26 | ||
1363 | #define OMAP4_EFUSE_SMART2TEST_N1_MASK (1 << 26) | ||
1364 | #define OMAP4_EFUSE_SMART2TEST_N2_SHIFT 25 | ||
1365 | #define OMAP4_EFUSE_SMART2TEST_N2_MASK (1 << 25) | ||
1366 | #define OMAP4_EFUSE_SMART2TEST_N3_SHIFT 24 | ||
1367 | #define OMAP4_EFUSE_SMART2TEST_N3_MASK (1 << 24) | ||
1368 | #define OMAP4_LPDDR2_PTV_N1_SHIFT 23 | ||
1369 | #define OMAP4_LPDDR2_PTV_N1_MASK (1 << 23) | ||
1370 | #define OMAP4_LPDDR2_PTV_N2_SHIFT 22 | ||
1371 | #define OMAP4_LPDDR2_PTV_N2_MASK (1 << 22) | ||
1372 | #define OMAP4_LPDDR2_PTV_N3_SHIFT 21 | ||
1373 | #define OMAP4_LPDDR2_PTV_N3_MASK (1 << 21) | ||
1374 | #define OMAP4_LPDDR2_PTV_N4_SHIFT 20 | ||
1375 | #define OMAP4_LPDDR2_PTV_N4_MASK (1 << 20) | ||
1376 | #define OMAP4_LPDDR2_PTV_N5_SHIFT 19 | ||
1377 | #define OMAP4_LPDDR2_PTV_N5_MASK (1 << 19) | ||
1378 | #define OMAP4_LPDDR2_PTV_P1_SHIFT 18 | ||
1379 | #define OMAP4_LPDDR2_PTV_P1_MASK (1 << 18) | ||
1380 | #define OMAP4_LPDDR2_PTV_P2_SHIFT 17 | ||
1381 | #define OMAP4_LPDDR2_PTV_P2_MASK (1 << 17) | ||
1382 | #define OMAP4_LPDDR2_PTV_P3_SHIFT 16 | ||
1383 | #define OMAP4_LPDDR2_PTV_P3_MASK (1 << 16) | ||
1384 | #define OMAP4_LPDDR2_PTV_P4_SHIFT 15 | ||
1385 | #define OMAP4_LPDDR2_PTV_P4_MASK (1 << 15) | ||
1386 | #define OMAP4_LPDDR2_PTV_P5_SHIFT 14 | ||
1387 | #define OMAP4_LPDDR2_PTV_P5_MASK (1 << 14) | ||
1388 | |||
1389 | /* CONTROL_EFUSE_3 */ | ||
1390 | #define OMAP4_STD_FUSE_SPARE_1_SHIFT 24 | ||
1391 | #define OMAP4_STD_FUSE_SPARE_1_MASK (0xff << 24) | ||
1392 | #define OMAP4_STD_FUSE_SPARE_2_SHIFT 16 | ||
1393 | #define OMAP4_STD_FUSE_SPARE_2_MASK (0xff << 16) | ||
1394 | #define OMAP4_STD_FUSE_SPARE_3_SHIFT 8 | ||
1395 | #define OMAP4_STD_FUSE_SPARE_3_MASK (0xff << 8) | ||
1396 | #define OMAP4_STD_FUSE_SPARE_4_SHIFT 0 | ||
1397 | #define OMAP4_STD_FUSE_SPARE_4_MASK (0xff << 0) | ||
1398 | |||
1399 | /* CONTROL_EFUSE_4 */ | ||
1400 | #define OMAP4_STD_FUSE_SPARE_5_SHIFT 24 | ||
1401 | #define OMAP4_STD_FUSE_SPARE_5_MASK (0xff << 24) | ||
1402 | #define OMAP4_STD_FUSE_SPARE_6_SHIFT 16 | ||
1403 | #define OMAP4_STD_FUSE_SPARE_6_MASK (0xff << 16) | ||
1404 | #define OMAP4_STD_FUSE_SPARE_7_SHIFT 8 | ||
1405 | #define OMAP4_STD_FUSE_SPARE_7_MASK (0xff << 8) | ||
1406 | #define OMAP4_STD_FUSE_SPARE_8_SHIFT 0 | ||
1407 | #define OMAP4_STD_FUSE_SPARE_8_MASK (0xff << 0) | ||
1408 | |||
1409 | #endif | ||
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_wkup_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_wkup_44xx.h new file mode 100644 index 000000000000..17c9b37042c0 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_wkup_44xx.h | |||
@@ -0,0 +1,236 @@ | |||
1 | /* | ||
2 | * OMAP44xx CTRL_MODULE_PAD_WKUP registers and bitfields | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | ||
5 | * | ||
6 | * Benoit Cousson (b-cousson@ti.com) | ||
7 | * Santosh Shilimkar (santosh.shilimkar@ti.com) | ||
8 | * | ||
9 | * This file is automatically generated from the OMAP hardware databases. | ||
10 | * We respectfully ask that any modifications to this file be coordinated | ||
11 | * with the public linux-omap@vger.kernel.org mailing list and the | ||
12 | * authors above to ensure that the autogeneration scripts are kept | ||
13 | * up-to-date with the file contents. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_PAD_WKUP_44XX_H | ||
21 | #define __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_PAD_WKUP_44XX_H | ||
22 | |||
23 | |||
24 | /* Base address */ | ||
25 | #define OMAP4_CTRL_MODULE_PAD_WKUP 0x4a31e000 | ||
26 | |||
27 | /* Registers offset */ | ||
28 | #define OMAP4_CTRL_MODULE_PAD_WKUP_IP_REVISION 0x0000 | ||
29 | #define OMAP4_CTRL_MODULE_PAD_WKUP_IP_HWINFO 0x0004 | ||
30 | #define OMAP4_CTRL_MODULE_PAD_WKUP_IP_SYSCONFIG 0x0010 | ||
31 | #define OMAP4_CTRL_MODULE_PAD_WKUP_PADCONF_WAKEUPEVENT_0 0x007c | ||
32 | #define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_SMART1NOPMIO_PADCONF_0 0x05a0 | ||
33 | #define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_SMART1NOPMIO_PADCONF_1 0x05a4 | ||
34 | #define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_PADCONF_MODE 0x05a8 | ||
35 | #define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_XTAL_OSCILLATOR 0x05ac | ||
36 | #define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_USIMIO 0x0600 | ||
37 | #define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2 0x0604 | ||
38 | #define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_JTAG 0x0608 | ||
39 | #define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_SYS 0x060c | ||
40 | #define OMAP4_CTRL_MODULE_PAD_WKUP_WKUP_CONTROL_SPARE_RW 0x0614 | ||
41 | #define OMAP4_CTRL_MODULE_PAD_WKUP_WKUP_CONTROL_SPARE_R 0x0618 | ||
42 | #define OMAP4_CTRL_MODULE_PAD_WKUP_WKUP_CONTROL_SPARE_R_C0 0x061c | ||
43 | |||
44 | /* Registers shifts and masks */ | ||
45 | |||
46 | /* IP_REVISION */ | ||
47 | #define OMAP4_IP_REV_SCHEME_SHIFT 30 | ||
48 | #define OMAP4_IP_REV_SCHEME_MASK (0x3 << 30) | ||
49 | #define OMAP4_IP_REV_FUNC_SHIFT 16 | ||
50 | #define OMAP4_IP_REV_FUNC_MASK (0xfff << 16) | ||
51 | #define OMAP4_IP_REV_RTL_SHIFT 11 | ||
52 | #define OMAP4_IP_REV_RTL_MASK (0x1f << 11) | ||
53 | #define OMAP4_IP_REV_MAJOR_SHIFT 8 | ||
54 | #define OMAP4_IP_REV_MAJOR_MASK (0x7 << 8) | ||
55 | #define OMAP4_IP_REV_CUSTOM_SHIFT 6 | ||
56 | #define OMAP4_IP_REV_CUSTOM_MASK (0x3 << 6) | ||
57 | #define OMAP4_IP_REV_MINOR_SHIFT 0 | ||
58 | #define OMAP4_IP_REV_MINOR_MASK (0x3f << 0) | ||
59 | |||
60 | /* IP_HWINFO */ | ||
61 | #define OMAP4_IP_HWINFO_SHIFT 0 | ||
62 | #define OMAP4_IP_HWINFO_MASK (0xffffffff << 0) | ||
63 | |||
64 | /* IP_SYSCONFIG */ | ||
65 | #define OMAP4_IP_SYSCONFIG_IDLEMODE_SHIFT 2 | ||
66 | #define OMAP4_IP_SYSCONFIG_IDLEMODE_MASK (0x3 << 2) | ||
67 | |||
68 | /* PADCONF_WAKEUPEVENT_0 */ | ||
69 | #define OMAP4_JTAG_TDO_DUPLICATEWAKEUPEVENT_SHIFT 24 | ||
70 | #define OMAP4_JTAG_TDO_DUPLICATEWAKEUPEVENT_MASK (1 << 24) | ||
71 | #define OMAP4_JTAG_TDI_DUPLICATEWAKEUPEVENT_SHIFT 23 | ||
72 | #define OMAP4_JTAG_TDI_DUPLICATEWAKEUPEVENT_MASK (1 << 23) | ||
73 | #define OMAP4_JTAG_TMS_TMSC_DUPLICATEWAKEUPEVENT_SHIFT 22 | ||
74 | #define OMAP4_JTAG_TMS_TMSC_DUPLICATEWAKEUPEVENT_MASK (1 << 22) | ||
75 | #define OMAP4_JTAG_RTCK_DUPLICATEWAKEUPEVENT_SHIFT 21 | ||
76 | #define OMAP4_JTAG_RTCK_DUPLICATEWAKEUPEVENT_MASK (1 << 21) | ||
77 | #define OMAP4_JTAG_TCK_DUPLICATEWAKEUPEVENT_SHIFT 20 | ||
78 | #define OMAP4_JTAG_TCK_DUPLICATEWAKEUPEVENT_MASK (1 << 20) | ||
79 | #define OMAP4_JTAG_NTRST_DUPLICATEWAKEUPEVENT_SHIFT 19 | ||
80 | #define OMAP4_JTAG_NTRST_DUPLICATEWAKEUPEVENT_MASK (1 << 19) | ||
81 | #define OMAP4_SYS_BOOT7_DUPLICATEWAKEUPEVENT_SHIFT 18 | ||
82 | #define OMAP4_SYS_BOOT7_DUPLICATEWAKEUPEVENT_MASK (1 << 18) | ||
83 | #define OMAP4_SYS_BOOT6_DUPLICATEWAKEUPEVENT_SHIFT 17 | ||
84 | #define OMAP4_SYS_BOOT6_DUPLICATEWAKEUPEVENT_MASK (1 << 17) | ||
85 | #define OMAP4_SYS_PWRON_RESET_OUT_DUPLICATEWAKEUPEVENT_SHIFT 16 | ||
86 | #define OMAP4_SYS_PWRON_RESET_OUT_DUPLICATEWAKEUPEVENT_MASK (1 << 16) | ||
87 | #define OMAP4_SYS_PWR_REQ_DUPLICATEWAKEUPEVENT_SHIFT 15 | ||
88 | #define OMAP4_SYS_PWR_REQ_DUPLICATEWAKEUPEVENT_MASK (1 << 15) | ||
89 | #define OMAP4_SYS_NRESWARM_DUPLICATEWAKEUPEVENT_SHIFT 14 | ||
90 | #define OMAP4_SYS_NRESWARM_DUPLICATEWAKEUPEVENT_MASK (1 << 14) | ||
91 | #define OMAP4_SYS_32K_DUPLICATEWAKEUPEVENT_SHIFT 13 | ||
92 | #define OMAP4_SYS_32K_DUPLICATEWAKEUPEVENT_MASK (1 << 13) | ||
93 | #define OMAP4_FREF_CLK4_OUT_DUPLICATEWAKEUPEVENT_SHIFT 12 | ||
94 | #define OMAP4_FREF_CLK4_OUT_DUPLICATEWAKEUPEVENT_MASK (1 << 12) | ||
95 | #define OMAP4_FREF_CLK4_REQ_DUPLICATEWAKEUPEVENT_SHIFT 11 | ||
96 | #define OMAP4_FREF_CLK4_REQ_DUPLICATEWAKEUPEVENT_MASK (1 << 11) | ||
97 | #define OMAP4_FREF_CLK3_OUT_DUPLICATEWAKEUPEVENT_SHIFT 10 | ||
98 | #define OMAP4_FREF_CLK3_OUT_DUPLICATEWAKEUPEVENT_MASK (1 << 10) | ||
99 | #define OMAP4_FREF_CLK3_REQ_DUPLICATEWAKEUPEVENT_SHIFT 9 | ||
100 | #define OMAP4_FREF_CLK3_REQ_DUPLICATEWAKEUPEVENT_MASK (1 << 9) | ||
101 | #define OMAP4_FREF_CLK0_OUT_DUPLICATEWAKEUPEVENT_SHIFT 8 | ||
102 | #define OMAP4_FREF_CLK0_OUT_DUPLICATEWAKEUPEVENT_MASK (1 << 8) | ||
103 | #define OMAP4_FREF_CLK_IOREQ_DUPLICATEWAKEUPEVENT_SHIFT 7 | ||
104 | #define OMAP4_FREF_CLK_IOREQ_DUPLICATEWAKEUPEVENT_MASK (1 << 7) | ||
105 | #define OMAP4_SR_SDA_DUPLICATEWAKEUPEVENT_SHIFT 6 | ||
106 | #define OMAP4_SR_SDA_DUPLICATEWAKEUPEVENT_MASK (1 << 6) | ||
107 | #define OMAP4_SR_SCL_DUPLICATEWAKEUPEVENT_SHIFT 5 | ||
108 | #define OMAP4_SR_SCL_DUPLICATEWAKEUPEVENT_MASK (1 << 5) | ||
109 | #define OMAP4_SIM_PWRCTRL_DUPLICATEWAKEUPEVENT_SHIFT 4 | ||
110 | #define OMAP4_SIM_PWRCTRL_DUPLICATEWAKEUPEVENT_MASK (1 << 4) | ||
111 | #define OMAP4_SIM_CD_DUPLICATEWAKEUPEVENT_SHIFT 3 | ||
112 | #define OMAP4_SIM_CD_DUPLICATEWAKEUPEVENT_MASK (1 << 3) | ||
113 | #define OMAP4_SIM_RESET_DUPLICATEWAKEUPEVENT_SHIFT 2 | ||
114 | #define OMAP4_SIM_RESET_DUPLICATEWAKEUPEVENT_MASK (1 << 2) | ||
115 | #define OMAP4_SIM_CLK_DUPLICATEWAKEUPEVENT_SHIFT 1 | ||
116 | #define OMAP4_SIM_CLK_DUPLICATEWAKEUPEVENT_MASK (1 << 1) | ||
117 | #define OMAP4_SIM_IO_DUPLICATEWAKEUPEVENT_SHIFT 0 | ||
118 | #define OMAP4_SIM_IO_DUPLICATEWAKEUPEVENT_MASK (1 << 0) | ||
119 | |||
120 | /* CONTROL_SMART1NOPMIO_PADCONF_0 */ | ||
121 | #define OMAP4_FREF_DR0_SC_SHIFT 30 | ||
122 | #define OMAP4_FREF_DR0_SC_MASK (0x3 << 30) | ||
123 | #define OMAP4_FREF_DR1_SC_SHIFT 28 | ||
124 | #define OMAP4_FREF_DR1_SC_MASK (0x3 << 28) | ||
125 | #define OMAP4_FREF_DR4_SC_SHIFT 26 | ||
126 | #define OMAP4_FREF_DR4_SC_MASK (0x3 << 26) | ||
127 | #define OMAP4_FREF_DR5_SC_SHIFT 24 | ||
128 | #define OMAP4_FREF_DR5_SC_MASK (0x3 << 24) | ||
129 | #define OMAP4_FREF_DR6_SC_SHIFT 22 | ||
130 | #define OMAP4_FREF_DR6_SC_MASK (0x3 << 22) | ||
131 | #define OMAP4_FREF_DR7_SC_SHIFT 20 | ||
132 | #define OMAP4_FREF_DR7_SC_MASK (0x3 << 20) | ||
133 | #define OMAP4_GPIO_DR7_SC_SHIFT 18 | ||
134 | #define OMAP4_GPIO_DR7_SC_MASK (0x3 << 18) | ||
135 | #define OMAP4_DPM_DR0_SC_SHIFT 14 | ||
136 | #define OMAP4_DPM_DR0_SC_MASK (0x3 << 14) | ||
137 | #define OMAP4_SIM_DR0_SC_SHIFT 12 | ||
138 | #define OMAP4_SIM_DR0_SC_MASK (0x3 << 12) | ||
139 | |||
140 | /* CONTROL_SMART1NOPMIO_PADCONF_1 */ | ||
141 | #define OMAP4_FREF_DR0_LB_SHIFT 30 | ||
142 | #define OMAP4_FREF_DR0_LB_MASK (0x3 << 30) | ||
143 | #define OMAP4_FREF_DR1_LB_SHIFT 28 | ||
144 | #define OMAP4_FREF_DR1_LB_MASK (0x3 << 28) | ||
145 | #define OMAP4_FREF_DR4_LB_SHIFT 26 | ||
146 | #define OMAP4_FREF_DR4_LB_MASK (0x3 << 26) | ||
147 | #define OMAP4_FREF_DR5_LB_SHIFT 24 | ||
148 | #define OMAP4_FREF_DR5_LB_MASK (0x3 << 24) | ||
149 | #define OMAP4_FREF_DR6_LB_SHIFT 22 | ||
150 | #define OMAP4_FREF_DR6_LB_MASK (0x3 << 22) | ||
151 | #define OMAP4_FREF_DR7_LB_SHIFT 20 | ||
152 | #define OMAP4_FREF_DR7_LB_MASK (0x3 << 20) | ||
153 | #define OMAP4_GPIO_DR7_LB_SHIFT 18 | ||
154 | #define OMAP4_GPIO_DR7_LB_MASK (0x3 << 18) | ||
155 | #define OMAP4_DPM_DR0_LB_SHIFT 14 | ||
156 | #define OMAP4_DPM_DR0_LB_MASK (0x3 << 14) | ||
157 | #define OMAP4_SIM_DR0_LB_SHIFT 12 | ||
158 | #define OMAP4_SIM_DR0_LB_MASK (0x3 << 12) | ||
159 | |||
160 | /* CONTROL_PADCONF_MODE */ | ||
161 | #define OMAP4_VDDS_DV_FREF_SHIFT 31 | ||
162 | #define OMAP4_VDDS_DV_FREF_MASK (1 << 31) | ||
163 | #define OMAP4_VDDS_DV_BANK2_SHIFT 30 | ||
164 | #define OMAP4_VDDS_DV_BANK2_MASK (1 << 30) | ||
165 | |||
166 | /* CONTROL_XTAL_OSCILLATOR */ | ||
167 | #define OMAP4_OSCILLATOR_BOOST_SHIFT 31 | ||
168 | #define OMAP4_OSCILLATOR_BOOST_MASK (1 << 31) | ||
169 | #define OMAP4_OSCILLATOR_OS_OUT_SHIFT 30 | ||
170 | #define OMAP4_OSCILLATOR_OS_OUT_MASK (1 << 30) | ||
171 | |||
172 | /* CONTROL_USIMIO */ | ||
173 | #define OMAP4_PAD_USIM_CLK_LOW_SHIFT 31 | ||
174 | #define OMAP4_PAD_USIM_CLK_LOW_MASK (1 << 31) | ||
175 | #define OMAP4_PAD_USIM_RST_LOW_SHIFT 29 | ||
176 | #define OMAP4_PAD_USIM_RST_LOW_MASK (1 << 29) | ||
177 | #define OMAP4_USIM_PWRDNZ_SHIFT 28 | ||
178 | #define OMAP4_USIM_PWRDNZ_MASK (1 << 28) | ||
179 | |||
180 | /* CONTROL_I2C_2 */ | ||
181 | #define OMAP4_SR_SDA_GLFENB_SHIFT 31 | ||
182 | #define OMAP4_SR_SDA_GLFENB_MASK (1 << 31) | ||
183 | #define OMAP4_SR_SDA_LOAD_BITS_SHIFT 29 | ||
184 | #define OMAP4_SR_SDA_LOAD_BITS_MASK (0x3 << 29) | ||
185 | #define OMAP4_SR_SDA_PULLUPRESX_SHIFT 28 | ||
186 | #define OMAP4_SR_SDA_PULLUPRESX_MASK (1 << 28) | ||
187 | #define OMAP4_SR_SCL_GLFENB_SHIFT 27 | ||
188 | #define OMAP4_SR_SCL_GLFENB_MASK (1 << 27) | ||
189 | #define OMAP4_SR_SCL_LOAD_BITS_SHIFT 25 | ||
190 | #define OMAP4_SR_SCL_LOAD_BITS_MASK (0x3 << 25) | ||
191 | #define OMAP4_SR_SCL_PULLUPRESX_SHIFT 24 | ||
192 | #define OMAP4_SR_SCL_PULLUPRESX_MASK (1 << 24) | ||
193 | |||
194 | /* CONTROL_JTAG */ | ||
195 | #define OMAP4_JTAG_NTRST_EN_SHIFT 31 | ||
196 | #define OMAP4_JTAG_NTRST_EN_MASK (1 << 31) | ||
197 | #define OMAP4_JTAG_TCK_EN_SHIFT 30 | ||
198 | #define OMAP4_JTAG_TCK_EN_MASK (1 << 30) | ||
199 | #define OMAP4_JTAG_RTCK_EN_SHIFT 29 | ||
200 | #define OMAP4_JTAG_RTCK_EN_MASK (1 << 29) | ||
201 | #define OMAP4_JTAG_TDI_EN_SHIFT 28 | ||
202 | #define OMAP4_JTAG_TDI_EN_MASK (1 << 28) | ||
203 | #define OMAP4_JTAG_TDO_EN_SHIFT 27 | ||
204 | #define OMAP4_JTAG_TDO_EN_MASK (1 << 27) | ||
205 | |||
206 | /* CONTROL_SYS */ | ||
207 | #define OMAP4_SYS_NRESWARM_PIPU_SHIFT 31 | ||
208 | #define OMAP4_SYS_NRESWARM_PIPU_MASK (1 << 31) | ||
209 | |||
210 | /* WKUP_CONTROL_SPARE_RW */ | ||
211 | #define OMAP4_WKUP_CONTROL_SPARE_RW_SHIFT 0 | ||
212 | #define OMAP4_WKUP_CONTROL_SPARE_RW_MASK (0xffffffff << 0) | ||
213 | |||
214 | /* WKUP_CONTROL_SPARE_R */ | ||
215 | #define OMAP4_WKUP_CONTROL_SPARE_R_SHIFT 0 | ||
216 | #define OMAP4_WKUP_CONTROL_SPARE_R_MASK (0xffffffff << 0) | ||
217 | |||
218 | /* WKUP_CONTROL_SPARE_R_C0 */ | ||
219 | #define OMAP4_WKUP_CONTROL_SPARE_R_C0_SHIFT 31 | ||
220 | #define OMAP4_WKUP_CONTROL_SPARE_R_C0_MASK (1 << 31) | ||
221 | #define OMAP4_WKUP_CONTROL_SPARE_R_C1_SHIFT 30 | ||
222 | #define OMAP4_WKUP_CONTROL_SPARE_R_C1_MASK (1 << 30) | ||
223 | #define OMAP4_WKUP_CONTROL_SPARE_R_C2_SHIFT 29 | ||
224 | #define OMAP4_WKUP_CONTROL_SPARE_R_C2_MASK (1 << 29) | ||
225 | #define OMAP4_WKUP_CONTROL_SPARE_R_C3_SHIFT 28 | ||
226 | #define OMAP4_WKUP_CONTROL_SPARE_R_C3_MASK (1 << 28) | ||
227 | #define OMAP4_WKUP_CONTROL_SPARE_R_C4_SHIFT 27 | ||
228 | #define OMAP4_WKUP_CONTROL_SPARE_R_C4_MASK (1 << 27) | ||
229 | #define OMAP4_WKUP_CONTROL_SPARE_R_C5_SHIFT 26 | ||
230 | #define OMAP4_WKUP_CONTROL_SPARE_R_C5_MASK (1 << 26) | ||
231 | #define OMAP4_WKUP_CONTROL_SPARE_R_C6_SHIFT 25 | ||
232 | #define OMAP4_WKUP_CONTROL_SPARE_R_C6_MASK (1 << 25) | ||
233 | #define OMAP4_WKUP_CONTROL_SPARE_R_C7_SHIFT 24 | ||
234 | #define OMAP4_WKUP_CONTROL_SPARE_R_C7_MASK (1 << 24) | ||
235 | |||
236 | #endif | ||
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_wkup_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_wkup_44xx.h new file mode 100644 index 000000000000..a0af9baec3f7 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/ctrl_module_wkup_44xx.h | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | * OMAP44xx CTRL_MODULE_WKUP registers and bitfields | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | ||
5 | * | ||
6 | * Benoit Cousson (b-cousson@ti.com) | ||
7 | * Santosh Shilimkar (santosh.shilimkar@ti.com) | ||
8 | * | ||
9 | * This file is automatically generated from the OMAP hardware databases. | ||
10 | * We respectfully ask that any modifications to this file be coordinated | ||
11 | * with the public linux-omap@vger.kernel.org mailing list and the | ||
12 | * authors above to ensure that the autogeneration scripts are kept | ||
13 | * up-to-date with the file contents. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_WKUP_44XX_H | ||
21 | #define __ARCH_ARM_MACH_OMAP2_CTRL_MODULE_WKUP_44XX_H | ||
22 | |||
23 | |||
24 | /* Base address */ | ||
25 | #define OMAP4_CTRL_MODULE_WKUP 0x4a30c000 | ||
26 | |||
27 | /* Registers offset */ | ||
28 | #define OMAP4_CTRL_MODULE_WKUP_IP_REVISION 0x0000 | ||
29 | #define OMAP4_CTRL_MODULE_WKUP_IP_HWINFO 0x0004 | ||
30 | #define OMAP4_CTRL_MODULE_WKUP_IP_SYSCONFIG 0x0010 | ||
31 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_0 0x0460 | ||
32 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_1 0x0464 | ||
33 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_2 0x0468 | ||
34 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_3 0x046c | ||
35 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_4 0x0470 | ||
36 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_5 0x0474 | ||
37 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_6 0x0478 | ||
38 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_7 0x047c | ||
39 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_8 0x0480 | ||
40 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_9 0x0484 | ||
41 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_10 0x0488 | ||
42 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_11 0x048c | ||
43 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_12 0x0490 | ||
44 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_13 0x0494 | ||
45 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_14 0x0498 | ||
46 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_15 0x049c | ||
47 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_16 0x04a0 | ||
48 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_17 0x04a4 | ||
49 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_18 0x04a8 | ||
50 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_19 0x04ac | ||
51 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_20 0x04b0 | ||
52 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_21 0x04b4 | ||
53 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_22 0x04b8 | ||
54 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_23 0x04bc | ||
55 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_24 0x04c0 | ||
56 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_25 0x04c4 | ||
57 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_26 0x04c8 | ||
58 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_27 0x04cc | ||
59 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_28 0x04d0 | ||
60 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_29 0x04d4 | ||
61 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_30 0x04d8 | ||
62 | #define OMAP4_CTRL_MODULE_WKUP_CONF_DEBUG_SEL_TST_31 0x04dc | ||
63 | |||
64 | /* Registers shifts and masks */ | ||
65 | |||
66 | /* IP_REVISION */ | ||
67 | #define OMAP4_IP_REV_SCHEME_SHIFT 30 | ||
68 | #define OMAP4_IP_REV_SCHEME_MASK (0x3 << 30) | ||
69 | #define OMAP4_IP_REV_FUNC_SHIFT 16 | ||
70 | #define OMAP4_IP_REV_FUNC_MASK (0xfff << 16) | ||
71 | #define OMAP4_IP_REV_RTL_SHIFT 11 | ||
72 | #define OMAP4_IP_REV_RTL_MASK (0x1f << 11) | ||
73 | #define OMAP4_IP_REV_MAJOR_SHIFT 8 | ||
74 | #define OMAP4_IP_REV_MAJOR_MASK (0x7 << 8) | ||
75 | #define OMAP4_IP_REV_CUSTOM_SHIFT 6 | ||
76 | #define OMAP4_IP_REV_CUSTOM_MASK (0x3 << 6) | ||
77 | #define OMAP4_IP_REV_MINOR_SHIFT 0 | ||
78 | #define OMAP4_IP_REV_MINOR_MASK (0x3f << 0) | ||
79 | |||
80 | /* IP_HWINFO */ | ||
81 | #define OMAP4_IP_HWINFO_SHIFT 0 | ||
82 | #define OMAP4_IP_HWINFO_MASK (0xffffffff << 0) | ||
83 | |||
84 | /* IP_SYSCONFIG */ | ||
85 | #define OMAP4_IP_SYSCONFIG_IDLEMODE_SHIFT 2 | ||
86 | #define OMAP4_IP_SYSCONFIG_IDLEMODE_MASK (0x3 << 2) | ||
87 | |||
88 | /* CONF_DEBUG_SEL_TST_0 */ | ||
89 | #define OMAP4_WKUP_MODE_SHIFT 0 | ||
90 | #define OMAP4_WKUP_MODE_MASK (1 << 0) | ||
91 | |||
92 | #endif | ||
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index b9ea70bce563..40562ddd3ee4 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "clock2xxx.h" | 36 | #include "clock2xxx.h" |
37 | #include "clock3xxx.h" | 37 | #include "clock3xxx.h" |
38 | #include "clock44xx.h" | 38 | #include "clock44xx.h" |
39 | #include "io.h" | ||
39 | 40 | ||
40 | #include <plat/omap-pm.h> | 41 | #include <plat/omap-pm.h> |
41 | #include <plat/powerdomain.h> | 42 | #include <plat/powerdomain.h> |
@@ -323,6 +324,9 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | |||
323 | omap2430_hwmod_init(); | 324 | omap2430_hwmod_init(); |
324 | else if (cpu_is_omap34xx()) | 325 | else if (cpu_is_omap34xx()) |
325 | omap3xxx_hwmod_init(); | 326 | omap3xxx_hwmod_init(); |
327 | else if (cpu_is_omap44xx()) | ||
328 | omap44xx_hwmod_init(); | ||
329 | |||
326 | /* The OPP tables have to be registered before a clk init */ | 330 | /* The OPP tables have to be registered before a clk init */ |
327 | omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); | 331 | omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); |
328 | 332 | ||
@@ -342,9 +346,7 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | |||
342 | #ifndef CONFIG_PM_RUNTIME | 346 | #ifndef CONFIG_PM_RUNTIME |
343 | skip_setup_idle = 1; | 347 | skip_setup_idle = 1; |
344 | #endif | 348 | #endif |
345 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) /* FIXME: OMAP4 */ | 349 | omap_hwmod_late_init(skip_setup_idle); |
346 | omap_hwmod_late_init(skip_setup_idle); | ||
347 | |||
348 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { | 350 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { |
349 | omap2_sdrc_init(sdrc_cs0, sdrc_cs1); | 351 | omap2_sdrc_init(sdrc_cs0, sdrc_cs1); |
350 | _omap2_init_reprogram_sdrc(); | 352 | _omap2_init_reprogram_sdrc(); |
diff --git a/arch/arm/mach-omap2/io.h b/arch/arm/mach-omap2/io.h new file mode 100644 index 000000000000..fd230c6cded5 --- /dev/null +++ b/arch/arm/mach-omap2/io.h | |||
@@ -0,0 +1,7 @@ | |||
1 | |||
2 | #ifndef __MACH_OMAP2_IO_H__ | ||
3 | #define __MACH_OMAP2_IO_H__ | ||
4 | |||
5 | extern int __init omap_sram_init(void); | ||
6 | |||
7 | #endif /* __MACH_OMAP2_IO_H__ */ | ||
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 26aeef560aa3..32eeabe9d2ab 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -47,7 +47,6 @@ static struct omap_irq_bank { | |||
47 | } __attribute__ ((aligned(4))) irq_banks[] = { | 47 | } __attribute__ ((aligned(4))) irq_banks[] = { |
48 | { | 48 | { |
49 | /* MPU INTC */ | 49 | /* MPU INTC */ |
50 | .base_reg = 0, | ||
51 | .nr_irqs = 96, | 50 | .nr_irqs = 96, |
52 | }, | 51 | }, |
53 | }; | 52 | }; |
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 42dbfa46e656..40ddecab93a9 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
@@ -181,7 +181,7 @@ static int omap2_mbox_fifo_full(struct omap_mbox *mbox) | |||
181 | static void omap2_mbox_enable_irq(struct omap_mbox *mbox, | 181 | static void omap2_mbox_enable_irq(struct omap_mbox *mbox, |
182 | omap_mbox_type_t irq) | 182 | omap_mbox_type_t irq) |
183 | { | 183 | { |
184 | struct omap_mbox2_priv *p = (struct omap_mbox2_priv *)mbox->priv; | 184 | struct omap_mbox2_priv *p = mbox->priv; |
185 | u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit; | 185 | u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit; |
186 | 186 | ||
187 | l = mbox_read_reg(p->irqenable); | 187 | l = mbox_read_reg(p->irqenable); |
@@ -192,7 +192,7 @@ static void omap2_mbox_enable_irq(struct omap_mbox *mbox, | |||
192 | static void omap2_mbox_disable_irq(struct omap_mbox *mbox, | 192 | static void omap2_mbox_disable_irq(struct omap_mbox *mbox, |
193 | omap_mbox_type_t irq) | 193 | omap_mbox_type_t irq) |
194 | { | 194 | { |
195 | struct omap_mbox2_priv *p = (struct omap_mbox2_priv *)mbox->priv; | 195 | struct omap_mbox2_priv *p = mbox->priv; |
196 | u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit; | 196 | u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit; |
197 | l = mbox_read_reg(p->irqdisable); | 197 | l = mbox_read_reg(p->irqdisable); |
198 | l &= ~bit; | 198 | l &= ~bit; |
@@ -202,7 +202,7 @@ static void omap2_mbox_disable_irq(struct omap_mbox *mbox, | |||
202 | static void omap2_mbox_ack_irq(struct omap_mbox *mbox, | 202 | static void omap2_mbox_ack_irq(struct omap_mbox *mbox, |
203 | omap_mbox_type_t irq) | 203 | omap_mbox_type_t irq) |
204 | { | 204 | { |
205 | struct omap_mbox2_priv *p = (struct omap_mbox2_priv *)mbox->priv; | 205 | struct omap_mbox2_priv *p = mbox->priv; |
206 | u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit; | 206 | u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit; |
207 | 207 | ||
208 | mbox_write_reg(bit, p->irqstatus); | 208 | mbox_write_reg(bit, p->irqstatus); |
@@ -214,7 +214,7 @@ static void omap2_mbox_ack_irq(struct omap_mbox *mbox, | |||
214 | static int omap2_mbox_is_irq(struct omap_mbox *mbox, | 214 | static int omap2_mbox_is_irq(struct omap_mbox *mbox, |
215 | omap_mbox_type_t irq) | 215 | omap_mbox_type_t irq) |
216 | { | 216 | { |
217 | struct omap_mbox2_priv *p = (struct omap_mbox2_priv *)mbox->priv; | 217 | struct omap_mbox2_priv *p = mbox->priv; |
218 | u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit; | 218 | u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit; |
219 | u32 enable = mbox_read_reg(p->irqenable); | 219 | u32 enable = mbox_read_reg(p->irqenable); |
220 | u32 status = mbox_read_reg(p->irqstatus); | 220 | u32 status = mbox_read_reg(p->irqstatus); |
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index 467aae245781..f9c9df5b5ff1 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -23,29 +23,86 @@ | |||
23 | #include <plat/cpu.h> | 23 | #include <plat/cpu.h> |
24 | #include <plat/mcbsp.h> | 24 | #include <plat/mcbsp.h> |
25 | 25 | ||
26 | #include "mux.h" | 26 | #include "control.h" |
27 | 27 | ||
28 | static void omap2_mcbsp2_mux_setup(void) | 28 | |
29 | /* McBSP internal signal muxing functions */ | ||
30 | |||
31 | void omap2_mcbsp1_mux_clkr_src(u8 mux) | ||
29 | { | 32 | { |
30 | omap_mux_init_signal("eac_ac_sclk.mcbsp2_clkx", OMAP_PULL_ENA); | 33 | u32 v; |
31 | omap_mux_init_signal("eac_ac_fs.mcbsp2_fsx", OMAP_PULL_ENA); | 34 | |
32 | omap_mux_init_signal("eac_ac_din.mcbsp2_dr", OMAP_PULL_ENA); | 35 | v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); |
33 | omap_mux_init_signal("eac_ac_dout.mcbsp2_dx", OMAP_PULL_ENA); | 36 | if (mux == CLKR_SRC_CLKR) |
34 | omap_mux_init_gpio(117, OMAP_PULL_ENA); | 37 | v &= ~OMAP2_MCBSP1_CLKR_MASK; |
35 | /* | 38 | else if (mux == CLKR_SRC_CLKX) |
36 | * TODO: Need to add MUX settings for OMAP 2430 SDP | 39 | v |= OMAP2_MCBSP1_CLKR_MASK; |
37 | */ | 40 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); |
38 | } | 41 | } |
42 | EXPORT_SYMBOL(omap2_mcbsp1_mux_clkr_src); | ||
39 | 43 | ||
40 | static void omap2_mcbsp_request(unsigned int id) | 44 | void omap2_mcbsp1_mux_fsr_src(u8 mux) |
41 | { | 45 | { |
42 | if (cpu_is_omap2420() && (id == OMAP_MCBSP2)) | 46 | u32 v; |
43 | omap2_mcbsp2_mux_setup(); | 47 | |
48 | v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
49 | if (mux == FSR_SRC_FSR) | ||
50 | v &= ~OMAP2_MCBSP1_FSR_MASK; | ||
51 | else if (mux == FSR_SRC_FSX) | ||
52 | v |= OMAP2_MCBSP1_FSR_MASK; | ||
53 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); | ||
44 | } | 54 | } |
55 | EXPORT_SYMBOL(omap2_mcbsp1_mux_fsr_src); | ||
45 | 56 | ||
46 | static struct omap_mcbsp_ops omap2_mcbsp_ops = { | 57 | /* McBSP CLKS source switching function */ |
47 | .request = omap2_mcbsp_request, | 58 | |
48 | }; | 59 | int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id) |
60 | { | ||
61 | struct omap_mcbsp *mcbsp; | ||
62 | struct clk *fck_src; | ||
63 | char *fck_src_name; | ||
64 | int r; | ||
65 | |||
66 | if (!omap_mcbsp_check_valid_id(id)) { | ||
67 | pr_err("%s: Invalid id (%d)\n", __func__, id + 1); | ||
68 | return -EINVAL; | ||
69 | } | ||
70 | mcbsp = id_to_mcbsp_ptr(id); | ||
71 | |||
72 | if (fck_src_id == MCBSP_CLKS_PAD_SRC) | ||
73 | fck_src_name = "pad_fck"; | ||
74 | else if (fck_src_id == MCBSP_CLKS_PRCM_SRC) | ||
75 | fck_src_name = "prcm_fck"; | ||
76 | else | ||
77 | return -EINVAL; | ||
78 | |||
79 | fck_src = clk_get(mcbsp->dev, fck_src_name); | ||
80 | if (IS_ERR_OR_NULL(fck_src)) { | ||
81 | pr_err("omap-mcbsp: %s: could not clk_get() %s\n", "clks", | ||
82 | fck_src_name); | ||
83 | return -EINVAL; | ||
84 | } | ||
85 | |||
86 | clk_disable(mcbsp->fclk); | ||
87 | |||
88 | r = clk_set_parent(mcbsp->fclk, fck_src); | ||
89 | if (IS_ERR_VALUE(r)) { | ||
90 | pr_err("omap-mcbsp: %s: could not clk_set_parent() to %s\n", | ||
91 | "clks", fck_src_name); | ||
92 | clk_put(fck_src); | ||
93 | return -EINVAL; | ||
94 | } | ||
95 | |||
96 | clk_enable(mcbsp->fclk); | ||
97 | |||
98 | clk_put(fck_src); | ||
99 | |||
100 | return 0; | ||
101 | } | ||
102 | EXPORT_SYMBOL(omap2_mcbsp_set_clks_src); | ||
103 | |||
104 | |||
105 | /* Platform data */ | ||
49 | 106 | ||
50 | #ifdef CONFIG_ARCH_OMAP2420 | 107 | #ifdef CONFIG_ARCH_OMAP2420 |
51 | static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { | 108 | static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { |
@@ -55,7 +112,6 @@ static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { | |||
55 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, | 112 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, |
56 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, | 113 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, |
57 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, | 114 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, |
58 | .ops = &omap2_mcbsp_ops, | ||
59 | }, | 115 | }, |
60 | { | 116 | { |
61 | .phys_base = OMAP24XX_MCBSP2_BASE, | 117 | .phys_base = OMAP24XX_MCBSP2_BASE, |
@@ -63,7 +119,6 @@ static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { | |||
63 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, | 119 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, |
64 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, | 120 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, |
65 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, | 121 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, |
66 | .ops = &omap2_mcbsp_ops, | ||
67 | }, | 122 | }, |
68 | }; | 123 | }; |
69 | #define OMAP2420_MCBSP_PDATA_SZ ARRAY_SIZE(omap2420_mcbsp_pdata) | 124 | #define OMAP2420_MCBSP_PDATA_SZ ARRAY_SIZE(omap2420_mcbsp_pdata) |
@@ -82,7 +137,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | |||
82 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, | 137 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, |
83 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, | 138 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, |
84 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, | 139 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, |
85 | .ops = &omap2_mcbsp_ops, | ||
86 | }, | 140 | }, |
87 | { | 141 | { |
88 | .phys_base = OMAP24XX_MCBSP2_BASE, | 142 | .phys_base = OMAP24XX_MCBSP2_BASE, |
@@ -90,7 +144,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | |||
90 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, | 144 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, |
91 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, | 145 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, |
92 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, | 146 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, |
93 | .ops = &omap2_mcbsp_ops, | ||
94 | }, | 147 | }, |
95 | { | 148 | { |
96 | .phys_base = OMAP2430_MCBSP3_BASE, | 149 | .phys_base = OMAP2430_MCBSP3_BASE, |
@@ -98,7 +151,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | |||
98 | .dma_tx_sync = OMAP24XX_DMA_MCBSP3_TX, | 151 | .dma_tx_sync = OMAP24XX_DMA_MCBSP3_TX, |
99 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, | 152 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, |
100 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, | 153 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, |
101 | .ops = &omap2_mcbsp_ops, | ||
102 | }, | 154 | }, |
103 | { | 155 | { |
104 | .phys_base = OMAP2430_MCBSP4_BASE, | 156 | .phys_base = OMAP2430_MCBSP4_BASE, |
@@ -106,7 +158,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | |||
106 | .dma_tx_sync = OMAP24XX_DMA_MCBSP4_TX, | 158 | .dma_tx_sync = OMAP24XX_DMA_MCBSP4_TX, |
107 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, | 159 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, |
108 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, | 160 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, |
109 | .ops = &omap2_mcbsp_ops, | ||
110 | }, | 161 | }, |
111 | { | 162 | { |
112 | .phys_base = OMAP2430_MCBSP5_BASE, | 163 | .phys_base = OMAP2430_MCBSP5_BASE, |
@@ -114,7 +165,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | |||
114 | .dma_tx_sync = OMAP24XX_DMA_MCBSP5_TX, | 165 | .dma_tx_sync = OMAP24XX_DMA_MCBSP5_TX, |
115 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, | 166 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, |
116 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, | 167 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, |
117 | .ops = &omap2_mcbsp_ops, | ||
118 | }, | 168 | }, |
119 | }; | 169 | }; |
120 | #define OMAP2430_MCBSP_PDATA_SZ ARRAY_SIZE(omap2430_mcbsp_pdata) | 170 | #define OMAP2430_MCBSP_PDATA_SZ ARRAY_SIZE(omap2430_mcbsp_pdata) |
@@ -133,7 +183,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
133 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, | 183 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, |
134 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, | 184 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, |
135 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, | 185 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, |
136 | .ops = &omap2_mcbsp_ops, | ||
137 | .buffer_size = 0x80, /* The FIFO has 128 locations */ | 186 | .buffer_size = 0x80, /* The FIFO has 128 locations */ |
138 | }, | 187 | }, |
139 | { | 188 | { |
@@ -143,7 +192,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
143 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, | 192 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, |
144 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, | 193 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, |
145 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, | 194 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, |
146 | .ops = &omap2_mcbsp_ops, | ||
147 | .buffer_size = 0x500, /* The FIFO has 1024 + 256 locations */ | 195 | .buffer_size = 0x500, /* The FIFO has 1024 + 256 locations */ |
148 | }, | 196 | }, |
149 | { | 197 | { |
@@ -153,7 +201,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
153 | .dma_tx_sync = OMAP24XX_DMA_MCBSP3_TX, | 201 | .dma_tx_sync = OMAP24XX_DMA_MCBSP3_TX, |
154 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, | 202 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, |
155 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, | 203 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, |
156 | .ops = &omap2_mcbsp_ops, | ||
157 | .buffer_size = 0x80, /* The FIFO has 128 locations */ | 204 | .buffer_size = 0x80, /* The FIFO has 128 locations */ |
158 | }, | 205 | }, |
159 | { | 206 | { |
@@ -162,7 +209,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
162 | .dma_tx_sync = OMAP24XX_DMA_MCBSP4_TX, | 209 | .dma_tx_sync = OMAP24XX_DMA_MCBSP4_TX, |
163 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, | 210 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, |
164 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, | 211 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, |
165 | .ops = &omap2_mcbsp_ops, | ||
166 | .buffer_size = 0x80, /* The FIFO has 128 locations */ | 212 | .buffer_size = 0x80, /* The FIFO has 128 locations */ |
167 | }, | 213 | }, |
168 | { | 214 | { |
@@ -171,7 +217,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
171 | .dma_tx_sync = OMAP24XX_DMA_MCBSP5_TX, | 217 | .dma_tx_sync = OMAP24XX_DMA_MCBSP5_TX, |
172 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, | 218 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, |
173 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, | 219 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, |
174 | .ops = &omap2_mcbsp_ops, | ||
175 | .buffer_size = 0x80, /* The FIFO has 128 locations */ | 220 | .buffer_size = 0x80, /* The FIFO has 128 locations */ |
176 | }, | 221 | }, |
177 | }; | 222 | }; |
@@ -189,28 +234,24 @@ static struct omap_mcbsp_platform_data omap44xx_mcbsp_pdata[] = { | |||
189 | .dma_rx_sync = OMAP44XX_DMA_MCBSP1_RX, | 234 | .dma_rx_sync = OMAP44XX_DMA_MCBSP1_RX, |
190 | .dma_tx_sync = OMAP44XX_DMA_MCBSP1_TX, | 235 | .dma_tx_sync = OMAP44XX_DMA_MCBSP1_TX, |
191 | .tx_irq = OMAP44XX_IRQ_MCBSP1, | 236 | .tx_irq = OMAP44XX_IRQ_MCBSP1, |
192 | .ops = &omap2_mcbsp_ops, | ||
193 | }, | 237 | }, |
194 | { | 238 | { |
195 | .phys_base = OMAP44XX_MCBSP2_BASE, | 239 | .phys_base = OMAP44XX_MCBSP2_BASE, |
196 | .dma_rx_sync = OMAP44XX_DMA_MCBSP2_RX, | 240 | .dma_rx_sync = OMAP44XX_DMA_MCBSP2_RX, |
197 | .dma_tx_sync = OMAP44XX_DMA_MCBSP2_TX, | 241 | .dma_tx_sync = OMAP44XX_DMA_MCBSP2_TX, |
198 | .tx_irq = OMAP44XX_IRQ_MCBSP2, | 242 | .tx_irq = OMAP44XX_IRQ_MCBSP2, |
199 | .ops = &omap2_mcbsp_ops, | ||
200 | }, | 243 | }, |
201 | { | 244 | { |
202 | .phys_base = OMAP44XX_MCBSP3_BASE, | 245 | .phys_base = OMAP44XX_MCBSP3_BASE, |
203 | .dma_rx_sync = OMAP44XX_DMA_MCBSP3_RX, | 246 | .dma_rx_sync = OMAP44XX_DMA_MCBSP3_RX, |
204 | .dma_tx_sync = OMAP44XX_DMA_MCBSP3_TX, | 247 | .dma_tx_sync = OMAP44XX_DMA_MCBSP3_TX, |
205 | .tx_irq = OMAP44XX_IRQ_MCBSP3, | 248 | .tx_irq = OMAP44XX_IRQ_MCBSP3, |
206 | .ops = &omap2_mcbsp_ops, | ||
207 | }, | 249 | }, |
208 | { | 250 | { |
209 | .phys_base = OMAP44XX_MCBSP4_BASE, | 251 | .phys_base = OMAP44XX_MCBSP4_BASE, |
210 | .dma_rx_sync = OMAP44XX_DMA_MCBSP4_RX, | 252 | .dma_rx_sync = OMAP44XX_DMA_MCBSP4_RX, |
211 | .dma_tx_sync = OMAP44XX_DMA_MCBSP4_TX, | 253 | .dma_tx_sync = OMAP44XX_DMA_MCBSP4_TX, |
212 | .tx_irq = OMAP44XX_IRQ_MCBSP4, | 254 | .tx_irq = OMAP44XX_IRQ_MCBSP4, |
213 | .ops = &omap2_mcbsp_ops, | ||
214 | }, | 255 | }, |
215 | }; | 256 | }; |
216 | #define OMAP44XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap44xx_mcbsp_pdata) | 257 | #define OMAP44XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap44xx_mcbsp_pdata) |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index ab403b2ed26b..074536ae401f 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -23,12 +23,11 @@ | |||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | #include <linux/module.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/spinlock.h> | ||
31 | #include <linux/list.h> | 29 | #include <linux/list.h> |
30 | #include <linux/slab.h> | ||
32 | #include <linux/ctype.h> | 31 | #include <linux/ctype.h> |
33 | #include <linux/debugfs.h> | 32 | #include <linux/debugfs.h> |
34 | #include <linux/seq_file.h> | 33 | #include <linux/seq_file.h> |
@@ -36,8 +35,7 @@ | |||
36 | 35 | ||
37 | #include <asm/system.h> | 36 | #include <asm/system.h> |
38 | 37 | ||
39 | #include <plat/control.h> | 38 | #include "control.h" |
40 | |||
41 | #include "mux.h" | 39 | #include "mux.h" |
42 | 40 | ||
43 | #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ | 41 | #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ |
@@ -87,7 +85,7 @@ static char *omap_mux_options; | |||
87 | int __init omap_mux_init_gpio(int gpio, int val) | 85 | int __init omap_mux_init_gpio(int gpio, int val) |
88 | { | 86 | { |
89 | struct omap_mux_entry *e; | 87 | struct omap_mux_entry *e; |
90 | struct omap_mux *gpio_mux; | 88 | struct omap_mux *gpio_mux = NULL; |
91 | u16 old_mode; | 89 | u16 old_mode; |
92 | u16 mux_mode; | 90 | u16 mux_mode; |
93 | int found = 0; | 91 | int found = 0; |
@@ -127,17 +125,16 @@ int __init omap_mux_init_gpio(int gpio, int val) | |||
127 | return 0; | 125 | return 0; |
128 | } | 126 | } |
129 | 127 | ||
130 | int __init omap_mux_init_signal(char *muxname, int val) | 128 | int __init omap_mux_init_signal(const char *muxname, int val) |
131 | { | 129 | { |
132 | struct omap_mux_entry *e; | 130 | struct omap_mux_entry *e; |
133 | char *m0_name = NULL, *mode_name = NULL; | 131 | const char *mode_name; |
134 | int found = 0; | 132 | int found = 0, mode0_len = 0; |
135 | 133 | ||
136 | mode_name = strchr(muxname, '.'); | 134 | mode_name = strchr(muxname, '.'); |
137 | if (mode_name) { | 135 | if (mode_name) { |
138 | *mode_name = '\0'; | 136 | mode0_len = strlen(muxname) - strlen(mode_name); |
139 | mode_name++; | 137 | mode_name++; |
140 | m0_name = muxname; | ||
141 | } else { | 138 | } else { |
142 | mode_name = muxname; | 139 | mode_name = muxname; |
143 | } | 140 | } |
@@ -147,9 +144,11 @@ int __init omap_mux_init_signal(char *muxname, int val) | |||
147 | char *m0_entry = m->muxnames[0]; | 144 | char *m0_entry = m->muxnames[0]; |
148 | int i; | 145 | int i; |
149 | 146 | ||
150 | if (m0_name && strcmp(m0_name, m0_entry)) | 147 | /* First check for full name in mode0.muxmode format */ |
148 | if (mode0_len && strncmp(muxname, m0_entry, mode0_len)) | ||
151 | continue; | 149 | continue; |
152 | 150 | ||
151 | /* Then check for muxmode only */ | ||
153 | for (i = 0; i < OMAP_MUX_NR_MODES; i++) { | 152 | for (i = 0; i < OMAP_MUX_NR_MODES; i++) { |
154 | char *mode_cur = m->muxnames[i]; | 153 | char *mode_cur = m->muxnames[i]; |
155 | 154 | ||
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index a8e040c2c7e9..350c04f27383 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h | |||
@@ -120,7 +120,7 @@ int omap_mux_init_gpio(int gpio, int val); | |||
120 | * @muxname: Mux name in mode0_name.signal_name format | 120 | * @muxname: Mux name in mode0_name.signal_name format |
121 | * @val: Options for the mux register value | 121 | * @val: Options for the mux register value |
122 | */ | 122 | */ |
123 | int omap_mux_init_signal(char *muxname, int val); | 123 | int omap_mux_init_signal(const char *muxname, int val); |
124 | 124 | ||
125 | #else | 125 | #else |
126 | 126 | ||
diff --git a/arch/arm/mach-omap2/mux2420.c b/arch/arm/mach-omap2/mux2420.c index fdb04a7eb8aa..414af5434456 100644 --- a/arch/arm/mach-omap2/mux2420.c +++ b/arch/arm/mach-omap2/mux2420.c | |||
@@ -507,7 +507,7 @@ static struct omap_mux __initdata omap2420_muxmodes[] = { | |||
507 | * Balls for 447-pin POP package | 507 | * Balls for 447-pin POP package |
508 | */ | 508 | */ |
509 | #ifdef CONFIG_DEBUG_FS | 509 | #ifdef CONFIG_DEBUG_FS |
510 | struct omap_ball __initdata omap2420_pop_ball[] = { | 510 | static struct omap_ball __initdata omap2420_pop_ball[] = { |
511 | _OMAP2420_BALLENTRY(CAM_D0, "y4", NULL), | 511 | _OMAP2420_BALLENTRY(CAM_D0, "y4", NULL), |
512 | _OMAP2420_BALLENTRY(CAM_D1, "y3", NULL), | 512 | _OMAP2420_BALLENTRY(CAM_D1, "y3", NULL), |
513 | _OMAP2420_BALLENTRY(CAM_D2, "u7", NULL), | 513 | _OMAP2420_BALLENTRY(CAM_D2, "u7", NULL), |
diff --git a/arch/arm/mach-omap2/mux2430.c b/arch/arm/mach-omap2/mux2430.c index 7dcaaa8af32a..84d2c5a7ecd7 100644 --- a/arch/arm/mach-omap2/mux2430.c +++ b/arch/arm/mach-omap2/mux2430.c | |||
@@ -586,7 +586,7 @@ static struct omap_mux __initdata omap2430_muxmodes[] = { | |||
586 | * 447-pin s-PBGA Package, 0.00mm Ball Pitch (Bottom) | 586 | * 447-pin s-PBGA Package, 0.00mm Ball Pitch (Bottom) |
587 | */ | 587 | */ |
588 | #ifdef CONFIG_DEBUG_FS | 588 | #ifdef CONFIG_DEBUG_FS |
589 | struct omap_ball __initdata omap2430_pop_ball[] = { | 589 | static struct omap_ball __initdata omap2430_pop_ball[] = { |
590 | _OMAP2430_BALLENTRY(CAM_D0, "t8", NULL), | 590 | _OMAP2430_BALLENTRY(CAM_D0, "t8", NULL), |
591 | _OMAP2430_BALLENTRY(CAM_D1, "t4", NULL), | 591 | _OMAP2430_BALLENTRY(CAM_D1, "t4", NULL), |
592 | _OMAP2430_BALLENTRY(CAM_D10, "r4", NULL), | 592 | _OMAP2430_BALLENTRY(CAM_D10, "r4", NULL), |
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c index f64d7eea3451..574e54ea3ab7 100644 --- a/arch/arm/mach-omap2/mux34xx.c +++ b/arch/arm/mach-omap2/mux34xx.c | |||
@@ -931,7 +931,7 @@ struct omap_ball __initdata omap3_cbc_ball[] = { | |||
931 | * Signals different on CUS package compared to superset | 931 | * Signals different on CUS package compared to superset |
932 | */ | 932 | */ |
933 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CUS) | 933 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CUS) |
934 | struct omap_mux __initdata omap3_cus_subset[] = { | 934 | static struct omap_mux __initdata omap3_cus_subset[] = { |
935 | _OMAP3_MUXENTRY(CAM_D10, 109, | 935 | _OMAP3_MUXENTRY(CAM_D10, 109, |
936 | "cam_d10", NULL, NULL, NULL, | 936 | "cam_d10", NULL, NULL, NULL, |
937 | "gpio_109", NULL, NULL, "safe_mode"), | 937 | "gpio_109", NULL, NULL, "safe_mode"), |
@@ -1077,7 +1077,7 @@ struct omap_mux __initdata omap3_cus_subset[] = { | |||
1077 | */ | 1077 | */ |
1078 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ | 1078 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ |
1079 | && defined(CONFIG_OMAP_PACKAGE_CUS) | 1079 | && defined(CONFIG_OMAP_PACKAGE_CUS) |
1080 | struct omap_ball __initdata omap3_cus_ball[] = { | 1080 | static struct omap_ball __initdata omap3_cus_ball[] = { |
1081 | _OMAP3_BALLENTRY(CAM_D0, "ab18", NULL), | 1081 | _OMAP3_BALLENTRY(CAM_D0, "ab18", NULL), |
1082 | _OMAP3_BALLENTRY(CAM_D1, "ac18", NULL), | 1082 | _OMAP3_BALLENTRY(CAM_D1, "ac18", NULL), |
1083 | _OMAP3_BALLENTRY(CAM_D10, "f21", NULL), | 1083 | _OMAP3_BALLENTRY(CAM_D10, "f21", NULL), |
@@ -1269,7 +1269,7 @@ struct omap_ball __initdata omap3_cus_ball[] = { | |||
1269 | * Signals different on CBB package comapared to superset | 1269 | * Signals different on CBB package comapared to superset |
1270 | */ | 1270 | */ |
1271 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBB) | 1271 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBB) |
1272 | struct omap_mux __initdata omap3_cbb_subset[] = { | 1272 | static struct omap_mux __initdata omap3_cbb_subset[] = { |
1273 | _OMAP3_MUXENTRY(CAM_D10, 109, | 1273 | _OMAP3_MUXENTRY(CAM_D10, 109, |
1274 | "cam_d10", NULL, NULL, NULL, | 1274 | "cam_d10", NULL, NULL, NULL, |
1275 | "gpio_109", NULL, NULL, "safe_mode"), | 1275 | "gpio_109", NULL, NULL, "safe_mode"), |
@@ -1390,7 +1390,7 @@ struct omap_mux __initdata omap3_cbb_subset[] = { | |||
1390 | */ | 1390 | */ |
1391 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ | 1391 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ |
1392 | && defined(CONFIG_OMAP_PACKAGE_CBB) | 1392 | && defined(CONFIG_OMAP_PACKAGE_CBB) |
1393 | struct omap_ball __initdata omap3_cbb_ball[] = { | 1393 | static struct omap_ball __initdata omap3_cbb_ball[] = { |
1394 | _OMAP3_BALLENTRY(CAM_D0, "ag17", NULL), | 1394 | _OMAP3_BALLENTRY(CAM_D0, "ag17", NULL), |
1395 | _OMAP3_BALLENTRY(CAM_D1, "ah17", NULL), | 1395 | _OMAP3_BALLENTRY(CAM_D1, "ah17", NULL), |
1396 | _OMAP3_BALLENTRY(CAM_D10, "b25", NULL), | 1396 | _OMAP3_BALLENTRY(CAM_D10, "b25", NULL), |
@@ -1600,7 +1600,7 @@ struct omap_ball __initdata omap3_cbb_ball[] = { | |||
1600 | * Signals different on 36XX CBP package comapared to 34XX CBC package | 1600 | * Signals different on 36XX CBP package comapared to 34XX CBC package |
1601 | */ | 1601 | */ |
1602 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBP) | 1602 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBP) |
1603 | struct omap_mux __initdata omap36xx_cbp_subset[] = { | 1603 | static struct omap_mux __initdata omap36xx_cbp_subset[] = { |
1604 | _OMAP3_MUXENTRY(CAM_D0, 99, | 1604 | _OMAP3_MUXENTRY(CAM_D0, 99, |
1605 | "cam_d0", NULL, "csi2_dx2", NULL, | 1605 | "cam_d0", NULL, "csi2_dx2", NULL, |
1606 | "gpio_99", NULL, NULL, "safe_mode"), | 1606 | "gpio_99", NULL, NULL, "safe_mode"), |
@@ -1818,7 +1818,7 @@ struct omap_mux __initdata omap36xx_cbp_subset[] = { | |||
1818 | */ | 1818 | */ |
1819 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ | 1819 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ |
1820 | && defined (CONFIG_OMAP_PACKAGE_CBP) | 1820 | && defined (CONFIG_OMAP_PACKAGE_CBP) |
1821 | struct omap_ball __initdata omap36xx_cbp_ball[] = { | 1821 | static struct omap_ball __initdata omap36xx_cbp_ball[] = { |
1822 | _OMAP3_BALLENTRY(CAM_D0, "ag17", NULL), | 1822 | _OMAP3_BALLENTRY(CAM_D0, "ag17", NULL), |
1823 | _OMAP3_BALLENTRY(CAM_D1, "ah17", NULL), | 1823 | _OMAP3_BALLENTRY(CAM_D1, "ah17", NULL), |
1824 | _OMAP3_BALLENTRY(CAM_D10, "b25", NULL), | 1824 | _OMAP3_BALLENTRY(CAM_D10, "b25", NULL), |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 13dc9794dcc2..923f9f5f91ce 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -61,10 +61,14 @@ static int __init omap_l2_cache_init(void) | |||
61 | omap_smc1(0x102, 0x1); | 61 | omap_smc1(0x102, 0x1); |
62 | 62 | ||
63 | /* | 63 | /* |
64 | * 32KB way size, 16-way associativity, | 64 | * 16-way associativity, parity disabled |
65 | * parity disabled | 65 | * Way size - 32KB (es1.0) |
66 | * Way size - 64KB (es2.0 +) | ||
66 | */ | 67 | */ |
67 | l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff); | 68 | if (omap_rev() == OMAP4430_REV_ES1_0) |
69 | l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff); | ||
70 | else | ||
71 | l2x0_init(l2cache_base, 0x0e070000, 0xc0000fff); | ||
68 | 72 | ||
69 | return 0; | 73 | return 0; |
70 | } | 74 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index cb911d7d1a3c..5a30658444d0 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -13,10 +13,102 @@ | |||
13 | * it under the terms of the GNU General Public License version 2 as | 13 | * it under the terms of the GNU General Public License version 2 as |
14 | * published by the Free Software Foundation. | 14 | * published by the Free Software Foundation. |
15 | * | 15 | * |
16 | * This code manages "OMAP modules" (on-chip devices) and their | 16 | * Introduction |
17 | * integration with Linux device driver and bus code. | 17 | * ------------ |
18 | * | 18 | * One way to view an OMAP SoC is as a collection of largely unrelated |
19 | * References: | 19 | * IP blocks connected by interconnects. The IP blocks include |
20 | * devices such as ARM processors, audio serial interfaces, UARTs, | ||
21 | * etc. Some of these devices, like the DSP, are created by TI; | ||
22 | * others, like the SGX, largely originate from external vendors. In | ||
23 | * TI's documentation, on-chip devices are referred to as "OMAP | ||
24 | * modules." Some of these IP blocks are identical across several | ||
25 | * OMAP versions. Others are revised frequently. | ||
26 | * | ||
27 | * These OMAP modules are tied together by various interconnects. | ||
28 | * Most of the address and data flow between modules is via OCP-based | ||
29 | * interconnects such as the L3 and L4 buses; but there are other | ||
30 | * interconnects that distribute the hardware clock tree, handle idle | ||
31 | * and reset signaling, supply power, and connect the modules to | ||
32 | * various pads or balls on the OMAP package. | ||
33 | * | ||
34 | * OMAP hwmod provides a consistent way to describe the on-chip | ||
35 | * hardware blocks and their integration into the rest of the chip. | ||
36 | * This description can be automatically generated from the TI | ||
37 | * hardware database. OMAP hwmod provides a standard, consistent API | ||
38 | * to reset, enable, idle, and disable these hardware blocks. And | ||
39 | * hwmod provides a way for other core code, such as the Linux device | ||
40 | * code or the OMAP power management and address space mapping code, | ||
41 | * to query the hardware database. | ||
42 | * | ||
43 | * Using hwmod | ||
44 | * ----------- | ||
45 | * Drivers won't call hwmod functions directly. That is done by the | ||
46 | * omap_device code, and in rare occasions, by custom integration code | ||
47 | * in arch/arm/ *omap*. The omap_device code includes functions to | ||
48 | * build a struct platform_device using omap_hwmod data, and that is | ||
49 | * currently how hwmod data is communicated to drivers and to the | ||
50 | * Linux driver model. Most drivers will call omap_hwmod functions only | ||
51 | * indirectly, via pm_runtime*() functions. | ||
52 | * | ||
53 | * From a layering perspective, here is where the OMAP hwmod code | ||
54 | * fits into the kernel software stack: | ||
55 | * | ||
56 | * +-------------------------------+ | ||
57 | * | Device driver code | | ||
58 | * | (e.g., drivers/) | | ||
59 | * +-------------------------------+ | ||
60 | * | Linux driver model | | ||
61 | * | (platform_device / | | ||
62 | * | platform_driver data/code) | | ||
63 | * +-------------------------------+ | ||
64 | * | OMAP core-driver integration | | ||
65 | * |(arch/arm/mach-omap2/devices.c)| | ||
66 | * +-------------------------------+ | ||
67 | * | omap_device code | | ||
68 | * | (../plat-omap/omap_device.c) | | ||
69 | * +-------------------------------+ | ||
70 | * ----> | omap_hwmod code/data | <----- | ||
71 | * | (../mach-omap2/omap_hwmod*) | | ||
72 | * +-------------------------------+ | ||
73 | * | OMAP clock/PRCM/register fns | | ||
74 | * | (__raw_{read,write}l, clk*) | | ||
75 | * +-------------------------------+ | ||
76 | * | ||
77 | * Device drivers should not contain any OMAP-specific code or data in | ||
78 | * them. They should only contain code to operate the IP block that | ||
79 | * the driver is responsible for. This is because these IP blocks can | ||
80 | * also appear in other SoCs, either from TI (such as DaVinci) or from | ||
81 | * other manufacturers; and drivers should be reusable across other | ||
82 | * platforms. | ||
83 | * | ||
84 | * The OMAP hwmod code also will attempt to reset and idle all on-chip | ||
85 | * devices upon boot. The goal here is for the kernel to be | ||
86 | * completely self-reliant and independent from bootloaders. This is | ||
87 | * to ensure a repeatable configuration, both to ensure consistent | ||
88 | * runtime behavior, and to make it easier for others to reproduce | ||
89 | * bugs. | ||
90 | * | ||
91 | * OMAP module activity states | ||
92 | * --------------------------- | ||
93 | * The hwmod code considers modules to be in one of several activity | ||
94 | * states. IP blocks start out in an UNKNOWN state, then once they | ||
95 | * are registered via the hwmod code, proceed to the REGISTERED state. | ||
96 | * Once their clock names are resolved to clock pointers, the module | ||
97 | * enters the CLKS_INITED state; and finally, once the module has been | ||
98 | * reset and the integration registers programmed, the INITIALIZED state | ||
99 | * is entered. The hwmod code will then place the module into either | ||
100 | * the IDLE state to save power, or in the case of a critical system | ||
101 | * module, the ENABLED state. | ||
102 | * | ||
103 | * OMAP core integration code can then call omap_hwmod*() functions | ||
104 | * directly to move the module between the IDLE, ENABLED, and DISABLED | ||
105 | * states, as needed. This is done during both the PM idle loop, and | ||
106 | * in the OMAP core integration code's implementation of the PM runtime | ||
107 | * functions. | ||
108 | * | ||
109 | * References | ||
110 | * ---------- | ||
111 | * This is a partial list. | ||
20 | * - OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 (SWPU064) | 112 | * - OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 (SWPU064) |
21 | * - OMAP2430 Multimedia Device POP Silicon Revision 2.1 (SWPU090) | 113 | * - OMAP2430 Multimedia Device POP Silicon Revision 2.1 (SWPU090) |
22 | * - OMAP34xx Multimedia Device Silicon Revision 3.1 (SWPU108) | 114 | * - OMAP34xx Multimedia Device Silicon Revision 3.1 (SWPU108) |
@@ -50,11 +142,13 @@ | |||
50 | #include <plat/powerdomain.h> | 142 | #include <plat/powerdomain.h> |
51 | #include <plat/clock.h> | 143 | #include <plat/clock.h> |
52 | #include <plat/omap_hwmod.h> | 144 | #include <plat/omap_hwmod.h> |
145 | #include <plat/prcm.h> | ||
53 | 146 | ||
54 | #include "cm.h" | 147 | #include "cm.h" |
148 | #include "prm.h" | ||
55 | 149 | ||
56 | /* Maximum microseconds to wait for OMAP module to reset */ | 150 | /* Maximum microseconds to wait for OMAP module to softreset */ |
57 | #define MAX_MODULE_RESET_WAIT 10000 | 151 | #define MAX_MODULE_SOFTRESET_WAIT 10000 |
58 | 152 | ||
59 | /* Name of the OMAP hwmod for the MPU */ | 153 | /* Name of the OMAP hwmod for the MPU */ |
60 | #define MPU_INITIATOR_NAME "mpu" | 154 | #define MPU_INITIATOR_NAME "mpu" |
@@ -90,7 +184,7 @@ static int _update_sysc_cache(struct omap_hwmod *oh) | |||
90 | 184 | ||
91 | /* XXX ensure module interface clock is up */ | 185 | /* XXX ensure module interface clock is up */ |
92 | 186 | ||
93 | oh->_sysc_cache = omap_hwmod_readl(oh, oh->class->sysc->sysc_offs); | 187 | oh->_sysc_cache = omap_hwmod_read(oh, oh->class->sysc->sysc_offs); |
94 | 188 | ||
95 | if (!(oh->class->sysc->sysc_flags & SYSC_NO_CACHE)) | 189 | if (!(oh->class->sysc->sysc_flags & SYSC_NO_CACHE)) |
96 | oh->_int_flags |= _HWMOD_SYSCONFIG_LOADED; | 190 | oh->_int_flags |= _HWMOD_SYSCONFIG_LOADED; |
@@ -117,7 +211,7 @@ static void _write_sysconfig(u32 v, struct omap_hwmod *oh) | |||
117 | 211 | ||
118 | if (oh->_sysc_cache != v) { | 212 | if (oh->_sysc_cache != v) { |
119 | oh->_sysc_cache = v; | 213 | oh->_sysc_cache = v; |
120 | omap_hwmod_writel(v, oh, oh->class->sysc->sysc_offs); | 214 | omap_hwmod_write(v, oh, oh->class->sysc->sysc_offs); |
121 | } | 215 | } |
122 | } | 216 | } |
123 | 217 | ||
@@ -544,6 +638,36 @@ static int _disable_clocks(struct omap_hwmod *oh) | |||
544 | return 0; | 638 | return 0; |
545 | } | 639 | } |
546 | 640 | ||
641 | static void _enable_optional_clocks(struct omap_hwmod *oh) | ||
642 | { | ||
643 | struct omap_hwmod_opt_clk *oc; | ||
644 | int i; | ||
645 | |||
646 | pr_debug("omap_hwmod: %s: enabling optional clocks\n", oh->name); | ||
647 | |||
648 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) | ||
649 | if (oc->_clk) { | ||
650 | pr_debug("omap_hwmod: enable %s:%s\n", oc->role, | ||
651 | oc->_clk->name); | ||
652 | clk_enable(oc->_clk); | ||
653 | } | ||
654 | } | ||
655 | |||
656 | static void _disable_optional_clocks(struct omap_hwmod *oh) | ||
657 | { | ||
658 | struct omap_hwmod_opt_clk *oc; | ||
659 | int i; | ||
660 | |||
661 | pr_debug("omap_hwmod: %s: disabling optional clocks\n", oh->name); | ||
662 | |||
663 | for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) | ||
664 | if (oc->_clk) { | ||
665 | pr_debug("omap_hwmod: disable %s:%s\n", oc->role, | ||
666 | oc->_clk->name); | ||
667 | clk_disable(oc->_clk); | ||
668 | } | ||
669 | } | ||
670 | |||
547 | /** | 671 | /** |
548 | * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use | 672 | * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use |
549 | * @oh: struct omap_hwmod * | 673 | * @oh: struct omap_hwmod * |
@@ -622,7 +746,7 @@ static void __iomem *_find_mpu_rt_base(struct omap_hwmod *oh, u8 index) | |||
622 | } | 746 | } |
623 | 747 | ||
624 | /** | 748 | /** |
625 | * _sysc_enable - try to bring a module out of idle via OCP_SYSCONFIG | 749 | * _enable_sysc - try to bring a module out of idle via OCP_SYSCONFIG |
626 | * @oh: struct omap_hwmod * | 750 | * @oh: struct omap_hwmod * |
627 | * | 751 | * |
628 | * If module is marked as SWSUP_SIDLE, force the module out of slave | 752 | * If module is marked as SWSUP_SIDLE, force the module out of slave |
@@ -630,7 +754,7 @@ static void __iomem *_find_mpu_rt_base(struct omap_hwmod *oh, u8 index) | |||
630 | * as SWSUP_MSUSPEND, force the module out of master standby; | 754 | * as SWSUP_MSUSPEND, force the module out of master standby; |
631 | * otherwise, configure it for smart-standby. No return value. | 755 | * otherwise, configure it for smart-standby. No return value. |
632 | */ | 756 | */ |
633 | static void _sysc_enable(struct omap_hwmod *oh) | 757 | static void _enable_sysc(struct omap_hwmod *oh) |
634 | { | 758 | { |
635 | u8 idlemode, sf; | 759 | u8 idlemode, sf; |
636 | u32 v; | 760 | u32 v; |
@@ -653,14 +777,6 @@ static void _sysc_enable(struct omap_hwmod *oh) | |||
653 | _set_master_standbymode(oh, idlemode, &v); | 777 | _set_master_standbymode(oh, idlemode, &v); |
654 | } | 778 | } |
655 | 779 | ||
656 | if (sf & SYSC_HAS_AUTOIDLE) { | ||
657 | idlemode = (oh->flags & HWMOD_NO_OCP_AUTOIDLE) ? | ||
658 | 0 : 1; | ||
659 | _set_module_autoidle(oh, idlemode, &v); | ||
660 | } | ||
661 | |||
662 | /* XXX OCP ENAWAKEUP bit? */ | ||
663 | |||
664 | /* | 780 | /* |
665 | * XXX The clock framework should handle this, by | 781 | * XXX The clock framework should handle this, by |
666 | * calling into this code. But this must wait until the | 782 | * calling into this code. But this must wait until the |
@@ -671,10 +787,25 @@ static void _sysc_enable(struct omap_hwmod *oh) | |||
671 | _set_clockactivity(oh, oh->class->sysc->clockact, &v); | 787 | _set_clockactivity(oh, oh->class->sysc->clockact, &v); |
672 | 788 | ||
673 | _write_sysconfig(v, oh); | 789 | _write_sysconfig(v, oh); |
790 | |||
791 | /* If slave is in SMARTIDLE, also enable wakeup */ | ||
792 | if ((sf & SYSC_HAS_SIDLEMODE) && !(oh->flags & HWMOD_SWSUP_SIDLE)) | ||
793 | _enable_wakeup(oh); | ||
794 | |||
795 | /* | ||
796 | * Set the autoidle bit only after setting the smartidle bit | ||
797 | * Setting this will not have any impact on the other modules. | ||
798 | */ | ||
799 | if (sf & SYSC_HAS_AUTOIDLE) { | ||
800 | idlemode = (oh->flags & HWMOD_NO_OCP_AUTOIDLE) ? | ||
801 | 0 : 1; | ||
802 | _set_module_autoidle(oh, idlemode, &v); | ||
803 | _write_sysconfig(v, oh); | ||
804 | } | ||
674 | } | 805 | } |
675 | 806 | ||
676 | /** | 807 | /** |
677 | * _sysc_idle - try to put a module into idle via OCP_SYSCONFIG | 808 | * _idle_sysc - try to put a module into idle via OCP_SYSCONFIG |
678 | * @oh: struct omap_hwmod * | 809 | * @oh: struct omap_hwmod * |
679 | * | 810 | * |
680 | * If module is marked as SWSUP_SIDLE, force the module into slave | 811 | * If module is marked as SWSUP_SIDLE, force the module into slave |
@@ -682,7 +813,7 @@ static void _sysc_enable(struct omap_hwmod *oh) | |||
682 | * as SWSUP_MSUSPEND, force the module into master standby; otherwise, | 813 | * as SWSUP_MSUSPEND, force the module into master standby; otherwise, |
683 | * configure it for smart-standby. No return value. | 814 | * configure it for smart-standby. No return value. |
684 | */ | 815 | */ |
685 | static void _sysc_idle(struct omap_hwmod *oh) | 816 | static void _idle_sysc(struct omap_hwmod *oh) |
686 | { | 817 | { |
687 | u8 idlemode, sf; | 818 | u8 idlemode, sf; |
688 | u32 v; | 819 | u32 v; |
@@ -709,13 +840,13 @@ static void _sysc_idle(struct omap_hwmod *oh) | |||
709 | } | 840 | } |
710 | 841 | ||
711 | /** | 842 | /** |
712 | * _sysc_shutdown - force a module into idle via OCP_SYSCONFIG | 843 | * _shutdown_sysc - force a module into idle via OCP_SYSCONFIG |
713 | * @oh: struct omap_hwmod * | 844 | * @oh: struct omap_hwmod * |
714 | * | 845 | * |
715 | * Force the module into slave idle and master suspend. No return | 846 | * Force the module into slave idle and master suspend. No return |
716 | * value. | 847 | * value. |
717 | */ | 848 | */ |
718 | static void _sysc_shutdown(struct omap_hwmod *oh) | 849 | static void _shutdown_sysc(struct omap_hwmod *oh) |
719 | { | 850 | { |
720 | u32 v; | 851 | u32 v; |
721 | u8 sf; | 852 | u8 sf; |
@@ -767,10 +898,10 @@ static struct omap_hwmod *_lookup(const char *name) | |||
767 | * @data: not used; pass NULL | 898 | * @data: not used; pass NULL |
768 | * | 899 | * |
769 | * Called by omap_hwmod_late_init() (after omap2_clk_init()). | 900 | * Called by omap_hwmod_late_init() (after omap2_clk_init()). |
770 | * Resolves all clock names embedded in the hwmod. Must be called | 901 | * Resolves all clock names embedded in the hwmod. Returns -EINVAL if |
771 | * with omap_hwmod_mutex held. Returns -EINVAL if the omap_hwmod | 902 | * the omap_hwmod has not yet been registered or if the clocks have |
772 | * has not yet been registered or if the clocks have already been | 903 | * already been initialized, 0 on success, or a non-zero error on |
773 | * initialized, 0 on success, or a non-zero error on failure. | 904 | * failure. |
774 | */ | 905 | */ |
775 | static int _init_clocks(struct omap_hwmod *oh, void *data) | 906 | static int _init_clocks(struct omap_hwmod *oh, void *data) |
776 | { | 907 | { |
@@ -834,56 +965,202 @@ static int _wait_target_ready(struct omap_hwmod *oh) | |||
834 | } | 965 | } |
835 | 966 | ||
836 | /** | 967 | /** |
968 | * _lookup_hardreset - return the register bit shift for this hwmod/reset line | ||
969 | * @oh: struct omap_hwmod * | ||
970 | * @name: name of the reset line in the context of this hwmod | ||
971 | * | ||
972 | * Return the bit position of the reset line that match the | ||
973 | * input name. Return -ENOENT if not found. | ||
974 | */ | ||
975 | static u8 _lookup_hardreset(struct omap_hwmod *oh, const char *name) | ||
976 | { | ||
977 | int i; | ||
978 | |||
979 | for (i = 0; i < oh->rst_lines_cnt; i++) { | ||
980 | const char *rst_line = oh->rst_lines[i].name; | ||
981 | if (!strcmp(rst_line, name)) { | ||
982 | u8 shift = oh->rst_lines[i].rst_shift; | ||
983 | pr_debug("omap_hwmod: %s: _lookup_hardreset: %s: %d\n", | ||
984 | oh->name, rst_line, shift); | ||
985 | |||
986 | return shift; | ||
987 | } | ||
988 | } | ||
989 | |||
990 | return -ENOENT; | ||
991 | } | ||
992 | |||
993 | /** | ||
994 | * _assert_hardreset - assert the HW reset line of submodules | ||
995 | * contained in the hwmod module. | ||
996 | * @oh: struct omap_hwmod * | ||
997 | * @name: name of the reset line to lookup and assert | ||
998 | * | ||
999 | * Some IP like dsp, ipu or iva contain processor that require | ||
1000 | * an HW reset line to be assert / deassert in order to enable fully | ||
1001 | * the IP. | ||
1002 | */ | ||
1003 | static int _assert_hardreset(struct omap_hwmod *oh, const char *name) | ||
1004 | { | ||
1005 | u8 shift; | ||
1006 | |||
1007 | if (!oh) | ||
1008 | return -EINVAL; | ||
1009 | |||
1010 | shift = _lookup_hardreset(oh, name); | ||
1011 | if (IS_ERR_VALUE(shift)) | ||
1012 | return shift; | ||
1013 | |||
1014 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) | ||
1015 | return omap2_prm_assert_hardreset(oh->prcm.omap2.module_offs, | ||
1016 | shift); | ||
1017 | else if (cpu_is_omap44xx()) | ||
1018 | return omap4_prm_assert_hardreset(oh->prcm.omap4.rstctrl_reg, | ||
1019 | shift); | ||
1020 | else | ||
1021 | return -EINVAL; | ||
1022 | } | ||
1023 | |||
1024 | /** | ||
1025 | * _deassert_hardreset - deassert the HW reset line of submodules contained | ||
1026 | * in the hwmod module. | ||
1027 | * @oh: struct omap_hwmod * | ||
1028 | * @name: name of the reset line to look up and deassert | ||
1029 | * | ||
1030 | * Some IP like dsp, ipu or iva contain processor that require | ||
1031 | * an HW reset line to be assert / deassert in order to enable fully | ||
1032 | * the IP. | ||
1033 | */ | ||
1034 | static int _deassert_hardreset(struct omap_hwmod *oh, const char *name) | ||
1035 | { | ||
1036 | u8 shift; | ||
1037 | int r; | ||
1038 | |||
1039 | if (!oh) | ||
1040 | return -EINVAL; | ||
1041 | |||
1042 | shift = _lookup_hardreset(oh, name); | ||
1043 | if (IS_ERR_VALUE(shift)) | ||
1044 | return shift; | ||
1045 | |||
1046 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) | ||
1047 | r = omap2_prm_deassert_hardreset(oh->prcm.omap2.module_offs, | ||
1048 | shift); | ||
1049 | else if (cpu_is_omap44xx()) | ||
1050 | r = omap4_prm_deassert_hardreset(oh->prcm.omap4.rstctrl_reg, | ||
1051 | shift); | ||
1052 | else | ||
1053 | return -EINVAL; | ||
1054 | |||
1055 | if (r == -EBUSY) | ||
1056 | pr_warning("omap_hwmod: %s: failed to hardreset\n", oh->name); | ||
1057 | |||
1058 | return r; | ||
1059 | } | ||
1060 | |||
1061 | /** | ||
1062 | * _read_hardreset - read the HW reset line state of submodules | ||
1063 | * contained in the hwmod module | ||
1064 | * @oh: struct omap_hwmod * | ||
1065 | * @name: name of the reset line to look up and read | ||
1066 | * | ||
1067 | * Return the state of the reset line. | ||
1068 | */ | ||
1069 | static int _read_hardreset(struct omap_hwmod *oh, const char *name) | ||
1070 | { | ||
1071 | u8 shift; | ||
1072 | |||
1073 | if (!oh) | ||
1074 | return -EINVAL; | ||
1075 | |||
1076 | shift = _lookup_hardreset(oh, name); | ||
1077 | if (IS_ERR_VALUE(shift)) | ||
1078 | return shift; | ||
1079 | |||
1080 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { | ||
1081 | return omap2_prm_is_hardreset_asserted(oh->prcm.omap2.module_offs, | ||
1082 | shift); | ||
1083 | } else if (cpu_is_omap44xx()) { | ||
1084 | return omap4_prm_is_hardreset_asserted(oh->prcm.omap4.rstctrl_reg, | ||
1085 | shift); | ||
1086 | } else { | ||
1087 | return -EINVAL; | ||
1088 | } | ||
1089 | } | ||
1090 | |||
1091 | /** | ||
837 | * _reset - reset an omap_hwmod | 1092 | * _reset - reset an omap_hwmod |
838 | * @oh: struct omap_hwmod * | 1093 | * @oh: struct omap_hwmod * |
839 | * | 1094 | * |
840 | * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be | 1095 | * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be |
841 | * enabled for this to work. Must be called with omap_hwmod_mutex | 1096 | * enabled for this to work. Returns -EINVAL if the hwmod cannot be |
842 | * held. Returns -EINVAL if the hwmod cannot be reset this way or if | 1097 | * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if |
843 | * the hwmod is in the wrong state, -ETIMEDOUT if the module did not | 1098 | * the module did not reset in time, or 0 upon success. |
844 | * reset in time, or 0 upon success. | 1099 | * |
1100 | * In OMAP3 a specific SYSSTATUS register is used to get the reset status. | ||
1101 | * Starting in OMAP4, some IPs does not have SYSSTATUS register and instead | ||
1102 | * use the SYSCONFIG softreset bit to provide the status. | ||
1103 | * | ||
1104 | * Note that some IP like McBSP does have a reset control but no reset status. | ||
845 | */ | 1105 | */ |
846 | static int _reset(struct omap_hwmod *oh) | 1106 | static int _reset(struct omap_hwmod *oh) |
847 | { | 1107 | { |
848 | u32 r, v; | 1108 | u32 v; |
849 | int c = 0; | 1109 | int c = 0; |
1110 | int ret = 0; | ||
850 | 1111 | ||
851 | if (!oh->class->sysc || | 1112 | if (!oh->class->sysc || |
852 | !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET) || | 1113 | !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET)) |
853 | (oh->class->sysc->sysc_flags & SYSS_MISSING)) | ||
854 | return -EINVAL; | 1114 | return -EINVAL; |
855 | 1115 | ||
856 | /* clocks must be on for this operation */ | 1116 | /* clocks must be on for this operation */ |
857 | if (oh->_state != _HWMOD_STATE_ENABLED) { | 1117 | if (oh->_state != _HWMOD_STATE_ENABLED) { |
858 | WARN(1, "omap_hwmod: %s: reset can only be entered from " | 1118 | pr_warning("omap_hwmod: %s: reset can only be entered from " |
859 | "enabled state\n", oh->name); | 1119 | "enabled state\n", oh->name); |
860 | return -EINVAL; | 1120 | return -EINVAL; |
861 | } | 1121 | } |
862 | 1122 | ||
1123 | /* For some modules, all optionnal clocks need to be enabled as well */ | ||
1124 | if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET) | ||
1125 | _enable_optional_clocks(oh); | ||
1126 | |||
863 | pr_debug("omap_hwmod: %s: resetting\n", oh->name); | 1127 | pr_debug("omap_hwmod: %s: resetting\n", oh->name); |
864 | 1128 | ||
865 | v = oh->_sysc_cache; | 1129 | v = oh->_sysc_cache; |
866 | r = _set_softreset(oh, &v); | 1130 | ret = _set_softreset(oh, &v); |
867 | if (r) | 1131 | if (ret) |
868 | return r; | 1132 | goto dis_opt_clks; |
869 | _write_sysconfig(v, oh); | 1133 | _write_sysconfig(v, oh); |
870 | 1134 | ||
871 | omap_test_timeout((omap_hwmod_readl(oh, oh->class->sysc->syss_offs) & | 1135 | if (oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS) |
872 | SYSS_RESETDONE_MASK), | 1136 | omap_test_timeout((omap_hwmod_read(oh, |
873 | MAX_MODULE_RESET_WAIT, c); | 1137 | oh->class->sysc->syss_offs) |
874 | 1138 | & SYSS_RESETDONE_MASK), | |
875 | if (c == MAX_MODULE_RESET_WAIT) | 1139 | MAX_MODULE_SOFTRESET_WAIT, c); |
876 | WARN(1, "omap_hwmod: %s: failed to reset in %d usec\n", | 1140 | else if (oh->class->sysc->sysc_flags & SYSC_HAS_RESET_STATUS) |
877 | oh->name, MAX_MODULE_RESET_WAIT); | 1141 | omap_test_timeout(!(omap_hwmod_read(oh, |
1142 | oh->class->sysc->sysc_offs) | ||
1143 | & SYSC_TYPE2_SOFTRESET_MASK), | ||
1144 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
1145 | |||
1146 | if (c == MAX_MODULE_SOFTRESET_WAIT) | ||
1147 | pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n", | ||
1148 | oh->name, MAX_MODULE_SOFTRESET_WAIT); | ||
878 | else | 1149 | else |
879 | pr_debug("omap_hwmod: %s: reset in %d usec\n", oh->name, c); | 1150 | pr_debug("omap_hwmod: %s: softreset in %d usec\n", oh->name, c); |
880 | 1151 | ||
881 | /* | 1152 | /* |
882 | * XXX add _HWMOD_STATE_WEDGED for modules that don't come back from | 1153 | * XXX add _HWMOD_STATE_WEDGED for modules that don't come back from |
883 | * _wait_target_ready() or _reset() | 1154 | * _wait_target_ready() or _reset() |
884 | */ | 1155 | */ |
885 | 1156 | ||
886 | return (c == MAX_MODULE_RESET_WAIT) ? -ETIMEDOUT : 0; | 1157 | ret = (c == MAX_MODULE_SOFTRESET_WAIT) ? -ETIMEDOUT : 0; |
1158 | |||
1159 | dis_opt_clks: | ||
1160 | if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET) | ||
1161 | _disable_optional_clocks(oh); | ||
1162 | |||
1163 | return ret; | ||
887 | } | 1164 | } |
888 | 1165 | ||
889 | /** | 1166 | /** |
@@ -891,9 +1168,11 @@ static int _reset(struct omap_hwmod *oh) | |||
891 | * @oh: struct omap_hwmod * | 1168 | * @oh: struct omap_hwmod * |
892 | * | 1169 | * |
893 | * Enables an omap_hwmod @oh such that the MPU can access the hwmod's | 1170 | * Enables an omap_hwmod @oh such that the MPU can access the hwmod's |
894 | * register target. Must be called with omap_hwmod_mutex held. | 1171 | * register target. (This function has a full name -- |
895 | * Returns -EINVAL if the hwmod is in the wrong state or passes along | 1172 | * _omap_hwmod_enable() rather than simply _enable() -- because it is |
896 | * the return value of _wait_target_ready(). | 1173 | * currently required by the pm34xx.c idle loop.) Returns -EINVAL if |
1174 | * the hwmod is in the wrong state or passes along the return value of | ||
1175 | * _wait_target_ready(). | ||
897 | */ | 1176 | */ |
898 | int _omap_hwmod_enable(struct omap_hwmod *oh) | 1177 | int _omap_hwmod_enable(struct omap_hwmod *oh) |
899 | { | 1178 | { |
@@ -909,6 +1188,15 @@ int _omap_hwmod_enable(struct omap_hwmod *oh) | |||
909 | 1188 | ||
910 | pr_debug("omap_hwmod: %s: enabling\n", oh->name); | 1189 | pr_debug("omap_hwmod: %s: enabling\n", oh->name); |
911 | 1190 | ||
1191 | /* | ||
1192 | * If an IP contains only one HW reset line, then de-assert it in order | ||
1193 | * to allow to enable the clocks. Otherwise the PRCM will return | ||
1194 | * Intransition status, and the init will failed. | ||
1195 | */ | ||
1196 | if ((oh->_state == _HWMOD_STATE_INITIALIZED || | ||
1197 | oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1) | ||
1198 | _deassert_hardreset(oh, oh->rst_lines[0].name); | ||
1199 | |||
912 | /* XXX mux balls */ | 1200 | /* XXX mux balls */ |
913 | 1201 | ||
914 | _add_initiator_dep(oh, mpu_oh); | 1202 | _add_initiator_dep(oh, mpu_oh); |
@@ -922,7 +1210,7 @@ int _omap_hwmod_enable(struct omap_hwmod *oh) | |||
922 | if (oh->class->sysc) { | 1210 | if (oh->class->sysc) { |
923 | if (!(oh->_int_flags & _HWMOD_SYSCONFIG_LOADED)) | 1211 | if (!(oh->_int_flags & _HWMOD_SYSCONFIG_LOADED)) |
924 | _update_sysc_cache(oh); | 1212 | _update_sysc_cache(oh); |
925 | _sysc_enable(oh); | 1213 | _enable_sysc(oh); |
926 | } | 1214 | } |
927 | } else { | 1215 | } else { |
928 | pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n", | 1216 | pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n", |
@@ -933,12 +1221,14 @@ int _omap_hwmod_enable(struct omap_hwmod *oh) | |||
933 | } | 1221 | } |
934 | 1222 | ||
935 | /** | 1223 | /** |
936 | * _idle - idle an omap_hwmod | 1224 | * _omap_hwmod_idle - idle an omap_hwmod |
937 | * @oh: struct omap_hwmod * | 1225 | * @oh: struct omap_hwmod * |
938 | * | 1226 | * |
939 | * Idles an omap_hwmod @oh. This should be called once the hwmod has | 1227 | * Idles an omap_hwmod @oh. This should be called once the hwmod has |
940 | * no further work. Returns -EINVAL if the hwmod is in the wrong | 1228 | * no further work. (This function has a full name -- |
941 | * state or returns 0. | 1229 | * _omap_hwmod_idle() rather than simply _idle() -- because it is |
1230 | * currently required by the pm34xx.c idle loop.) Returns -EINVAL if | ||
1231 | * the hwmod is in the wrong state or returns 0. | ||
942 | */ | 1232 | */ |
943 | int _omap_hwmod_idle(struct omap_hwmod *oh) | 1233 | int _omap_hwmod_idle(struct omap_hwmod *oh) |
944 | { | 1234 | { |
@@ -951,7 +1241,7 @@ int _omap_hwmod_idle(struct omap_hwmod *oh) | |||
951 | pr_debug("omap_hwmod: %s: idling\n", oh->name); | 1241 | pr_debug("omap_hwmod: %s: idling\n", oh->name); |
952 | 1242 | ||
953 | if (oh->class->sysc) | 1243 | if (oh->class->sysc) |
954 | _sysc_idle(oh); | 1244 | _idle_sysc(oh); |
955 | _del_initiator_dep(oh, mpu_oh); | 1245 | _del_initiator_dep(oh, mpu_oh); |
956 | _disable_clocks(oh); | 1246 | _disable_clocks(oh); |
957 | 1247 | ||
@@ -981,10 +1271,21 @@ static int _shutdown(struct omap_hwmod *oh) | |||
981 | pr_debug("omap_hwmod: %s: disabling\n", oh->name); | 1271 | pr_debug("omap_hwmod: %s: disabling\n", oh->name); |
982 | 1272 | ||
983 | if (oh->class->sysc) | 1273 | if (oh->class->sysc) |
984 | _sysc_shutdown(oh); | 1274 | _shutdown_sysc(oh); |
985 | _del_initiator_dep(oh, mpu_oh); | 1275 | |
986 | /* XXX what about the other system initiators here? DMA, tesla, d2d */ | 1276 | /* |
987 | _disable_clocks(oh); | 1277 | * If an IP contains only one HW reset line, then assert it |
1278 | * before disabling the clocks and shutting down the IP. | ||
1279 | */ | ||
1280 | if (oh->rst_lines_cnt == 1) | ||
1281 | _assert_hardreset(oh, oh->rst_lines[0].name); | ||
1282 | |||
1283 | /* clocks and deps are already disabled in idle */ | ||
1284 | if (oh->_state == _HWMOD_STATE_ENABLED) { | ||
1285 | _del_initiator_dep(oh, mpu_oh); | ||
1286 | /* XXX what about the other system initiators here? dma, dsp */ | ||
1287 | _disable_clocks(oh); | ||
1288 | } | ||
988 | /* XXX Should this code also force-disable the optional clocks? */ | 1289 | /* XXX Should this code also force-disable the optional clocks? */ |
989 | 1290 | ||
990 | /* XXX mux any associated balls to safe mode */ | 1291 | /* XXX mux any associated balls to safe mode */ |
@@ -1000,11 +1301,10 @@ static int _shutdown(struct omap_hwmod *oh) | |||
1000 | * @skip_setup_idle_p: do not idle hwmods at the end of the fn if 1 | 1301 | * @skip_setup_idle_p: do not idle hwmods at the end of the fn if 1 |
1001 | * | 1302 | * |
1002 | * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh | 1303 | * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh |
1003 | * OCP_SYSCONFIG register. Must be called with omap_hwmod_mutex held. | 1304 | * OCP_SYSCONFIG register. @skip_setup_idle is intended to be used on |
1004 | * @skip_setup_idle is intended to be used on a system that will not | 1305 | * a system that will not call omap_hwmod_enable() to enable devices |
1005 | * call omap_hwmod_enable() to enable devices (e.g., a system without | 1306 | * (e.g., a system without PM runtime). Returns -EINVAL if the hwmod |
1006 | * PM runtime). Returns -EINVAL if the hwmod is in the wrong state or | 1307 | * is in the wrong state or returns 0. |
1007 | * returns 0. | ||
1008 | */ | 1308 | */ |
1009 | static int _setup(struct omap_hwmod *oh, void *data) | 1309 | static int _setup(struct omap_hwmod *oh, void *data) |
1010 | { | 1310 | { |
@@ -1034,8 +1334,19 @@ static int _setup(struct omap_hwmod *oh, void *data) | |||
1034 | } | 1334 | } |
1035 | } | 1335 | } |
1036 | 1336 | ||
1337 | mutex_init(&oh->_mutex); | ||
1037 | oh->_state = _HWMOD_STATE_INITIALIZED; | 1338 | oh->_state = _HWMOD_STATE_INITIALIZED; |
1038 | 1339 | ||
1340 | /* | ||
1341 | * In the case of hwmod with hardreset that should not be | ||
1342 | * de-assert at boot time, we have to keep the module | ||
1343 | * initialized, because we cannot enable it properly with the | ||
1344 | * reset asserted. Exit without warning because that behavior is | ||
1345 | * expected. | ||
1346 | */ | ||
1347 | if ((oh->flags & HWMOD_INIT_NO_RESET) && oh->rst_lines_cnt == 1) | ||
1348 | return 0; | ||
1349 | |||
1039 | r = _omap_hwmod_enable(oh); | 1350 | r = _omap_hwmod_enable(oh); |
1040 | if (r) { | 1351 | if (r) { |
1041 | pr_warning("omap_hwmod: %s: cannot be enabled (%d)\n", | 1352 | pr_warning("omap_hwmod: %s: cannot be enabled (%d)\n", |
@@ -1044,16 +1355,16 @@ static int _setup(struct omap_hwmod *oh, void *data) | |||
1044 | } | 1355 | } |
1045 | 1356 | ||
1046 | if (!(oh->flags & HWMOD_INIT_NO_RESET)) { | 1357 | if (!(oh->flags & HWMOD_INIT_NO_RESET)) { |
1358 | _reset(oh); | ||
1359 | |||
1047 | /* | 1360 | /* |
1048 | * XXX Do the OCP_SYSCONFIG bits need to be | 1361 | * OCP_SYSCONFIG bits need to be reprogrammed after a softreset. |
1049 | * reprogrammed after a reset? If not, then this can | 1362 | * The _omap_hwmod_enable() function should be split to |
1050 | * be removed. If they do, then probably the | 1363 | * avoid the rewrite of the OCP_SYSCONFIG register. |
1051 | * _omap_hwmod_enable() function should be split to avoid the | ||
1052 | * rewrite of the OCP_SYSCONFIG register. | ||
1053 | */ | 1364 | */ |
1054 | if (oh->class->sysc) { | 1365 | if (oh->class->sysc) { |
1055 | _update_sysc_cache(oh); | 1366 | _update_sysc_cache(oh); |
1056 | _sysc_enable(oh); | 1367 | _enable_sysc(oh); |
1057 | } | 1368 | } |
1058 | } | 1369 | } |
1059 | 1370 | ||
@@ -1067,14 +1378,20 @@ static int _setup(struct omap_hwmod *oh, void *data) | |||
1067 | 1378 | ||
1068 | /* Public functions */ | 1379 | /* Public functions */ |
1069 | 1380 | ||
1070 | u32 omap_hwmod_readl(struct omap_hwmod *oh, u16 reg_offs) | 1381 | u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs) |
1071 | { | 1382 | { |
1072 | return __raw_readl(oh->_mpu_rt_va + reg_offs); | 1383 | if (oh->flags & HWMOD_16BIT_REG) |
1384 | return __raw_readw(oh->_mpu_rt_va + reg_offs); | ||
1385 | else | ||
1386 | return __raw_readl(oh->_mpu_rt_va + reg_offs); | ||
1073 | } | 1387 | } |
1074 | 1388 | ||
1075 | void omap_hwmod_writel(u32 v, struct omap_hwmod *oh, u16 reg_offs) | 1389 | void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs) |
1076 | { | 1390 | { |
1077 | __raw_writel(v, oh->_mpu_rt_va + reg_offs); | 1391 | if (oh->flags & HWMOD_16BIT_REG) |
1392 | __raw_writew(v, oh->_mpu_rt_va + reg_offs); | ||
1393 | else | ||
1394 | __raw_writel(v, oh->_mpu_rt_va + reg_offs); | ||
1078 | } | 1395 | } |
1079 | 1396 | ||
1080 | /** | 1397 | /** |
@@ -1309,7 +1626,7 @@ int omap_hwmod_unregister(struct omap_hwmod *oh) | |||
1309 | * omap_hwmod_enable - enable an omap_hwmod | 1626 | * omap_hwmod_enable - enable an omap_hwmod |
1310 | * @oh: struct omap_hwmod * | 1627 | * @oh: struct omap_hwmod * |
1311 | * | 1628 | * |
1312 | * Enable an omap_hwomd @oh. Intended to be called by omap_device_enable(). | 1629 | * Enable an omap_hwmod @oh. Intended to be called by omap_device_enable(). |
1313 | * Returns -EINVAL on error or passes along the return value from _enable(). | 1630 | * Returns -EINVAL on error or passes along the return value from _enable(). |
1314 | */ | 1631 | */ |
1315 | int omap_hwmod_enable(struct omap_hwmod *oh) | 1632 | int omap_hwmod_enable(struct omap_hwmod *oh) |
@@ -1319,9 +1636,9 @@ int omap_hwmod_enable(struct omap_hwmod *oh) | |||
1319 | if (!oh) | 1636 | if (!oh) |
1320 | return -EINVAL; | 1637 | return -EINVAL; |
1321 | 1638 | ||
1322 | mutex_lock(&omap_hwmod_mutex); | 1639 | mutex_lock(&oh->_mutex); |
1323 | r = _omap_hwmod_enable(oh); | 1640 | r = _omap_hwmod_enable(oh); |
1324 | mutex_unlock(&omap_hwmod_mutex); | 1641 | mutex_unlock(&oh->_mutex); |
1325 | 1642 | ||
1326 | return r; | 1643 | return r; |
1327 | } | 1644 | } |
@@ -1331,7 +1648,7 @@ int omap_hwmod_enable(struct omap_hwmod *oh) | |||
1331 | * omap_hwmod_idle - idle an omap_hwmod | 1648 | * omap_hwmod_idle - idle an omap_hwmod |
1332 | * @oh: struct omap_hwmod * | 1649 | * @oh: struct omap_hwmod * |
1333 | * | 1650 | * |
1334 | * Idle an omap_hwomd @oh. Intended to be called by omap_device_idle(). | 1651 | * Idle an omap_hwmod @oh. Intended to be called by omap_device_idle(). |
1335 | * Returns -EINVAL on error or passes along the return value from _idle(). | 1652 | * Returns -EINVAL on error or passes along the return value from _idle(). |
1336 | */ | 1653 | */ |
1337 | int omap_hwmod_idle(struct omap_hwmod *oh) | 1654 | int omap_hwmod_idle(struct omap_hwmod *oh) |
@@ -1339,9 +1656,9 @@ int omap_hwmod_idle(struct omap_hwmod *oh) | |||
1339 | if (!oh) | 1656 | if (!oh) |
1340 | return -EINVAL; | 1657 | return -EINVAL; |
1341 | 1658 | ||
1342 | mutex_lock(&omap_hwmod_mutex); | 1659 | mutex_lock(&oh->_mutex); |
1343 | _omap_hwmod_idle(oh); | 1660 | _omap_hwmod_idle(oh); |
1344 | mutex_unlock(&omap_hwmod_mutex); | 1661 | mutex_unlock(&oh->_mutex); |
1345 | 1662 | ||
1346 | return 0; | 1663 | return 0; |
1347 | } | 1664 | } |
@@ -1350,7 +1667,7 @@ int omap_hwmod_idle(struct omap_hwmod *oh) | |||
1350 | * omap_hwmod_shutdown - shutdown an omap_hwmod | 1667 | * omap_hwmod_shutdown - shutdown an omap_hwmod |
1351 | * @oh: struct omap_hwmod * | 1668 | * @oh: struct omap_hwmod * |
1352 | * | 1669 | * |
1353 | * Shutdown an omap_hwomd @oh. Intended to be called by | 1670 | * Shutdown an omap_hwmod @oh. Intended to be called by |
1354 | * omap_device_shutdown(). Returns -EINVAL on error or passes along | 1671 | * omap_device_shutdown(). Returns -EINVAL on error or passes along |
1355 | * the return value from _shutdown(). | 1672 | * the return value from _shutdown(). |
1356 | */ | 1673 | */ |
@@ -1359,9 +1676,9 @@ int omap_hwmod_shutdown(struct omap_hwmod *oh) | |||
1359 | if (!oh) | 1676 | if (!oh) |
1360 | return -EINVAL; | 1677 | return -EINVAL; |
1361 | 1678 | ||
1362 | mutex_lock(&omap_hwmod_mutex); | 1679 | mutex_lock(&oh->_mutex); |
1363 | _shutdown(oh); | 1680 | _shutdown(oh); |
1364 | mutex_unlock(&omap_hwmod_mutex); | 1681 | mutex_unlock(&oh->_mutex); |
1365 | 1682 | ||
1366 | return 0; | 1683 | return 0; |
1367 | } | 1684 | } |
@@ -1374,9 +1691,9 @@ int omap_hwmod_shutdown(struct omap_hwmod *oh) | |||
1374 | */ | 1691 | */ |
1375 | int omap_hwmod_enable_clocks(struct omap_hwmod *oh) | 1692 | int omap_hwmod_enable_clocks(struct omap_hwmod *oh) |
1376 | { | 1693 | { |
1377 | mutex_lock(&omap_hwmod_mutex); | 1694 | mutex_lock(&oh->_mutex); |
1378 | _enable_clocks(oh); | 1695 | _enable_clocks(oh); |
1379 | mutex_unlock(&omap_hwmod_mutex); | 1696 | mutex_unlock(&oh->_mutex); |
1380 | 1697 | ||
1381 | return 0; | 1698 | return 0; |
1382 | } | 1699 | } |
@@ -1389,9 +1706,9 @@ int omap_hwmod_enable_clocks(struct omap_hwmod *oh) | |||
1389 | */ | 1706 | */ |
1390 | int omap_hwmod_disable_clocks(struct omap_hwmod *oh) | 1707 | int omap_hwmod_disable_clocks(struct omap_hwmod *oh) |
1391 | { | 1708 | { |
1392 | mutex_lock(&omap_hwmod_mutex); | 1709 | mutex_lock(&oh->_mutex); |
1393 | _disable_clocks(oh); | 1710 | _disable_clocks(oh); |
1394 | mutex_unlock(&omap_hwmod_mutex); | 1711 | mutex_unlock(&oh->_mutex); |
1395 | 1712 | ||
1396 | return 0; | 1713 | return 0; |
1397 | } | 1714 | } |
@@ -1421,7 +1738,7 @@ void omap_hwmod_ocp_barrier(struct omap_hwmod *oh) | |||
1421 | * Forces posted writes to complete on the OCP thread handling | 1738 | * Forces posted writes to complete on the OCP thread handling |
1422 | * register writes | 1739 | * register writes |
1423 | */ | 1740 | */ |
1424 | omap_hwmod_readl(oh, oh->class->sysc->sysc_offs); | 1741 | omap_hwmod_read(oh, oh->class->sysc->sysc_offs); |
1425 | } | 1742 | } |
1426 | 1743 | ||
1427 | /** | 1744 | /** |
@@ -1430,20 +1747,18 @@ void omap_hwmod_ocp_barrier(struct omap_hwmod *oh) | |||
1430 | * | 1747 | * |
1431 | * Under some conditions, a driver may wish to reset the entire device. | 1748 | * Under some conditions, a driver may wish to reset the entire device. |
1432 | * Called from omap_device code. Returns -EINVAL on error or passes along | 1749 | * Called from omap_device code. Returns -EINVAL on error or passes along |
1433 | * the return value from _reset()/_enable(). | 1750 | * the return value from _reset(). |
1434 | */ | 1751 | */ |
1435 | int omap_hwmod_reset(struct omap_hwmod *oh) | 1752 | int omap_hwmod_reset(struct omap_hwmod *oh) |
1436 | { | 1753 | { |
1437 | int r; | 1754 | int r; |
1438 | 1755 | ||
1439 | if (!oh || !(oh->_state & _HWMOD_STATE_ENABLED)) | 1756 | if (!oh) |
1440 | return -EINVAL; | 1757 | return -EINVAL; |
1441 | 1758 | ||
1442 | mutex_lock(&omap_hwmod_mutex); | 1759 | mutex_lock(&oh->_mutex); |
1443 | r = _reset(oh); | 1760 | r = _reset(oh); |
1444 | if (!r) | 1761 | mutex_unlock(&oh->_mutex); |
1445 | r = _omap_hwmod_enable(oh); | ||
1446 | mutex_unlock(&omap_hwmod_mutex); | ||
1447 | 1762 | ||
1448 | return r; | 1763 | return r; |
1449 | } | 1764 | } |
@@ -1468,7 +1783,7 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh) | |||
1468 | { | 1783 | { |
1469 | int ret, i; | 1784 | int ret, i; |
1470 | 1785 | ||
1471 | ret = oh->mpu_irqs_cnt + oh->sdma_chs_cnt; | 1786 | ret = oh->mpu_irqs_cnt + oh->sdma_reqs_cnt; |
1472 | 1787 | ||
1473 | for (i = 0; i < oh->slaves_cnt; i++) | 1788 | for (i = 0; i < oh->slaves_cnt; i++) |
1474 | ret += oh->slaves[i]->addr_cnt; | 1789 | ret += oh->slaves[i]->addr_cnt; |
@@ -1501,10 +1816,10 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) | |||
1501 | r++; | 1816 | r++; |
1502 | } | 1817 | } |
1503 | 1818 | ||
1504 | for (i = 0; i < oh->sdma_chs_cnt; i++) { | 1819 | for (i = 0; i < oh->sdma_reqs_cnt; i++) { |
1505 | (res + r)->name = (oh->sdma_chs + i)->name; | 1820 | (res + r)->name = (oh->sdma_reqs + i)->name; |
1506 | (res + r)->start = (oh->sdma_chs + i)->dma_ch; | 1821 | (res + r)->start = (oh->sdma_reqs + i)->dma_req; |
1507 | (res + r)->end = (oh->sdma_chs + i)->dma_ch; | 1822 | (res + r)->end = (oh->sdma_reqs + i)->dma_req; |
1508 | (res + r)->flags = IORESOURCE_DMA; | 1823 | (res + r)->flags = IORESOURCE_DMA; |
1509 | r++; | 1824 | r++; |
1510 | } | 1825 | } |
@@ -1644,9 +1959,9 @@ int omap_hwmod_enable_wakeup(struct omap_hwmod *oh) | |||
1644 | !(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) | 1959 | !(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) |
1645 | return -EINVAL; | 1960 | return -EINVAL; |
1646 | 1961 | ||
1647 | mutex_lock(&omap_hwmod_mutex); | 1962 | mutex_lock(&oh->_mutex); |
1648 | _enable_wakeup(oh); | 1963 | _enable_wakeup(oh); |
1649 | mutex_unlock(&omap_hwmod_mutex); | 1964 | mutex_unlock(&oh->_mutex); |
1650 | 1965 | ||
1651 | return 0; | 1966 | return 0; |
1652 | } | 1967 | } |
@@ -1669,14 +1984,92 @@ int omap_hwmod_disable_wakeup(struct omap_hwmod *oh) | |||
1669 | !(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) | 1984 | !(oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)) |
1670 | return -EINVAL; | 1985 | return -EINVAL; |
1671 | 1986 | ||
1672 | mutex_lock(&omap_hwmod_mutex); | 1987 | mutex_lock(&oh->_mutex); |
1673 | _disable_wakeup(oh); | 1988 | _disable_wakeup(oh); |
1674 | mutex_unlock(&omap_hwmod_mutex); | 1989 | mutex_unlock(&oh->_mutex); |
1675 | 1990 | ||
1676 | return 0; | 1991 | return 0; |
1677 | } | 1992 | } |
1678 | 1993 | ||
1679 | /** | 1994 | /** |
1995 | * omap_hwmod_assert_hardreset - assert the HW reset line of submodules | ||
1996 | * contained in the hwmod module. | ||
1997 | * @oh: struct omap_hwmod * | ||
1998 | * @name: name of the reset line to lookup and assert | ||
1999 | * | ||
2000 | * Some IP like dsp, ipu or iva contain processor that require | ||
2001 | * an HW reset line to be assert / deassert in order to enable fully | ||
2002 | * the IP. Returns -EINVAL if @oh is null or if the operation is not | ||
2003 | * yet supported on this OMAP; otherwise, passes along the return value | ||
2004 | * from _assert_hardreset(). | ||
2005 | */ | ||
2006 | int omap_hwmod_assert_hardreset(struct omap_hwmod *oh, const char *name) | ||
2007 | { | ||
2008 | int ret; | ||
2009 | |||
2010 | if (!oh) | ||
2011 | return -EINVAL; | ||
2012 | |||
2013 | mutex_lock(&oh->_mutex); | ||
2014 | ret = _assert_hardreset(oh, name); | ||
2015 | mutex_unlock(&oh->_mutex); | ||
2016 | |||
2017 | return ret; | ||
2018 | } | ||
2019 | |||
2020 | /** | ||
2021 | * omap_hwmod_deassert_hardreset - deassert the HW reset line of submodules | ||
2022 | * contained in the hwmod module. | ||
2023 | * @oh: struct omap_hwmod * | ||
2024 | * @name: name of the reset line to look up and deassert | ||
2025 | * | ||
2026 | * Some IP like dsp, ipu or iva contain processor that require | ||
2027 | * an HW reset line to be assert / deassert in order to enable fully | ||
2028 | * the IP. Returns -EINVAL if @oh is null or if the operation is not | ||
2029 | * yet supported on this OMAP; otherwise, passes along the return value | ||
2030 | * from _deassert_hardreset(). | ||
2031 | */ | ||
2032 | int omap_hwmod_deassert_hardreset(struct omap_hwmod *oh, const char *name) | ||
2033 | { | ||
2034 | int ret; | ||
2035 | |||
2036 | if (!oh) | ||
2037 | return -EINVAL; | ||
2038 | |||
2039 | mutex_lock(&oh->_mutex); | ||
2040 | ret = _deassert_hardreset(oh, name); | ||
2041 | mutex_unlock(&oh->_mutex); | ||
2042 | |||
2043 | return ret; | ||
2044 | } | ||
2045 | |||
2046 | /** | ||
2047 | * omap_hwmod_read_hardreset - read the HW reset line state of submodules | ||
2048 | * contained in the hwmod module | ||
2049 | * @oh: struct omap_hwmod * | ||
2050 | * @name: name of the reset line to look up and read | ||
2051 | * | ||
2052 | * Return the current state of the hwmod @oh's reset line named @name: | ||
2053 | * returns -EINVAL upon parameter error or if this operation | ||
2054 | * is unsupported on the current OMAP; otherwise, passes along the return | ||
2055 | * value from _read_hardreset(). | ||
2056 | */ | ||
2057 | int omap_hwmod_read_hardreset(struct omap_hwmod *oh, const char *name) | ||
2058 | { | ||
2059 | int ret; | ||
2060 | |||
2061 | if (!oh) | ||
2062 | return -EINVAL; | ||
2063 | |||
2064 | mutex_lock(&oh->_mutex); | ||
2065 | ret = _read_hardreset(oh, name); | ||
2066 | mutex_unlock(&oh->_mutex); | ||
2067 | |||
2068 | return ret; | ||
2069 | } | ||
2070 | |||
2071 | |||
2072 | /** | ||
1680 | * omap_hwmod_for_each_by_class - call @fn for each hwmod of class @classname | 2073 | * omap_hwmod_for_each_by_class - call @fn for each hwmod of class @classname |
1681 | * @classname: struct omap_hwmod_class name to search for | 2074 | * @classname: struct omap_hwmod_class name to search for |
1682 | * @fn: callback function pointer to call for each hwmod in class @classname | 2075 | * @fn: callback function pointer to call for each hwmod in class @classname |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index 3cc768e8bc04..adf6e3632a2b 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -15,10 +15,12 @@ | |||
15 | #include <mach/irqs.h> | 15 | #include <mach/irqs.h> |
16 | #include <plat/cpu.h> | 16 | #include <plat/cpu.h> |
17 | #include <plat/dma.h> | 17 | #include <plat/dma.h> |
18 | #include <plat/serial.h> | ||
18 | 19 | ||
19 | #include "omap_hwmod_common_data.h" | 20 | #include "omap_hwmod_common_data.h" |
20 | 21 | ||
21 | #include "prm-regbits-24xx.h" | 22 | #include "prm-regbits-24xx.h" |
23 | #include "cm-regbits-24xx.h" | ||
22 | 24 | ||
23 | /* | 25 | /* |
24 | * OMAP2420 hardware module integration data | 26 | * OMAP2420 hardware module integration data |
@@ -33,6 +35,7 @@ static struct omap_hwmod omap2420_mpu_hwmod; | |||
33 | static struct omap_hwmod omap2420_iva_hwmod; | 35 | static struct omap_hwmod omap2420_iva_hwmod; |
34 | static struct omap_hwmod omap2420_l3_main_hwmod; | 36 | static struct omap_hwmod omap2420_l3_main_hwmod; |
35 | static struct omap_hwmod omap2420_l4_core_hwmod; | 37 | static struct omap_hwmod omap2420_l4_core_hwmod; |
38 | static struct omap_hwmod omap2420_wd_timer2_hwmod; | ||
36 | 39 | ||
37 | /* L3 -> L4_CORE interface */ | 40 | /* L3 -> L4_CORE interface */ |
38 | static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = { | 41 | static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = { |
@@ -71,6 +74,9 @@ static struct omap_hwmod omap2420_l3_main_hwmod = { | |||
71 | }; | 74 | }; |
72 | 75 | ||
73 | static struct omap_hwmod omap2420_l4_wkup_hwmod; | 76 | static struct omap_hwmod omap2420_l4_wkup_hwmod; |
77 | static struct omap_hwmod omap2420_uart1_hwmod; | ||
78 | static struct omap_hwmod omap2420_uart2_hwmod; | ||
79 | static struct omap_hwmod omap2420_uart3_hwmod; | ||
74 | 80 | ||
75 | /* L4_CORE -> L4_WKUP interface */ | 81 | /* L4_CORE -> L4_WKUP interface */ |
76 | static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { | 82 | static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { |
@@ -79,6 +85,60 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { | |||
79 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 85 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
80 | }; | 86 | }; |
81 | 87 | ||
88 | /* L4 CORE -> UART1 interface */ | ||
89 | static struct omap_hwmod_addr_space omap2420_uart1_addr_space[] = { | ||
90 | { | ||
91 | .pa_start = OMAP2_UART1_BASE, | ||
92 | .pa_end = OMAP2_UART1_BASE + SZ_8K - 1, | ||
93 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { | ||
98 | .master = &omap2420_l4_core_hwmod, | ||
99 | .slave = &omap2420_uart1_hwmod, | ||
100 | .clk = "uart1_ick", | ||
101 | .addr = omap2420_uart1_addr_space, | ||
102 | .addr_cnt = ARRAY_SIZE(omap2420_uart1_addr_space), | ||
103 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
104 | }; | ||
105 | |||
106 | /* L4 CORE -> UART2 interface */ | ||
107 | static struct omap_hwmod_addr_space omap2420_uart2_addr_space[] = { | ||
108 | { | ||
109 | .pa_start = OMAP2_UART2_BASE, | ||
110 | .pa_end = OMAP2_UART2_BASE + SZ_1K - 1, | ||
111 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
112 | }, | ||
113 | }; | ||
114 | |||
115 | static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { | ||
116 | .master = &omap2420_l4_core_hwmod, | ||
117 | .slave = &omap2420_uart2_hwmod, | ||
118 | .clk = "uart2_ick", | ||
119 | .addr = omap2420_uart2_addr_space, | ||
120 | .addr_cnt = ARRAY_SIZE(omap2420_uart2_addr_space), | ||
121 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
122 | }; | ||
123 | |||
124 | /* L4 PER -> UART3 interface */ | ||
125 | static struct omap_hwmod_addr_space omap2420_uart3_addr_space[] = { | ||
126 | { | ||
127 | .pa_start = OMAP2_UART3_BASE, | ||
128 | .pa_end = OMAP2_UART3_BASE + SZ_1K - 1, | ||
129 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { | ||
134 | .master = &omap2420_l4_core_hwmod, | ||
135 | .slave = &omap2420_uart3_hwmod, | ||
136 | .clk = "uart3_ick", | ||
137 | .addr = omap2420_uart3_addr_space, | ||
138 | .addr_cnt = ARRAY_SIZE(omap2420_uart3_addr_space), | ||
139 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
140 | }; | ||
141 | |||
82 | /* Slave interfaces on the L4_CORE interconnect */ | 142 | /* Slave interfaces on the L4_CORE interconnect */ |
83 | static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = { | 143 | static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = { |
84 | &omap2420_l3_main__l4_core, | 144 | &omap2420_l3_main__l4_core, |
@@ -87,6 +147,9 @@ static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = { | |||
87 | /* Master interfaces on the L4_CORE interconnect */ | 147 | /* Master interfaces on the L4_CORE interconnect */ |
88 | static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = { | 148 | static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = { |
89 | &omap2420_l4_core__l4_wkup, | 149 | &omap2420_l4_core__l4_wkup, |
150 | &omap2_l4_core__uart1, | ||
151 | &omap2_l4_core__uart2, | ||
152 | &omap2_l4_core__uart3, | ||
90 | }; | 153 | }; |
91 | 154 | ||
92 | /* L4 CORE */ | 155 | /* L4 CORE */ |
@@ -165,12 +228,206 @@ static struct omap_hwmod omap2420_iva_hwmod = { | |||
165 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 228 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
166 | }; | 229 | }; |
167 | 230 | ||
231 | /* l4_wkup -> wd_timer2 */ | ||
232 | static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { | ||
233 | { | ||
234 | .pa_start = 0x48022000, | ||
235 | .pa_end = 0x4802207f, | ||
236 | .flags = ADDR_TYPE_RT | ||
237 | }, | ||
238 | }; | ||
239 | |||
240 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { | ||
241 | .master = &omap2420_l4_wkup_hwmod, | ||
242 | .slave = &omap2420_wd_timer2_hwmod, | ||
243 | .clk = "mpu_wdt_ick", | ||
244 | .addr = omap2420_wd_timer2_addrs, | ||
245 | .addr_cnt = ARRAY_SIZE(omap2420_wd_timer2_addrs), | ||
246 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
247 | }; | ||
248 | |||
249 | /* | ||
250 | * 'wd_timer' class | ||
251 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | ||
252 | * overflow condition | ||
253 | */ | ||
254 | |||
255 | static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = { | ||
256 | .rev_offs = 0x0000, | ||
257 | .sysc_offs = 0x0010, | ||
258 | .syss_offs = 0x0014, | ||
259 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET | | ||
260 | SYSC_HAS_AUTOIDLE), | ||
261 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
262 | }; | ||
263 | |||
264 | static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = { | ||
265 | .name = "wd_timer", | ||
266 | .sysc = &omap2420_wd_timer_sysc, | ||
267 | }; | ||
268 | |||
269 | /* wd_timer2 */ | ||
270 | static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = { | ||
271 | &omap2420_l4_wkup__wd_timer2, | ||
272 | }; | ||
273 | |||
274 | static struct omap_hwmod omap2420_wd_timer2_hwmod = { | ||
275 | .name = "wd_timer2", | ||
276 | .class = &omap2420_wd_timer_hwmod_class, | ||
277 | .main_clk = "mpu_wdt_fck", | ||
278 | .prcm = { | ||
279 | .omap2 = { | ||
280 | .prcm_reg_id = 1, | ||
281 | .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT, | ||
282 | .module_offs = WKUP_MOD, | ||
283 | .idlest_reg_id = 1, | ||
284 | .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT, | ||
285 | }, | ||
286 | }, | ||
287 | .slaves = omap2420_wd_timer2_slaves, | ||
288 | .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves), | ||
289 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
290 | }; | ||
291 | |||
292 | /* UART */ | ||
293 | |||
294 | static struct omap_hwmod_class_sysconfig uart_sysc = { | ||
295 | .rev_offs = 0x50, | ||
296 | .sysc_offs = 0x54, | ||
297 | .syss_offs = 0x58, | ||
298 | .sysc_flags = (SYSC_HAS_SIDLEMODE | | ||
299 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
300 | SYSC_HAS_AUTOIDLE), | ||
301 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
302 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
303 | }; | ||
304 | |||
305 | static struct omap_hwmod_class uart_class = { | ||
306 | .name = "uart", | ||
307 | .sysc = &uart_sysc, | ||
308 | }; | ||
309 | |||
310 | /* UART1 */ | ||
311 | |||
312 | static struct omap_hwmod_irq_info uart1_mpu_irqs[] = { | ||
313 | { .irq = INT_24XX_UART1_IRQ, }, | ||
314 | }; | ||
315 | |||
316 | static struct omap_hwmod_dma_info uart1_sdma_reqs[] = { | ||
317 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, }, | ||
318 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, }, | ||
319 | }; | ||
320 | |||
321 | static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = { | ||
322 | &omap2_l4_core__uart1, | ||
323 | }; | ||
324 | |||
325 | static struct omap_hwmod omap2420_uart1_hwmod = { | ||
326 | .name = "uart1", | ||
327 | .mpu_irqs = uart1_mpu_irqs, | ||
328 | .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs), | ||
329 | .sdma_reqs = uart1_sdma_reqs, | ||
330 | .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs), | ||
331 | .main_clk = "uart1_fck", | ||
332 | .prcm = { | ||
333 | .omap2 = { | ||
334 | .module_offs = CORE_MOD, | ||
335 | .prcm_reg_id = 1, | ||
336 | .module_bit = OMAP24XX_EN_UART1_SHIFT, | ||
337 | .idlest_reg_id = 1, | ||
338 | .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT, | ||
339 | }, | ||
340 | }, | ||
341 | .slaves = omap2420_uart1_slaves, | ||
342 | .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves), | ||
343 | .class = &uart_class, | ||
344 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
345 | }; | ||
346 | |||
347 | /* UART2 */ | ||
348 | |||
349 | static struct omap_hwmod_irq_info uart2_mpu_irqs[] = { | ||
350 | { .irq = INT_24XX_UART2_IRQ, }, | ||
351 | }; | ||
352 | |||
353 | static struct omap_hwmod_dma_info uart2_sdma_reqs[] = { | ||
354 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, }, | ||
355 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, }, | ||
356 | }; | ||
357 | |||
358 | static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = { | ||
359 | &omap2_l4_core__uart2, | ||
360 | }; | ||
361 | |||
362 | static struct omap_hwmod omap2420_uart2_hwmod = { | ||
363 | .name = "uart2", | ||
364 | .mpu_irqs = uart2_mpu_irqs, | ||
365 | .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs), | ||
366 | .sdma_reqs = uart2_sdma_reqs, | ||
367 | .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs), | ||
368 | .main_clk = "uart2_fck", | ||
369 | .prcm = { | ||
370 | .omap2 = { | ||
371 | .module_offs = CORE_MOD, | ||
372 | .prcm_reg_id = 1, | ||
373 | .module_bit = OMAP24XX_EN_UART2_SHIFT, | ||
374 | .idlest_reg_id = 1, | ||
375 | .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT, | ||
376 | }, | ||
377 | }, | ||
378 | .slaves = omap2420_uart2_slaves, | ||
379 | .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves), | ||
380 | .class = &uart_class, | ||
381 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
382 | }; | ||
383 | |||
384 | /* UART3 */ | ||
385 | |||
386 | static struct omap_hwmod_irq_info uart3_mpu_irqs[] = { | ||
387 | { .irq = INT_24XX_UART3_IRQ, }, | ||
388 | }; | ||
389 | |||
390 | static struct omap_hwmod_dma_info uart3_sdma_reqs[] = { | ||
391 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, }, | ||
392 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, }, | ||
393 | }; | ||
394 | |||
395 | static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = { | ||
396 | &omap2_l4_core__uart3, | ||
397 | }; | ||
398 | |||
399 | static struct omap_hwmod omap2420_uart3_hwmod = { | ||
400 | .name = "uart3", | ||
401 | .mpu_irqs = uart3_mpu_irqs, | ||
402 | .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs), | ||
403 | .sdma_reqs = uart3_sdma_reqs, | ||
404 | .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs), | ||
405 | .main_clk = "uart3_fck", | ||
406 | .prcm = { | ||
407 | .omap2 = { | ||
408 | .module_offs = CORE_MOD, | ||
409 | .prcm_reg_id = 2, | ||
410 | .module_bit = OMAP24XX_EN_UART3_SHIFT, | ||
411 | .idlest_reg_id = 2, | ||
412 | .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT, | ||
413 | }, | ||
414 | }, | ||
415 | .slaves = omap2420_uart3_slaves, | ||
416 | .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves), | ||
417 | .class = &uart_class, | ||
418 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
419 | }; | ||
420 | |||
168 | static __initdata struct omap_hwmod *omap2420_hwmods[] = { | 421 | static __initdata struct omap_hwmod *omap2420_hwmods[] = { |
169 | &omap2420_l3_main_hwmod, | 422 | &omap2420_l3_main_hwmod, |
170 | &omap2420_l4_core_hwmod, | 423 | &omap2420_l4_core_hwmod, |
171 | &omap2420_l4_wkup_hwmod, | 424 | &omap2420_l4_wkup_hwmod, |
172 | &omap2420_mpu_hwmod, | 425 | &omap2420_mpu_hwmod, |
173 | &omap2420_iva_hwmod, | 426 | &omap2420_iva_hwmod, |
427 | &omap2420_wd_timer2_hwmod, | ||
428 | &omap2420_uart1_hwmod, | ||
429 | &omap2420_uart2_hwmod, | ||
430 | &omap2420_uart3_hwmod, | ||
174 | NULL, | 431 | NULL, |
175 | }; | 432 | }; |
176 | 433 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 4526628ed287..12d939e456cf 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -15,10 +15,12 @@ | |||
15 | #include <mach/irqs.h> | 15 | #include <mach/irqs.h> |
16 | #include <plat/cpu.h> | 16 | #include <plat/cpu.h> |
17 | #include <plat/dma.h> | 17 | #include <plat/dma.h> |
18 | #include <plat/serial.h> | ||
18 | 19 | ||
19 | #include "omap_hwmod_common_data.h" | 20 | #include "omap_hwmod_common_data.h" |
20 | 21 | ||
21 | #include "prm-regbits-24xx.h" | 22 | #include "prm-regbits-24xx.h" |
23 | #include "cm-regbits-24xx.h" | ||
22 | 24 | ||
23 | /* | 25 | /* |
24 | * OMAP2430 hardware module integration data | 26 | * OMAP2430 hardware module integration data |
@@ -33,6 +35,7 @@ static struct omap_hwmod omap2430_mpu_hwmod; | |||
33 | static struct omap_hwmod omap2430_iva_hwmod; | 35 | static struct omap_hwmod omap2430_iva_hwmod; |
34 | static struct omap_hwmod omap2430_l3_main_hwmod; | 36 | static struct omap_hwmod omap2430_l3_main_hwmod; |
35 | static struct omap_hwmod omap2430_l4_core_hwmod; | 37 | static struct omap_hwmod omap2430_l4_core_hwmod; |
38 | static struct omap_hwmod omap2430_wd_timer2_hwmod; | ||
36 | 39 | ||
37 | /* L3 -> L4_CORE interface */ | 40 | /* L3 -> L4_CORE interface */ |
38 | static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = { | 41 | static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = { |
@@ -71,6 +74,9 @@ static struct omap_hwmod omap2430_l3_main_hwmod = { | |||
71 | }; | 74 | }; |
72 | 75 | ||
73 | static struct omap_hwmod omap2430_l4_wkup_hwmod; | 76 | static struct omap_hwmod omap2430_l4_wkup_hwmod; |
77 | static struct omap_hwmod omap2430_uart1_hwmod; | ||
78 | static struct omap_hwmod omap2430_uart2_hwmod; | ||
79 | static struct omap_hwmod omap2430_uart3_hwmod; | ||
74 | 80 | ||
75 | /* L4_CORE -> L4_WKUP interface */ | 81 | /* L4_CORE -> L4_WKUP interface */ |
76 | static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = { | 82 | static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = { |
@@ -79,6 +85,60 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = { | |||
79 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 85 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
80 | }; | 86 | }; |
81 | 87 | ||
88 | /* L4 CORE -> UART1 interface */ | ||
89 | static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = { | ||
90 | { | ||
91 | .pa_start = OMAP2_UART1_BASE, | ||
92 | .pa_end = OMAP2_UART1_BASE + SZ_8K - 1, | ||
93 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { | ||
98 | .master = &omap2430_l4_core_hwmod, | ||
99 | .slave = &omap2430_uart1_hwmod, | ||
100 | .clk = "uart1_ick", | ||
101 | .addr = omap2430_uart1_addr_space, | ||
102 | .addr_cnt = ARRAY_SIZE(omap2430_uart1_addr_space), | ||
103 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
104 | }; | ||
105 | |||
106 | /* L4 CORE -> UART2 interface */ | ||
107 | static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = { | ||
108 | { | ||
109 | .pa_start = OMAP2_UART2_BASE, | ||
110 | .pa_end = OMAP2_UART2_BASE + SZ_1K - 1, | ||
111 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
112 | }, | ||
113 | }; | ||
114 | |||
115 | static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { | ||
116 | .master = &omap2430_l4_core_hwmod, | ||
117 | .slave = &omap2430_uart2_hwmod, | ||
118 | .clk = "uart2_ick", | ||
119 | .addr = omap2430_uart2_addr_space, | ||
120 | .addr_cnt = ARRAY_SIZE(omap2430_uart2_addr_space), | ||
121 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
122 | }; | ||
123 | |||
124 | /* L4 PER -> UART3 interface */ | ||
125 | static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = { | ||
126 | { | ||
127 | .pa_start = OMAP2_UART3_BASE, | ||
128 | .pa_end = OMAP2_UART3_BASE + SZ_1K - 1, | ||
129 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { | ||
134 | .master = &omap2430_l4_core_hwmod, | ||
135 | .slave = &omap2430_uart3_hwmod, | ||
136 | .clk = "uart3_ick", | ||
137 | .addr = omap2430_uart3_addr_space, | ||
138 | .addr_cnt = ARRAY_SIZE(omap2430_uart3_addr_space), | ||
139 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
140 | }; | ||
141 | |||
82 | /* Slave interfaces on the L4_CORE interconnect */ | 142 | /* Slave interfaces on the L4_CORE interconnect */ |
83 | static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { | 143 | static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { |
84 | &omap2430_l3_main__l4_core, | 144 | &omap2430_l3_main__l4_core, |
@@ -104,6 +164,9 @@ static struct omap_hwmod omap2430_l4_core_hwmod = { | |||
104 | /* Slave interfaces on the L4_WKUP interconnect */ | 164 | /* Slave interfaces on the L4_WKUP interconnect */ |
105 | static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = { | 165 | static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = { |
106 | &omap2430_l4_core__l4_wkup, | 166 | &omap2430_l4_core__l4_wkup, |
167 | &omap2_l4_core__uart1, | ||
168 | &omap2_l4_core__uart2, | ||
169 | &omap2_l4_core__uart3, | ||
107 | }; | 170 | }; |
108 | 171 | ||
109 | /* Master interfaces on the L4_WKUP interconnect */ | 172 | /* Master interfaces on the L4_WKUP interconnect */ |
@@ -165,12 +228,206 @@ static struct omap_hwmod omap2430_iva_hwmod = { | |||
165 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 228 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
166 | }; | 229 | }; |
167 | 230 | ||
231 | /* l4_wkup -> wd_timer2 */ | ||
232 | static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { | ||
233 | { | ||
234 | .pa_start = 0x49016000, | ||
235 | .pa_end = 0x4901607f, | ||
236 | .flags = ADDR_TYPE_RT | ||
237 | }, | ||
238 | }; | ||
239 | |||
240 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = { | ||
241 | .master = &omap2430_l4_wkup_hwmod, | ||
242 | .slave = &omap2430_wd_timer2_hwmod, | ||
243 | .clk = "mpu_wdt_ick", | ||
244 | .addr = omap2430_wd_timer2_addrs, | ||
245 | .addr_cnt = ARRAY_SIZE(omap2430_wd_timer2_addrs), | ||
246 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
247 | }; | ||
248 | |||
249 | /* | ||
250 | * 'wd_timer' class | ||
251 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | ||
252 | * overflow condition | ||
253 | */ | ||
254 | |||
255 | static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = { | ||
256 | .rev_offs = 0x0, | ||
257 | .sysc_offs = 0x0010, | ||
258 | .syss_offs = 0x0014, | ||
259 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET | | ||
260 | SYSC_HAS_AUTOIDLE), | ||
261 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
262 | }; | ||
263 | |||
264 | static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = { | ||
265 | .name = "wd_timer", | ||
266 | .sysc = &omap2430_wd_timer_sysc, | ||
267 | }; | ||
268 | |||
269 | /* wd_timer2 */ | ||
270 | static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = { | ||
271 | &omap2430_l4_wkup__wd_timer2, | ||
272 | }; | ||
273 | |||
274 | static struct omap_hwmod omap2430_wd_timer2_hwmod = { | ||
275 | .name = "wd_timer2", | ||
276 | .class = &omap2430_wd_timer_hwmod_class, | ||
277 | .main_clk = "mpu_wdt_fck", | ||
278 | .prcm = { | ||
279 | .omap2 = { | ||
280 | .prcm_reg_id = 1, | ||
281 | .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT, | ||
282 | .module_offs = WKUP_MOD, | ||
283 | .idlest_reg_id = 1, | ||
284 | .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT, | ||
285 | }, | ||
286 | }, | ||
287 | .slaves = omap2430_wd_timer2_slaves, | ||
288 | .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves), | ||
289 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
290 | }; | ||
291 | |||
292 | /* UART */ | ||
293 | |||
294 | static struct omap_hwmod_class_sysconfig uart_sysc = { | ||
295 | .rev_offs = 0x50, | ||
296 | .sysc_offs = 0x54, | ||
297 | .syss_offs = 0x58, | ||
298 | .sysc_flags = (SYSC_HAS_SIDLEMODE | | ||
299 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
300 | SYSC_HAS_AUTOIDLE), | ||
301 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
302 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
303 | }; | ||
304 | |||
305 | static struct omap_hwmod_class uart_class = { | ||
306 | .name = "uart", | ||
307 | .sysc = &uart_sysc, | ||
308 | }; | ||
309 | |||
310 | /* UART1 */ | ||
311 | |||
312 | static struct omap_hwmod_irq_info uart1_mpu_irqs[] = { | ||
313 | { .irq = INT_24XX_UART1_IRQ, }, | ||
314 | }; | ||
315 | |||
316 | static struct omap_hwmod_dma_info uart1_sdma_reqs[] = { | ||
317 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, }, | ||
318 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, }, | ||
319 | }; | ||
320 | |||
321 | static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = { | ||
322 | &omap2_l4_core__uart1, | ||
323 | }; | ||
324 | |||
325 | static struct omap_hwmod omap2430_uart1_hwmod = { | ||
326 | .name = "uart1", | ||
327 | .mpu_irqs = uart1_mpu_irqs, | ||
328 | .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs), | ||
329 | .sdma_reqs = uart1_sdma_reqs, | ||
330 | .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs), | ||
331 | .main_clk = "uart1_fck", | ||
332 | .prcm = { | ||
333 | .omap2 = { | ||
334 | .module_offs = CORE_MOD, | ||
335 | .prcm_reg_id = 1, | ||
336 | .module_bit = OMAP24XX_EN_UART1_SHIFT, | ||
337 | .idlest_reg_id = 1, | ||
338 | .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT, | ||
339 | }, | ||
340 | }, | ||
341 | .slaves = omap2430_uart1_slaves, | ||
342 | .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves), | ||
343 | .class = &uart_class, | ||
344 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
345 | }; | ||
346 | |||
347 | /* UART2 */ | ||
348 | |||
349 | static struct omap_hwmod_irq_info uart2_mpu_irqs[] = { | ||
350 | { .irq = INT_24XX_UART2_IRQ, }, | ||
351 | }; | ||
352 | |||
353 | static struct omap_hwmod_dma_info uart2_sdma_reqs[] = { | ||
354 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, }, | ||
355 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, }, | ||
356 | }; | ||
357 | |||
358 | static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = { | ||
359 | &omap2_l4_core__uart2, | ||
360 | }; | ||
361 | |||
362 | static struct omap_hwmod omap2430_uart2_hwmod = { | ||
363 | .name = "uart2", | ||
364 | .mpu_irqs = uart2_mpu_irqs, | ||
365 | .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs), | ||
366 | .sdma_reqs = uart2_sdma_reqs, | ||
367 | .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs), | ||
368 | .main_clk = "uart2_fck", | ||
369 | .prcm = { | ||
370 | .omap2 = { | ||
371 | .module_offs = CORE_MOD, | ||
372 | .prcm_reg_id = 1, | ||
373 | .module_bit = OMAP24XX_EN_UART2_SHIFT, | ||
374 | .idlest_reg_id = 1, | ||
375 | .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT, | ||
376 | }, | ||
377 | }, | ||
378 | .slaves = omap2430_uart2_slaves, | ||
379 | .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves), | ||
380 | .class = &uart_class, | ||
381 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
382 | }; | ||
383 | |||
384 | /* UART3 */ | ||
385 | |||
386 | static struct omap_hwmod_irq_info uart3_mpu_irqs[] = { | ||
387 | { .irq = INT_24XX_UART3_IRQ, }, | ||
388 | }; | ||
389 | |||
390 | static struct omap_hwmod_dma_info uart3_sdma_reqs[] = { | ||
391 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, }, | ||
392 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, }, | ||
393 | }; | ||
394 | |||
395 | static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = { | ||
396 | &omap2_l4_core__uart3, | ||
397 | }; | ||
398 | |||
399 | static struct omap_hwmod omap2430_uart3_hwmod = { | ||
400 | .name = "uart3", | ||
401 | .mpu_irqs = uart3_mpu_irqs, | ||
402 | .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs), | ||
403 | .sdma_reqs = uart3_sdma_reqs, | ||
404 | .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs), | ||
405 | .main_clk = "uart3_fck", | ||
406 | .prcm = { | ||
407 | .omap2 = { | ||
408 | .module_offs = CORE_MOD, | ||
409 | .prcm_reg_id = 2, | ||
410 | .module_bit = OMAP24XX_EN_UART3_SHIFT, | ||
411 | .idlest_reg_id = 2, | ||
412 | .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT, | ||
413 | }, | ||
414 | }, | ||
415 | .slaves = omap2430_uart3_slaves, | ||
416 | .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves), | ||
417 | .class = &uart_class, | ||
418 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
419 | }; | ||
420 | |||
168 | static __initdata struct omap_hwmod *omap2430_hwmods[] = { | 421 | static __initdata struct omap_hwmod *omap2430_hwmods[] = { |
169 | &omap2430_l3_main_hwmod, | 422 | &omap2430_l3_main_hwmod, |
170 | &omap2430_l4_core_hwmod, | 423 | &omap2430_l4_core_hwmod, |
171 | &omap2430_l4_wkup_hwmod, | 424 | &omap2430_l4_wkup_hwmod, |
172 | &omap2430_mpu_hwmod, | 425 | &omap2430_mpu_hwmod, |
173 | &omap2430_iva_hwmod, | 426 | &omap2430_iva_hwmod, |
427 | &omap2430_wd_timer2_hwmod, | ||
428 | &omap2430_uart1_hwmod, | ||
429 | &omap2430_uart2_hwmod, | ||
430 | &omap2430_uart3_hwmod, | ||
174 | NULL, | 431 | NULL, |
175 | }; | 432 | }; |
176 | 433 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 5d8eb58ba5e3..cb97ecf0a3f6 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -17,10 +17,12 @@ | |||
17 | #include <mach/irqs.h> | 17 | #include <mach/irqs.h> |
18 | #include <plat/cpu.h> | 18 | #include <plat/cpu.h> |
19 | #include <plat/dma.h> | 19 | #include <plat/dma.h> |
20 | #include <plat/serial.h> | ||
20 | 21 | ||
21 | #include "omap_hwmod_common_data.h" | 22 | #include "omap_hwmod_common_data.h" |
22 | 23 | ||
23 | #include "prm-regbits-34xx.h" | 24 | #include "prm-regbits-34xx.h" |
25 | #include "cm-regbits-34xx.h" | ||
24 | 26 | ||
25 | /* | 27 | /* |
26 | * OMAP3xxx hardware module integration data | 28 | * OMAP3xxx hardware module integration data |
@@ -36,6 +38,7 @@ static struct omap_hwmod omap3xxx_iva_hwmod; | |||
36 | static struct omap_hwmod omap3xxx_l3_main_hwmod; | 38 | static struct omap_hwmod omap3xxx_l3_main_hwmod; |
37 | static struct omap_hwmod omap3xxx_l4_core_hwmod; | 39 | static struct omap_hwmod omap3xxx_l4_core_hwmod; |
38 | static struct omap_hwmod omap3xxx_l4_per_hwmod; | 40 | static struct omap_hwmod omap3xxx_l4_per_hwmod; |
41 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod; | ||
39 | 42 | ||
40 | /* L3 -> L4_CORE interface */ | 43 | /* L3 -> L4_CORE interface */ |
41 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { | 44 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { |
@@ -82,6 +85,10 @@ static struct omap_hwmod omap3xxx_l3_main_hwmod = { | |||
82 | }; | 85 | }; |
83 | 86 | ||
84 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod; | 87 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod; |
88 | static struct omap_hwmod omap3xxx_uart1_hwmod; | ||
89 | static struct omap_hwmod omap3xxx_uart2_hwmod; | ||
90 | static struct omap_hwmod omap3xxx_uart3_hwmod; | ||
91 | static struct omap_hwmod omap3xxx_uart4_hwmod; | ||
85 | 92 | ||
86 | /* L4_CORE -> L4_WKUP interface */ | 93 | /* L4_CORE -> L4_WKUP interface */ |
87 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | 94 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { |
@@ -90,6 +97,78 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | |||
90 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 97 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
91 | }; | 98 | }; |
92 | 99 | ||
100 | /* L4 CORE -> UART1 interface */ | ||
101 | static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = { | ||
102 | { | ||
103 | .pa_start = OMAP3_UART1_BASE, | ||
104 | .pa_end = OMAP3_UART1_BASE + SZ_8K - 1, | ||
105 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
106 | }, | ||
107 | }; | ||
108 | |||
109 | static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = { | ||
110 | .master = &omap3xxx_l4_core_hwmod, | ||
111 | .slave = &omap3xxx_uart1_hwmod, | ||
112 | .clk = "uart1_ick", | ||
113 | .addr = omap3xxx_uart1_addr_space, | ||
114 | .addr_cnt = ARRAY_SIZE(omap3xxx_uart1_addr_space), | ||
115 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
116 | }; | ||
117 | |||
118 | /* L4 CORE -> UART2 interface */ | ||
119 | static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = { | ||
120 | { | ||
121 | .pa_start = OMAP3_UART2_BASE, | ||
122 | .pa_end = OMAP3_UART2_BASE + SZ_1K - 1, | ||
123 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
124 | }, | ||
125 | }; | ||
126 | |||
127 | static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = { | ||
128 | .master = &omap3xxx_l4_core_hwmod, | ||
129 | .slave = &omap3xxx_uart2_hwmod, | ||
130 | .clk = "uart2_ick", | ||
131 | .addr = omap3xxx_uart2_addr_space, | ||
132 | .addr_cnt = ARRAY_SIZE(omap3xxx_uart2_addr_space), | ||
133 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
134 | }; | ||
135 | |||
136 | /* L4 PER -> UART3 interface */ | ||
137 | static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = { | ||
138 | { | ||
139 | .pa_start = OMAP3_UART3_BASE, | ||
140 | .pa_end = OMAP3_UART3_BASE + SZ_1K - 1, | ||
141 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
142 | }, | ||
143 | }; | ||
144 | |||
145 | static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = { | ||
146 | .master = &omap3xxx_l4_per_hwmod, | ||
147 | .slave = &omap3xxx_uart3_hwmod, | ||
148 | .clk = "uart3_ick", | ||
149 | .addr = omap3xxx_uart3_addr_space, | ||
150 | .addr_cnt = ARRAY_SIZE(omap3xxx_uart3_addr_space), | ||
151 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
152 | }; | ||
153 | |||
154 | /* L4 PER -> UART4 interface */ | ||
155 | static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = { | ||
156 | { | ||
157 | .pa_start = OMAP3_UART4_BASE, | ||
158 | .pa_end = OMAP3_UART4_BASE + SZ_1K - 1, | ||
159 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
160 | }, | ||
161 | }; | ||
162 | |||
163 | static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = { | ||
164 | .master = &omap3xxx_l4_per_hwmod, | ||
165 | .slave = &omap3xxx_uart4_hwmod, | ||
166 | .clk = "uart4_ick", | ||
167 | .addr = omap3xxx_uart4_addr_space, | ||
168 | .addr_cnt = ARRAY_SIZE(omap3xxx_uart4_addr_space), | ||
169 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
170 | }; | ||
171 | |||
93 | /* Slave interfaces on the L4_CORE interconnect */ | 172 | /* Slave interfaces on the L4_CORE interconnect */ |
94 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { | 173 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { |
95 | &omap3xxx_l3_main__l4_core, | 174 | &omap3xxx_l3_main__l4_core, |
@@ -98,6 +177,8 @@ static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { | |||
98 | /* Master interfaces on the L4_CORE interconnect */ | 177 | /* Master interfaces on the L4_CORE interconnect */ |
99 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = { | 178 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = { |
100 | &omap3xxx_l4_core__l4_wkup, | 179 | &omap3xxx_l4_core__l4_wkup, |
180 | &omap3_l4_core__uart1, | ||
181 | &omap3_l4_core__uart2, | ||
101 | }; | 182 | }; |
102 | 183 | ||
103 | /* L4 CORE */ | 184 | /* L4 CORE */ |
@@ -119,6 +200,8 @@ static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = { | |||
119 | 200 | ||
120 | /* Master interfaces on the L4_PER interconnect */ | 201 | /* Master interfaces on the L4_PER interconnect */ |
121 | static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = { | 202 | static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = { |
203 | &omap3_l4_per__uart3, | ||
204 | &omap3_l4_per__uart4, | ||
122 | }; | 205 | }; |
123 | 206 | ||
124 | /* L4 PER */ | 207 | /* L4 PER */ |
@@ -197,6 +280,235 @@ static struct omap_hwmod omap3xxx_iva_hwmod = { | |||
197 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | 280 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) |
198 | }; | 281 | }; |
199 | 282 | ||
283 | /* l4_wkup -> wd_timer2 */ | ||
284 | static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { | ||
285 | { | ||
286 | .pa_start = 0x48314000, | ||
287 | .pa_end = 0x4831407f, | ||
288 | .flags = ADDR_TYPE_RT | ||
289 | }, | ||
290 | }; | ||
291 | |||
292 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { | ||
293 | .master = &omap3xxx_l4_wkup_hwmod, | ||
294 | .slave = &omap3xxx_wd_timer2_hwmod, | ||
295 | .clk = "wdt2_ick", | ||
296 | .addr = omap3xxx_wd_timer2_addrs, | ||
297 | .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs), | ||
298 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
299 | }; | ||
300 | |||
301 | /* | ||
302 | * 'wd_timer' class | ||
303 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | ||
304 | * overflow condition | ||
305 | */ | ||
306 | |||
307 | static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = { | ||
308 | .rev_offs = 0x0000, | ||
309 | .sysc_offs = 0x0010, | ||
310 | .syss_offs = 0x0014, | ||
311 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE | | ||
312 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
313 | SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY), | ||
314 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
315 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
316 | }; | ||
317 | |||
318 | static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = { | ||
319 | .name = "wd_timer", | ||
320 | .sysc = &omap3xxx_wd_timer_sysc, | ||
321 | }; | ||
322 | |||
323 | /* wd_timer2 */ | ||
324 | static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = { | ||
325 | &omap3xxx_l4_wkup__wd_timer2, | ||
326 | }; | ||
327 | |||
328 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { | ||
329 | .name = "wd_timer2", | ||
330 | .class = &omap3xxx_wd_timer_hwmod_class, | ||
331 | .main_clk = "wdt2_fck", | ||
332 | .prcm = { | ||
333 | .omap2 = { | ||
334 | .prcm_reg_id = 1, | ||
335 | .module_bit = OMAP3430_EN_WDT2_SHIFT, | ||
336 | .module_offs = WKUP_MOD, | ||
337 | .idlest_reg_id = 1, | ||
338 | .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT, | ||
339 | }, | ||
340 | }, | ||
341 | .slaves = omap3xxx_wd_timer2_slaves, | ||
342 | .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves), | ||
343 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
344 | }; | ||
345 | |||
346 | /* UART common */ | ||
347 | |||
348 | static struct omap_hwmod_class_sysconfig uart_sysc = { | ||
349 | .rev_offs = 0x50, | ||
350 | .sysc_offs = 0x54, | ||
351 | .syss_offs = 0x58, | ||
352 | .sysc_flags = (SYSC_HAS_SIDLEMODE | | ||
353 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
354 | SYSC_HAS_AUTOIDLE), | ||
355 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
356 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
357 | }; | ||
358 | |||
359 | static struct omap_hwmod_class uart_class = { | ||
360 | .name = "uart", | ||
361 | .sysc = &uart_sysc, | ||
362 | }; | ||
363 | |||
364 | /* UART1 */ | ||
365 | |||
366 | static struct omap_hwmod_irq_info uart1_mpu_irqs[] = { | ||
367 | { .irq = INT_24XX_UART1_IRQ, }, | ||
368 | }; | ||
369 | |||
370 | static struct omap_hwmod_dma_info uart1_sdma_reqs[] = { | ||
371 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, }, | ||
372 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, }, | ||
373 | }; | ||
374 | |||
375 | static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = { | ||
376 | &omap3_l4_core__uart1, | ||
377 | }; | ||
378 | |||
379 | static struct omap_hwmod omap3xxx_uart1_hwmod = { | ||
380 | .name = "uart1", | ||
381 | .mpu_irqs = uart1_mpu_irqs, | ||
382 | .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs), | ||
383 | .sdma_reqs = uart1_sdma_reqs, | ||
384 | .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs), | ||
385 | .main_clk = "uart1_fck", | ||
386 | .prcm = { | ||
387 | .omap2 = { | ||
388 | .module_offs = CORE_MOD, | ||
389 | .prcm_reg_id = 1, | ||
390 | .module_bit = OMAP3430_EN_UART1_SHIFT, | ||
391 | .idlest_reg_id = 1, | ||
392 | .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT, | ||
393 | }, | ||
394 | }, | ||
395 | .slaves = omap3xxx_uart1_slaves, | ||
396 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves), | ||
397 | .class = &uart_class, | ||
398 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
399 | }; | ||
400 | |||
401 | /* UART2 */ | ||
402 | |||
403 | static struct omap_hwmod_irq_info uart2_mpu_irqs[] = { | ||
404 | { .irq = INT_24XX_UART2_IRQ, }, | ||
405 | }; | ||
406 | |||
407 | static struct omap_hwmod_dma_info uart2_sdma_reqs[] = { | ||
408 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, }, | ||
409 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, }, | ||
410 | }; | ||
411 | |||
412 | static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = { | ||
413 | &omap3_l4_core__uart2, | ||
414 | }; | ||
415 | |||
416 | static struct omap_hwmod omap3xxx_uart2_hwmod = { | ||
417 | .name = "uart2", | ||
418 | .mpu_irqs = uart2_mpu_irqs, | ||
419 | .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs), | ||
420 | .sdma_reqs = uart2_sdma_reqs, | ||
421 | .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs), | ||
422 | .main_clk = "uart2_fck", | ||
423 | .prcm = { | ||
424 | .omap2 = { | ||
425 | .module_offs = CORE_MOD, | ||
426 | .prcm_reg_id = 1, | ||
427 | .module_bit = OMAP3430_EN_UART2_SHIFT, | ||
428 | .idlest_reg_id = 1, | ||
429 | .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT, | ||
430 | }, | ||
431 | }, | ||
432 | .slaves = omap3xxx_uart2_slaves, | ||
433 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves), | ||
434 | .class = &uart_class, | ||
435 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
436 | }; | ||
437 | |||
438 | /* UART3 */ | ||
439 | |||
440 | static struct omap_hwmod_irq_info uart3_mpu_irqs[] = { | ||
441 | { .irq = INT_24XX_UART3_IRQ, }, | ||
442 | }; | ||
443 | |||
444 | static struct omap_hwmod_dma_info uart3_sdma_reqs[] = { | ||
445 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, }, | ||
446 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, }, | ||
447 | }; | ||
448 | |||
449 | static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = { | ||
450 | &omap3_l4_per__uart3, | ||
451 | }; | ||
452 | |||
453 | static struct omap_hwmod omap3xxx_uart3_hwmod = { | ||
454 | .name = "uart3", | ||
455 | .mpu_irqs = uart3_mpu_irqs, | ||
456 | .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs), | ||
457 | .sdma_reqs = uart3_sdma_reqs, | ||
458 | .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs), | ||
459 | .main_clk = "uart3_fck", | ||
460 | .prcm = { | ||
461 | .omap2 = { | ||
462 | .module_offs = OMAP3430_PER_MOD, | ||
463 | .prcm_reg_id = 1, | ||
464 | .module_bit = OMAP3430_EN_UART3_SHIFT, | ||
465 | .idlest_reg_id = 1, | ||
466 | .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT, | ||
467 | }, | ||
468 | }, | ||
469 | .slaves = omap3xxx_uart3_slaves, | ||
470 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves), | ||
471 | .class = &uart_class, | ||
472 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
473 | }; | ||
474 | |||
475 | /* UART4 */ | ||
476 | |||
477 | static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { | ||
478 | { .irq = INT_36XX_UART4_IRQ, }, | ||
479 | }; | ||
480 | |||
481 | static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { | ||
482 | { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, }, | ||
483 | { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, }, | ||
484 | }; | ||
485 | |||
486 | static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = { | ||
487 | &omap3_l4_per__uart4, | ||
488 | }; | ||
489 | |||
490 | static struct omap_hwmod omap3xxx_uart4_hwmod = { | ||
491 | .name = "uart4", | ||
492 | .mpu_irqs = uart4_mpu_irqs, | ||
493 | .mpu_irqs_cnt = ARRAY_SIZE(uart4_mpu_irqs), | ||
494 | .sdma_reqs = uart4_sdma_reqs, | ||
495 | .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs), | ||
496 | .main_clk = "uart4_fck", | ||
497 | .prcm = { | ||
498 | .omap2 = { | ||
499 | .module_offs = OMAP3430_PER_MOD, | ||
500 | .prcm_reg_id = 1, | ||
501 | .module_bit = OMAP3630_EN_UART4_SHIFT, | ||
502 | .idlest_reg_id = 1, | ||
503 | .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT, | ||
504 | }, | ||
505 | }, | ||
506 | .slaves = omap3xxx_uart4_slaves, | ||
507 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves), | ||
508 | .class = &uart_class, | ||
509 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), | ||
510 | }; | ||
511 | |||
200 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | 512 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { |
201 | &omap3xxx_l3_main_hwmod, | 513 | &omap3xxx_l3_main_hwmod, |
202 | &omap3xxx_l4_core_hwmod, | 514 | &omap3xxx_l4_core_hwmod, |
@@ -204,6 +516,11 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | |||
204 | &omap3xxx_l4_wkup_hwmod, | 516 | &omap3xxx_l4_wkup_hwmod, |
205 | &omap3xxx_mpu_hwmod, | 517 | &omap3xxx_mpu_hwmod, |
206 | &omap3xxx_iva_hwmod, | 518 | &omap3xxx_iva_hwmod, |
519 | &omap3xxx_wd_timer2_hwmod, | ||
520 | &omap3xxx_uart1_hwmod, | ||
521 | &omap3xxx_uart2_hwmod, | ||
522 | &omap3xxx_uart3_hwmod, | ||
523 | &omap3xxx_uart4_hwmod, | ||
207 | NULL, | 524 | NULL, |
208 | }; | 525 | }; |
209 | 526 | ||
@@ -211,5 +528,3 @@ int __init omap3xxx_hwmod_init(void) | |||
211 | { | 528 | { |
212 | return omap_hwmod_init(omap3xxx_hwmods); | 529 | return omap_hwmod_init(omap3xxx_hwmods); |
213 | } | 530 | } |
214 | |||
215 | |||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c new file mode 100644 index 000000000000..7274db4de487 --- /dev/null +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -0,0 +1,850 @@ | |||
1 | /* | ||
2 | * Hardware modules present on the OMAP44xx chips | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | ||
5 | * Copyright (C) 2009-2010 Nokia Corporation | ||
6 | * | ||
7 | * Paul Walmsley | ||
8 | * Benoit Cousson | ||
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 | #include <linux/io.h> | ||
22 | |||
23 | #include <plat/omap_hwmod.h> | ||
24 | #include <plat/cpu.h> | ||
25 | |||
26 | #include "omap_hwmod_common_data.h" | ||
27 | |||
28 | #include "cm.h" | ||
29 | #include "prm-regbits-44xx.h" | ||
30 | |||
31 | /* Base offset for all OMAP4 interrupts external to MPUSS */ | ||
32 | #define OMAP44XX_IRQ_GIC_START 32 | ||
33 | |||
34 | /* Base offset for all OMAP4 dma requests */ | ||
35 | #define OMAP44XX_DMA_REQ_START 1 | ||
36 | |||
37 | /* Backward references (IPs with Bus Master capability) */ | ||
38 | static struct omap_hwmod omap44xx_dmm_hwmod; | ||
39 | static struct omap_hwmod omap44xx_emif_fw_hwmod; | ||
40 | static struct omap_hwmod omap44xx_l3_instr_hwmod; | ||
41 | static struct omap_hwmod omap44xx_l3_main_1_hwmod; | ||
42 | static struct omap_hwmod omap44xx_l3_main_2_hwmod; | ||
43 | static struct omap_hwmod omap44xx_l3_main_3_hwmod; | ||
44 | static struct omap_hwmod omap44xx_l4_abe_hwmod; | ||
45 | static struct omap_hwmod omap44xx_l4_cfg_hwmod; | ||
46 | static struct omap_hwmod omap44xx_l4_per_hwmod; | ||
47 | static struct omap_hwmod omap44xx_l4_wkup_hwmod; | ||
48 | static struct omap_hwmod omap44xx_mpu_hwmod; | ||
49 | static struct omap_hwmod omap44xx_mpu_private_hwmod; | ||
50 | |||
51 | /* | ||
52 | * Interconnects omap_hwmod structures | ||
53 | * hwmods that compose the global OMAP interconnect | ||
54 | */ | ||
55 | |||
56 | /* | ||
57 | * 'dmm' class | ||
58 | * instance(s): dmm | ||
59 | */ | ||
60 | static struct omap_hwmod_class omap44xx_dmm_hwmod_class = { | ||
61 | .name = "dmm", | ||
62 | }; | ||
63 | |||
64 | /* dmm interface data */ | ||
65 | /* l3_main_1 -> dmm */ | ||
66 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = { | ||
67 | .master = &omap44xx_l3_main_1_hwmod, | ||
68 | .slave = &omap44xx_dmm_hwmod, | ||
69 | .clk = "l3_div_ck", | ||
70 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
71 | }; | ||
72 | |||
73 | /* mpu -> dmm */ | ||
74 | static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = { | ||
75 | .master = &omap44xx_mpu_hwmod, | ||
76 | .slave = &omap44xx_dmm_hwmod, | ||
77 | .clk = "l3_div_ck", | ||
78 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
79 | }; | ||
80 | |||
81 | /* dmm slave ports */ | ||
82 | static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = { | ||
83 | &omap44xx_l3_main_1__dmm, | ||
84 | &omap44xx_mpu__dmm, | ||
85 | }; | ||
86 | |||
87 | static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = { | ||
88 | { .irq = 113 + OMAP44XX_IRQ_GIC_START }, | ||
89 | }; | ||
90 | |||
91 | static struct omap_hwmod omap44xx_dmm_hwmod = { | ||
92 | .name = "dmm", | ||
93 | .class = &omap44xx_dmm_hwmod_class, | ||
94 | .slaves = omap44xx_dmm_slaves, | ||
95 | .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves), | ||
96 | .mpu_irqs = omap44xx_dmm_irqs, | ||
97 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmm_irqs), | ||
98 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
99 | }; | ||
100 | |||
101 | /* | ||
102 | * 'emif_fw' class | ||
103 | * instance(s): emif_fw | ||
104 | */ | ||
105 | static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = { | ||
106 | .name = "emif_fw", | ||
107 | }; | ||
108 | |||
109 | /* emif_fw interface data */ | ||
110 | /* dmm -> emif_fw */ | ||
111 | static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = { | ||
112 | .master = &omap44xx_dmm_hwmod, | ||
113 | .slave = &omap44xx_emif_fw_hwmod, | ||
114 | .clk = "l3_div_ck", | ||
115 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
116 | }; | ||
117 | |||
118 | /* l4_cfg -> emif_fw */ | ||
119 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = { | ||
120 | .master = &omap44xx_l4_cfg_hwmod, | ||
121 | .slave = &omap44xx_emif_fw_hwmod, | ||
122 | .clk = "l4_div_ck", | ||
123 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
124 | }; | ||
125 | |||
126 | /* emif_fw slave ports */ | ||
127 | static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = { | ||
128 | &omap44xx_dmm__emif_fw, | ||
129 | &omap44xx_l4_cfg__emif_fw, | ||
130 | }; | ||
131 | |||
132 | static struct omap_hwmod omap44xx_emif_fw_hwmod = { | ||
133 | .name = "emif_fw", | ||
134 | .class = &omap44xx_emif_fw_hwmod_class, | ||
135 | .slaves = omap44xx_emif_fw_slaves, | ||
136 | .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves), | ||
137 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
138 | }; | ||
139 | |||
140 | /* | ||
141 | * 'l3' class | ||
142 | * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3 | ||
143 | */ | ||
144 | static struct omap_hwmod_class omap44xx_l3_hwmod_class = { | ||
145 | .name = "l3", | ||
146 | }; | ||
147 | |||
148 | /* l3_instr interface data */ | ||
149 | /* l3_main_3 -> l3_instr */ | ||
150 | static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = { | ||
151 | .master = &omap44xx_l3_main_3_hwmod, | ||
152 | .slave = &omap44xx_l3_instr_hwmod, | ||
153 | .clk = "l3_div_ck", | ||
154 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
155 | }; | ||
156 | |||
157 | /* l3_instr slave ports */ | ||
158 | static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = { | ||
159 | &omap44xx_l3_main_3__l3_instr, | ||
160 | }; | ||
161 | |||
162 | static struct omap_hwmod omap44xx_l3_instr_hwmod = { | ||
163 | .name = "l3_instr", | ||
164 | .class = &omap44xx_l3_hwmod_class, | ||
165 | .slaves = omap44xx_l3_instr_slaves, | ||
166 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves), | ||
167 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
168 | }; | ||
169 | |||
170 | /* l3_main_2 -> l3_main_1 */ | ||
171 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = { | ||
172 | .master = &omap44xx_l3_main_2_hwmod, | ||
173 | .slave = &omap44xx_l3_main_1_hwmod, | ||
174 | .clk = "l3_div_ck", | ||
175 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
176 | }; | ||
177 | |||
178 | /* l4_cfg -> l3_main_1 */ | ||
179 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = { | ||
180 | .master = &omap44xx_l4_cfg_hwmod, | ||
181 | .slave = &omap44xx_l3_main_1_hwmod, | ||
182 | .clk = "l4_div_ck", | ||
183 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
184 | }; | ||
185 | |||
186 | /* mpu -> l3_main_1 */ | ||
187 | static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { | ||
188 | .master = &omap44xx_mpu_hwmod, | ||
189 | .slave = &omap44xx_l3_main_1_hwmod, | ||
190 | .clk = "l3_div_ck", | ||
191 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
192 | }; | ||
193 | |||
194 | /* l3_main_1 slave ports */ | ||
195 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = { | ||
196 | &omap44xx_l3_main_2__l3_main_1, | ||
197 | &omap44xx_l4_cfg__l3_main_1, | ||
198 | &omap44xx_mpu__l3_main_1, | ||
199 | }; | ||
200 | |||
201 | static struct omap_hwmod omap44xx_l3_main_1_hwmod = { | ||
202 | .name = "l3_main_1", | ||
203 | .class = &omap44xx_l3_hwmod_class, | ||
204 | .slaves = omap44xx_l3_main_1_slaves, | ||
205 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves), | ||
206 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
207 | }; | ||
208 | |||
209 | /* l3_main_2 interface data */ | ||
210 | /* l3_main_1 -> l3_main_2 */ | ||
211 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = { | ||
212 | .master = &omap44xx_l3_main_1_hwmod, | ||
213 | .slave = &omap44xx_l3_main_2_hwmod, | ||
214 | .clk = "l3_div_ck", | ||
215 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
216 | }; | ||
217 | |||
218 | /* l4_cfg -> l3_main_2 */ | ||
219 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = { | ||
220 | .master = &omap44xx_l4_cfg_hwmod, | ||
221 | .slave = &omap44xx_l3_main_2_hwmod, | ||
222 | .clk = "l4_div_ck", | ||
223 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
224 | }; | ||
225 | |||
226 | /* l3_main_2 slave ports */ | ||
227 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { | ||
228 | &omap44xx_l3_main_1__l3_main_2, | ||
229 | &omap44xx_l4_cfg__l3_main_2, | ||
230 | }; | ||
231 | |||
232 | static struct omap_hwmod omap44xx_l3_main_2_hwmod = { | ||
233 | .name = "l3_main_2", | ||
234 | .class = &omap44xx_l3_hwmod_class, | ||
235 | .slaves = omap44xx_l3_main_2_slaves, | ||
236 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves), | ||
237 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
238 | }; | ||
239 | |||
240 | /* l3_main_3 interface data */ | ||
241 | /* l3_main_1 -> l3_main_3 */ | ||
242 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = { | ||
243 | .master = &omap44xx_l3_main_1_hwmod, | ||
244 | .slave = &omap44xx_l3_main_3_hwmod, | ||
245 | .clk = "l3_div_ck", | ||
246 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
247 | }; | ||
248 | |||
249 | /* l3_main_2 -> l3_main_3 */ | ||
250 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = { | ||
251 | .master = &omap44xx_l3_main_2_hwmod, | ||
252 | .slave = &omap44xx_l3_main_3_hwmod, | ||
253 | .clk = "l3_div_ck", | ||
254 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
255 | }; | ||
256 | |||
257 | /* l4_cfg -> l3_main_3 */ | ||
258 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = { | ||
259 | .master = &omap44xx_l4_cfg_hwmod, | ||
260 | .slave = &omap44xx_l3_main_3_hwmod, | ||
261 | .clk = "l4_div_ck", | ||
262 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
263 | }; | ||
264 | |||
265 | /* l3_main_3 slave ports */ | ||
266 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = { | ||
267 | &omap44xx_l3_main_1__l3_main_3, | ||
268 | &omap44xx_l3_main_2__l3_main_3, | ||
269 | &omap44xx_l4_cfg__l3_main_3, | ||
270 | }; | ||
271 | |||
272 | static struct omap_hwmod omap44xx_l3_main_3_hwmod = { | ||
273 | .name = "l3_main_3", | ||
274 | .class = &omap44xx_l3_hwmod_class, | ||
275 | .slaves = omap44xx_l3_main_3_slaves, | ||
276 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves), | ||
277 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
278 | }; | ||
279 | |||
280 | /* | ||
281 | * 'l4' class | ||
282 | * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup | ||
283 | */ | ||
284 | static struct omap_hwmod_class omap44xx_l4_hwmod_class = { | ||
285 | .name = "l4", | ||
286 | }; | ||
287 | |||
288 | /* l4_abe interface data */ | ||
289 | /* l3_main_1 -> l4_abe */ | ||
290 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = { | ||
291 | .master = &omap44xx_l3_main_1_hwmod, | ||
292 | .slave = &omap44xx_l4_abe_hwmod, | ||
293 | .clk = "l3_div_ck", | ||
294 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
295 | }; | ||
296 | |||
297 | /* mpu -> l4_abe */ | ||
298 | static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = { | ||
299 | .master = &omap44xx_mpu_hwmod, | ||
300 | .slave = &omap44xx_l4_abe_hwmod, | ||
301 | .clk = "ocp_abe_iclk", | ||
302 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
303 | }; | ||
304 | |||
305 | /* l4_abe slave ports */ | ||
306 | static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = { | ||
307 | &omap44xx_l3_main_1__l4_abe, | ||
308 | &omap44xx_mpu__l4_abe, | ||
309 | }; | ||
310 | |||
311 | static struct omap_hwmod omap44xx_l4_abe_hwmod = { | ||
312 | .name = "l4_abe", | ||
313 | .class = &omap44xx_l4_hwmod_class, | ||
314 | .slaves = omap44xx_l4_abe_slaves, | ||
315 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves), | ||
316 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
317 | }; | ||
318 | |||
319 | /* l4_cfg interface data */ | ||
320 | /* l3_main_1 -> l4_cfg */ | ||
321 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = { | ||
322 | .master = &omap44xx_l3_main_1_hwmod, | ||
323 | .slave = &omap44xx_l4_cfg_hwmod, | ||
324 | .clk = "l3_div_ck", | ||
325 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
326 | }; | ||
327 | |||
328 | /* l4_cfg slave ports */ | ||
329 | static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = { | ||
330 | &omap44xx_l3_main_1__l4_cfg, | ||
331 | }; | ||
332 | |||
333 | static struct omap_hwmod omap44xx_l4_cfg_hwmod = { | ||
334 | .name = "l4_cfg", | ||
335 | .class = &omap44xx_l4_hwmod_class, | ||
336 | .slaves = omap44xx_l4_cfg_slaves, | ||
337 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves), | ||
338 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
339 | }; | ||
340 | |||
341 | /* l4_per interface data */ | ||
342 | /* l3_main_2 -> l4_per */ | ||
343 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = { | ||
344 | .master = &omap44xx_l3_main_2_hwmod, | ||
345 | .slave = &omap44xx_l4_per_hwmod, | ||
346 | .clk = "l3_div_ck", | ||
347 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
348 | }; | ||
349 | |||
350 | /* l4_per slave ports */ | ||
351 | static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = { | ||
352 | &omap44xx_l3_main_2__l4_per, | ||
353 | }; | ||
354 | |||
355 | static struct omap_hwmod omap44xx_l4_per_hwmod = { | ||
356 | .name = "l4_per", | ||
357 | .class = &omap44xx_l4_hwmod_class, | ||
358 | .slaves = omap44xx_l4_per_slaves, | ||
359 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves), | ||
360 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
361 | }; | ||
362 | |||
363 | /* l4_wkup interface data */ | ||
364 | /* l4_cfg -> l4_wkup */ | ||
365 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = { | ||
366 | .master = &omap44xx_l4_cfg_hwmod, | ||
367 | .slave = &omap44xx_l4_wkup_hwmod, | ||
368 | .clk = "l4_div_ck", | ||
369 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
370 | }; | ||
371 | |||
372 | /* l4_wkup slave ports */ | ||
373 | static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = { | ||
374 | &omap44xx_l4_cfg__l4_wkup, | ||
375 | }; | ||
376 | |||
377 | static struct omap_hwmod omap44xx_l4_wkup_hwmod = { | ||
378 | .name = "l4_wkup", | ||
379 | .class = &omap44xx_l4_hwmod_class, | ||
380 | .slaves = omap44xx_l4_wkup_slaves, | ||
381 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves), | ||
382 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
383 | }; | ||
384 | |||
385 | /* | ||
386 | * 'mpu_bus' class | ||
387 | * instance(s): mpu_private | ||
388 | */ | ||
389 | static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = { | ||
390 | .name = "mpu_bus", | ||
391 | }; | ||
392 | |||
393 | /* mpu_private interface data */ | ||
394 | /* mpu -> mpu_private */ | ||
395 | static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = { | ||
396 | .master = &omap44xx_mpu_hwmod, | ||
397 | .slave = &omap44xx_mpu_private_hwmod, | ||
398 | .clk = "l3_div_ck", | ||
399 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
400 | }; | ||
401 | |||
402 | /* mpu_private slave ports */ | ||
403 | static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = { | ||
404 | &omap44xx_mpu__mpu_private, | ||
405 | }; | ||
406 | |||
407 | static struct omap_hwmod omap44xx_mpu_private_hwmod = { | ||
408 | .name = "mpu_private", | ||
409 | .class = &omap44xx_mpu_bus_hwmod_class, | ||
410 | .slaves = omap44xx_mpu_private_slaves, | ||
411 | .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves), | ||
412 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
413 | }; | ||
414 | |||
415 | /* | ||
416 | * 'mpu' class | ||
417 | * mpu sub-system | ||
418 | */ | ||
419 | |||
420 | static struct omap_hwmod_class omap44xx_mpu_hwmod_class = { | ||
421 | .name = "mpu", | ||
422 | }; | ||
423 | |||
424 | /* mpu */ | ||
425 | static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = { | ||
426 | { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START }, | ||
427 | { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START }, | ||
428 | { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START }, | ||
429 | }; | ||
430 | |||
431 | /* mpu master ports */ | ||
432 | static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = { | ||
433 | &omap44xx_mpu__l3_main_1, | ||
434 | &omap44xx_mpu__l4_abe, | ||
435 | &omap44xx_mpu__dmm, | ||
436 | }; | ||
437 | |||
438 | static struct omap_hwmod omap44xx_mpu_hwmod = { | ||
439 | .name = "mpu", | ||
440 | .class = &omap44xx_mpu_hwmod_class, | ||
441 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | ||
442 | .mpu_irqs = omap44xx_mpu_irqs, | ||
443 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mpu_irqs), | ||
444 | .main_clk = "dpll_mpu_m2_ck", | ||
445 | .prcm = { | ||
446 | .omap4 = { | ||
447 | .clkctrl_reg = OMAP4430_CM_MPU_MPU_CLKCTRL, | ||
448 | }, | ||
449 | }, | ||
450 | .masters = omap44xx_mpu_masters, | ||
451 | .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters), | ||
452 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
453 | }; | ||
454 | |||
455 | /* | ||
456 | * 'wd_timer' class | ||
457 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | ||
458 | * overflow condition | ||
459 | */ | ||
460 | |||
461 | static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = { | ||
462 | .rev_offs = 0x0000, | ||
463 | .sysc_offs = 0x0010, | ||
464 | .syss_offs = 0x0014, | ||
465 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE | | ||
466 | SYSC_HAS_SOFTRESET), | ||
467 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
468 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
469 | }; | ||
470 | |||
471 | /* | ||
472 | * 'uart' class | ||
473 | * universal asynchronous receiver/transmitter (uart) | ||
474 | */ | ||
475 | |||
476 | static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = { | ||
477 | .rev_offs = 0x0050, | ||
478 | .sysc_offs = 0x0054, | ||
479 | .syss_offs = 0x0058, | ||
480 | .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | ||
481 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
482 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
483 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
484 | }; | ||
485 | |||
486 | static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = { | ||
487 | .name = "wd_timer", | ||
488 | .sysc = &omap44xx_wd_timer_sysc, | ||
489 | }; | ||
490 | |||
491 | /* wd_timer2 */ | ||
492 | static struct omap_hwmod omap44xx_wd_timer2_hwmod; | ||
493 | static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { | ||
494 | { .irq = 80 + OMAP44XX_IRQ_GIC_START }, | ||
495 | }; | ||
496 | |||
497 | static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = { | ||
498 | { | ||
499 | .pa_start = 0x4a314000, | ||
500 | .pa_end = 0x4a31407f, | ||
501 | .flags = ADDR_TYPE_RT | ||
502 | }, | ||
503 | }; | ||
504 | |||
505 | static struct omap_hwmod_class omap44xx_uart_hwmod_class = { | ||
506 | .name = "uart", | ||
507 | .sysc = &omap44xx_uart_sysc, | ||
508 | }; | ||
509 | |||
510 | /* uart1 */ | ||
511 | static struct omap_hwmod omap44xx_uart1_hwmod; | ||
512 | static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = { | ||
513 | { .irq = 72 + OMAP44XX_IRQ_GIC_START }, | ||
514 | }; | ||
515 | |||
516 | static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = { | ||
517 | { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START }, | ||
518 | { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START }, | ||
519 | }; | ||
520 | |||
521 | static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = { | ||
522 | { | ||
523 | .pa_start = 0x4806a000, | ||
524 | .pa_end = 0x4806a0ff, | ||
525 | .flags = ADDR_TYPE_RT | ||
526 | }, | ||
527 | }; | ||
528 | |||
529 | /* l4_per -> uart1 */ | ||
530 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = { | ||
531 | .master = &omap44xx_l4_per_hwmod, | ||
532 | .slave = &omap44xx_uart1_hwmod, | ||
533 | .clk = "l4_div_ck", | ||
534 | .addr = omap44xx_uart1_addrs, | ||
535 | .addr_cnt = ARRAY_SIZE(omap44xx_uart1_addrs), | ||
536 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
537 | }; | ||
538 | |||
539 | /* uart1 slave ports */ | ||
540 | static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = { | ||
541 | &omap44xx_l4_per__uart1, | ||
542 | }; | ||
543 | |||
544 | static struct omap_hwmod omap44xx_uart1_hwmod = { | ||
545 | .name = "uart1", | ||
546 | .class = &omap44xx_uart_hwmod_class, | ||
547 | .mpu_irqs = omap44xx_uart1_irqs, | ||
548 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart1_irqs), | ||
549 | .sdma_reqs = omap44xx_uart1_sdma_reqs, | ||
550 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart1_sdma_reqs), | ||
551 | .main_clk = "uart1_fck", | ||
552 | .prcm = { | ||
553 | .omap4 = { | ||
554 | .clkctrl_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL, | ||
555 | }, | ||
556 | }, | ||
557 | .slaves = omap44xx_uart1_slaves, | ||
558 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves), | ||
559 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
560 | }; | ||
561 | |||
562 | /* uart2 */ | ||
563 | static struct omap_hwmod omap44xx_uart2_hwmod; | ||
564 | static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = { | ||
565 | { .irq = 73 + OMAP44XX_IRQ_GIC_START }, | ||
566 | }; | ||
567 | |||
568 | static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = { | ||
569 | { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START }, | ||
570 | { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START }, | ||
571 | }; | ||
572 | |||
573 | static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = { | ||
574 | { | ||
575 | .pa_start = 0x4806c000, | ||
576 | .pa_end = 0x4806c0ff, | ||
577 | .flags = ADDR_TYPE_RT | ||
578 | }, | ||
579 | }; | ||
580 | |||
581 | /* l4_wkup -> wd_timer2 */ | ||
582 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = { | ||
583 | .master = &omap44xx_l4_wkup_hwmod, | ||
584 | .slave = &omap44xx_wd_timer2_hwmod, | ||
585 | .clk = "l4_wkup_clk_mux_ck", | ||
586 | .addr = omap44xx_wd_timer2_addrs, | ||
587 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer2_addrs), | ||
588 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
589 | }; | ||
590 | |||
591 | /* wd_timer2 slave ports */ | ||
592 | static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = { | ||
593 | &omap44xx_l4_wkup__wd_timer2, | ||
594 | }; | ||
595 | |||
596 | static struct omap_hwmod omap44xx_wd_timer2_hwmod = { | ||
597 | .name = "wd_timer2", | ||
598 | .class = &omap44xx_wd_timer_hwmod_class, | ||
599 | .mpu_irqs = omap44xx_wd_timer2_irqs, | ||
600 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer2_irqs), | ||
601 | .main_clk = "wd_timer2_fck", | ||
602 | .prcm = { | ||
603 | .omap4 = { | ||
604 | .clkctrl_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL, | ||
605 | }, | ||
606 | }, | ||
607 | .slaves = omap44xx_wd_timer2_slaves, | ||
608 | .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves), | ||
609 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
610 | }; | ||
611 | |||
612 | /* wd_timer3 */ | ||
613 | static struct omap_hwmod omap44xx_wd_timer3_hwmod; | ||
614 | static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = { | ||
615 | { .irq = 36 + OMAP44XX_IRQ_GIC_START }, | ||
616 | }; | ||
617 | |||
618 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { | ||
619 | { | ||
620 | .pa_start = 0x40130000, | ||
621 | .pa_end = 0x4013007f, | ||
622 | .flags = ADDR_TYPE_RT | ||
623 | }, | ||
624 | }; | ||
625 | |||
626 | /* l4_per -> uart2 */ | ||
627 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = { | ||
628 | .master = &omap44xx_l4_per_hwmod, | ||
629 | .slave = &omap44xx_uart2_hwmod, | ||
630 | .clk = "l4_div_ck", | ||
631 | .addr = omap44xx_uart2_addrs, | ||
632 | .addr_cnt = ARRAY_SIZE(omap44xx_uart2_addrs), | ||
633 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
634 | }; | ||
635 | |||
636 | /* uart2 slave ports */ | ||
637 | static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = { | ||
638 | &omap44xx_l4_per__uart2, | ||
639 | }; | ||
640 | |||
641 | static struct omap_hwmod omap44xx_uart2_hwmod = { | ||
642 | .name = "uart2", | ||
643 | .class = &omap44xx_uart_hwmod_class, | ||
644 | .mpu_irqs = omap44xx_uart2_irqs, | ||
645 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart2_irqs), | ||
646 | .sdma_reqs = omap44xx_uart2_sdma_reqs, | ||
647 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart2_sdma_reqs), | ||
648 | .main_clk = "uart2_fck", | ||
649 | .prcm = { | ||
650 | .omap4 = { | ||
651 | .clkctrl_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL, | ||
652 | }, | ||
653 | }, | ||
654 | .slaves = omap44xx_uart2_slaves, | ||
655 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves), | ||
656 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
657 | }; | ||
658 | |||
659 | /* uart3 */ | ||
660 | static struct omap_hwmod omap44xx_uart3_hwmod; | ||
661 | static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = { | ||
662 | { .irq = 74 + OMAP44XX_IRQ_GIC_START }, | ||
663 | }; | ||
664 | |||
665 | static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = { | ||
666 | { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START }, | ||
667 | { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START }, | ||
668 | }; | ||
669 | |||
670 | static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = { | ||
671 | { | ||
672 | .pa_start = 0x48020000, | ||
673 | .pa_end = 0x480200ff, | ||
674 | .flags = ADDR_TYPE_RT | ||
675 | }, | ||
676 | }; | ||
677 | |||
678 | /* l4_abe -> wd_timer3 */ | ||
679 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = { | ||
680 | .master = &omap44xx_l4_abe_hwmod, | ||
681 | .slave = &omap44xx_wd_timer3_hwmod, | ||
682 | .clk = "ocp_abe_iclk", | ||
683 | .addr = omap44xx_wd_timer3_addrs, | ||
684 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_addrs), | ||
685 | .user = OCP_USER_MPU, | ||
686 | }; | ||
687 | |||
688 | /* l4_abe -> wd_timer3 (dma) */ | ||
689 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = { | ||
690 | { | ||
691 | .pa_start = 0x49030000, | ||
692 | .pa_end = 0x4903007f, | ||
693 | .flags = ADDR_TYPE_RT | ||
694 | }, | ||
695 | }; | ||
696 | |||
697 | /* l4_per -> uart3 */ | ||
698 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = { | ||
699 | .master = &omap44xx_l4_per_hwmod, | ||
700 | .slave = &omap44xx_uart3_hwmod, | ||
701 | .clk = "l4_div_ck", | ||
702 | .addr = omap44xx_uart3_addrs, | ||
703 | .addr_cnt = ARRAY_SIZE(omap44xx_uart3_addrs), | ||
704 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
705 | }; | ||
706 | |||
707 | /* uart3 slave ports */ | ||
708 | static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = { | ||
709 | &omap44xx_l4_per__uart3, | ||
710 | }; | ||
711 | |||
712 | static struct omap_hwmod omap44xx_uart3_hwmod = { | ||
713 | .name = "uart3", | ||
714 | .class = &omap44xx_uart_hwmod_class, | ||
715 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | ||
716 | .mpu_irqs = omap44xx_uart3_irqs, | ||
717 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart3_irqs), | ||
718 | .sdma_reqs = omap44xx_uart3_sdma_reqs, | ||
719 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart3_sdma_reqs), | ||
720 | .main_clk = "uart3_fck", | ||
721 | .prcm = { | ||
722 | .omap4 = { | ||
723 | .clkctrl_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL, | ||
724 | }, | ||
725 | }, | ||
726 | .slaves = omap44xx_uart3_slaves, | ||
727 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves), | ||
728 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
729 | }; | ||
730 | |||
731 | /* uart4 */ | ||
732 | static struct omap_hwmod omap44xx_uart4_hwmod; | ||
733 | static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = { | ||
734 | { .irq = 70 + OMAP44XX_IRQ_GIC_START }, | ||
735 | }; | ||
736 | |||
737 | static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = { | ||
738 | { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START }, | ||
739 | { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START }, | ||
740 | }; | ||
741 | |||
742 | static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = { | ||
743 | { | ||
744 | .pa_start = 0x4806e000, | ||
745 | .pa_end = 0x4806e0ff, | ||
746 | .flags = ADDR_TYPE_RT | ||
747 | }, | ||
748 | }; | ||
749 | |||
750 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = { | ||
751 | .master = &omap44xx_l4_abe_hwmod, | ||
752 | .slave = &omap44xx_wd_timer3_hwmod, | ||
753 | .clk = "ocp_abe_iclk", | ||
754 | .addr = omap44xx_wd_timer3_dma_addrs, | ||
755 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_dma_addrs), | ||
756 | .user = OCP_USER_SDMA, | ||
757 | }; | ||
758 | |||
759 | /* wd_timer3 slave ports */ | ||
760 | static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = { | ||
761 | &omap44xx_l4_abe__wd_timer3, | ||
762 | &omap44xx_l4_abe__wd_timer3_dma, | ||
763 | }; | ||
764 | |||
765 | static struct omap_hwmod omap44xx_wd_timer3_hwmod = { | ||
766 | .name = "wd_timer3", | ||
767 | .class = &omap44xx_wd_timer_hwmod_class, | ||
768 | .mpu_irqs = omap44xx_wd_timer3_irqs, | ||
769 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer3_irqs), | ||
770 | .main_clk = "wd_timer3_fck", | ||
771 | .prcm = { | ||
772 | .omap4 = { | ||
773 | .clkctrl_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL, | ||
774 | }, | ||
775 | }, | ||
776 | .slaves = omap44xx_wd_timer3_slaves, | ||
777 | .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves), | ||
778 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
779 | }; | ||
780 | |||
781 | /* l4_per -> uart4 */ | ||
782 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = { | ||
783 | .master = &omap44xx_l4_per_hwmod, | ||
784 | .slave = &omap44xx_uart4_hwmod, | ||
785 | .clk = "l4_div_ck", | ||
786 | .addr = omap44xx_uart4_addrs, | ||
787 | .addr_cnt = ARRAY_SIZE(omap44xx_uart4_addrs), | ||
788 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
789 | }; | ||
790 | |||
791 | /* uart4 slave ports */ | ||
792 | static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = { | ||
793 | &omap44xx_l4_per__uart4, | ||
794 | }; | ||
795 | |||
796 | static struct omap_hwmod omap44xx_uart4_hwmod = { | ||
797 | .name = "uart4", | ||
798 | .class = &omap44xx_uart_hwmod_class, | ||
799 | .mpu_irqs = omap44xx_uart4_irqs, | ||
800 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart4_irqs), | ||
801 | .sdma_reqs = omap44xx_uart4_sdma_reqs, | ||
802 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart4_sdma_reqs), | ||
803 | .main_clk = "uart4_fck", | ||
804 | .prcm = { | ||
805 | .omap4 = { | ||
806 | .clkctrl_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL, | ||
807 | }, | ||
808 | }, | ||
809 | .slaves = omap44xx_uart4_slaves, | ||
810 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves), | ||
811 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
812 | }; | ||
813 | |||
814 | static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | ||
815 | /* dmm class */ | ||
816 | &omap44xx_dmm_hwmod, | ||
817 | /* emif_fw class */ | ||
818 | &omap44xx_emif_fw_hwmod, | ||
819 | /* l3 class */ | ||
820 | &omap44xx_l3_instr_hwmod, | ||
821 | &omap44xx_l3_main_1_hwmod, | ||
822 | &omap44xx_l3_main_2_hwmod, | ||
823 | &omap44xx_l3_main_3_hwmod, | ||
824 | /* l4 class */ | ||
825 | &omap44xx_l4_abe_hwmod, | ||
826 | &omap44xx_l4_cfg_hwmod, | ||
827 | &omap44xx_l4_per_hwmod, | ||
828 | &omap44xx_l4_wkup_hwmod, | ||
829 | /* mpu_bus class */ | ||
830 | &omap44xx_mpu_private_hwmod, | ||
831 | |||
832 | /* mpu class */ | ||
833 | &omap44xx_mpu_hwmod, | ||
834 | /* wd_timer class */ | ||
835 | &omap44xx_wd_timer2_hwmod, | ||
836 | &omap44xx_wd_timer3_hwmod, | ||
837 | |||
838 | /* uart class */ | ||
839 | &omap44xx_uart1_hwmod, | ||
840 | &omap44xx_uart2_hwmod, | ||
841 | &omap44xx_uart3_hwmod, | ||
842 | &omap44xx_uart4_hwmod, | ||
843 | NULL, | ||
844 | }; | ||
845 | |||
846 | int __init omap44xx_hwmod_init(void) | ||
847 | { | ||
848 | return omap_hwmod_init(omap44xx_hwmods); | ||
849 | } | ||
850 | |||
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 723b44e252fd..5e81517a7af2 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -31,12 +31,17 @@ | |||
31 | #include <plat/board.h> | 31 | #include <plat/board.h> |
32 | #include <plat/powerdomain.h> | 32 | #include <plat/powerdomain.h> |
33 | #include <plat/clockdomain.h> | 33 | #include <plat/clockdomain.h> |
34 | #include <plat/dmtimer.h> | ||
34 | 35 | ||
35 | #include "prm.h" | 36 | #include "prm.h" |
36 | #include "cm.h" | 37 | #include "cm.h" |
37 | #include "pm.h" | 38 | #include "pm.h" |
38 | 39 | ||
39 | int omap2_pm_debug; | 40 | int omap2_pm_debug; |
41 | u32 enable_off_mode; | ||
42 | u32 sleep_while_idle; | ||
43 | u32 wakeup_timer_seconds; | ||
44 | u32 wakeup_timer_milliseconds; | ||
40 | 45 | ||
41 | #define DUMP_PRM_MOD_REG(mod, reg) \ | 46 | #define DUMP_PRM_MOD_REG(mod, reg) \ |
42 | regs[reg_count].name = #mod "." #reg; \ | 47 | regs[reg_count].name = #mod "." #reg; \ |
@@ -162,7 +167,7 @@ void omap2_pm_dump(int mode, int resume, unsigned int us) | |||
162 | 167 | ||
163 | static void pm_dbg_regset_store(u32 *ptr); | 168 | static void pm_dbg_regset_store(u32 *ptr); |
164 | 169 | ||
165 | struct dentry *pm_dbg_dir; | 170 | static struct dentry *pm_dbg_dir; |
166 | 171 | ||
167 | static int pm_dbg_init_done; | 172 | static int pm_dbg_init_done; |
168 | 173 | ||
@@ -349,6 +354,23 @@ void pm_dbg_update_time(struct powerdomain *pwrdm, int prev) | |||
349 | pwrdm->timer = t; | 354 | pwrdm->timer = t; |
350 | } | 355 | } |
351 | 356 | ||
357 | void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds) | ||
358 | { | ||
359 | u32 tick_rate, cycles; | ||
360 | |||
361 | if (!seconds && !milliseconds) | ||
362 | return; | ||
363 | |||
364 | tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer_wakeup)); | ||
365 | cycles = tick_rate * seconds + tick_rate * milliseconds / 1000; | ||
366 | omap_dm_timer_stop(gptimer_wakeup); | ||
367 | omap_dm_timer_set_load_start(gptimer_wakeup, 0, 0xffffffff - cycles); | ||
368 | |||
369 | pr_info("PM: Resume timer in %u.%03u secs" | ||
370 | " (%d ticks at %d ticks/sec.)\n", | ||
371 | seconds, milliseconds, cycles, tick_rate); | ||
372 | } | ||
373 | |||
352 | static int clkdm_dbg_show_counter(struct clockdomain *clkdm, void *user) | 374 | static int clkdm_dbg_show_counter(struct clockdomain *clkdm, void *user) |
353 | { | 375 | { |
354 | struct seq_file *s = (struct seq_file *)user; | 376 | struct seq_file *s = (struct seq_file *)user; |
@@ -494,8 +516,10 @@ int pm_dbg_regset_init(int reg_set) | |||
494 | 516 | ||
495 | static int pwrdm_suspend_get(void *data, u64 *val) | 517 | static int pwrdm_suspend_get(void *data, u64 *val) |
496 | { | 518 | { |
497 | int ret; | 519 | int ret = -EINVAL; |
498 | ret = omap3_pm_get_suspend_state((struct powerdomain *)data); | 520 | |
521 | if (cpu_is_omap34xx()) | ||
522 | ret = omap3_pm_get_suspend_state((struct powerdomain *)data); | ||
499 | *val = ret; | 523 | *val = ret; |
500 | 524 | ||
501 | if (ret >= 0) | 525 | if (ret >= 0) |
@@ -505,7 +529,10 @@ static int pwrdm_suspend_get(void *data, u64 *val) | |||
505 | 529 | ||
506 | static int pwrdm_suspend_set(void *data, u64 val) | 530 | static int pwrdm_suspend_set(void *data, u64 val) |
507 | { | 531 | { |
508 | return omap3_pm_set_suspend_state((struct powerdomain *)data, (int)val); | 532 | if (cpu_is_omap34xx()) |
533 | return omap3_pm_set_suspend_state( | ||
534 | (struct powerdomain *)data, (int)val); | ||
535 | return -EINVAL; | ||
509 | } | 536 | } |
510 | 537 | ||
511 | DEFINE_SIMPLE_ATTRIBUTE(pwrdm_suspend_fops, pwrdm_suspend_get, | 538 | DEFINE_SIMPLE_ATTRIBUTE(pwrdm_suspend_fops, pwrdm_suspend_get, |
@@ -553,8 +580,10 @@ static int option_set(void *data, u64 val) | |||
553 | 580 | ||
554 | *option = val; | 581 | *option = val; |
555 | 582 | ||
556 | if (option == &enable_off_mode) | 583 | if (option == &enable_off_mode) { |
557 | omap3_pm_off_mode_enable(val); | 584 | if (cpu_is_omap34xx()) |
585 | omap3_pm_off_mode_enable(val); | ||
586 | } | ||
558 | 587 | ||
559 | return 0; | 588 | return 0; |
560 | } | 589 | } |
@@ -609,6 +638,9 @@ static int __init pm_dbg_init(void) | |||
609 | &sleep_while_idle, &pm_dbg_option_fops); | 638 | &sleep_while_idle, &pm_dbg_option_fops); |
610 | (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUGO, d, | 639 | (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUGO, d, |
611 | &wakeup_timer_seconds, &pm_dbg_option_fops); | 640 | &wakeup_timer_seconds, &pm_dbg_option_fops); |
641 | (void) debugfs_create_file("wakeup_timer_milliseconds", | ||
642 | S_IRUGO | S_IWUGO, d, &wakeup_timer_milliseconds, | ||
643 | &pm_dbg_option_fops); | ||
612 | pm_dbg_init_done = 1; | 644 | pm_dbg_init_done = 1; |
613 | 645 | ||
614 | return 0; | 646 | return 0; |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 68f9f2e95891..59ca03b0e691 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -18,11 +18,15 @@ | |||
18 | #include <plat/omap_device.h> | 18 | #include <plat/omap_device.h> |
19 | #include <plat/common.h> | 19 | #include <plat/common.h> |
20 | 20 | ||
21 | #include <plat/powerdomain.h> | ||
22 | #include <plat/clockdomain.h> | ||
23 | |||
21 | static struct omap_device_pm_latency *pm_lats; | 24 | static struct omap_device_pm_latency *pm_lats; |
22 | 25 | ||
23 | static struct device *mpu_dev; | 26 | static struct device *mpu_dev; |
24 | static struct device *dsp_dev; | 27 | static struct device *iva_dev; |
25 | static struct device *l3_dev; | 28 | static struct device *l3_dev; |
29 | static struct device *dsp_dev; | ||
26 | 30 | ||
27 | struct device *omap2_get_mpuss_device(void) | 31 | struct device *omap2_get_mpuss_device(void) |
28 | { | 32 | { |
@@ -30,10 +34,10 @@ struct device *omap2_get_mpuss_device(void) | |||
30 | return mpu_dev; | 34 | return mpu_dev; |
31 | } | 35 | } |
32 | 36 | ||
33 | struct device *omap2_get_dsp_device(void) | 37 | struct device *omap2_get_iva_device(void) |
34 | { | 38 | { |
35 | WARN_ON_ONCE(!dsp_dev); | 39 | WARN_ON_ONCE(!iva_dev); |
36 | return dsp_dev; | 40 | return iva_dev; |
37 | } | 41 | } |
38 | 42 | ||
39 | struct device *omap2_get_l3_device(void) | 43 | struct device *omap2_get_l3_device(void) |
@@ -42,6 +46,13 @@ struct device *omap2_get_l3_device(void) | |||
42 | return l3_dev; | 46 | return l3_dev; |
43 | } | 47 | } |
44 | 48 | ||
49 | struct device *omap4_get_dsp_device(void) | ||
50 | { | ||
51 | WARN_ON_ONCE(!dsp_dev); | ||
52 | return dsp_dev; | ||
53 | } | ||
54 | EXPORT_SYMBOL(omap4_get_dsp_device); | ||
55 | |||
45 | /* static int _init_omap_device(struct omap_hwmod *oh, void *user) */ | 56 | /* static int _init_omap_device(struct omap_hwmod *oh, void *user) */ |
46 | static int _init_omap_device(char *name, struct device **new_dev) | 57 | static int _init_omap_device(char *name, struct device **new_dev) |
47 | { | 58 | { |
@@ -69,8 +80,60 @@ static int _init_omap_device(char *name, struct device **new_dev) | |||
69 | static void omap2_init_processor_devices(void) | 80 | static void omap2_init_processor_devices(void) |
70 | { | 81 | { |
71 | _init_omap_device("mpu", &mpu_dev); | 82 | _init_omap_device("mpu", &mpu_dev); |
72 | _init_omap_device("iva", &dsp_dev); | 83 | _init_omap_device("iva", &iva_dev); |
73 | _init_omap_device("l3_main", &l3_dev); | 84 | if (cpu_is_omap44xx()) { |
85 | _init_omap_device("l3_main_1", &l3_dev); | ||
86 | _init_omap_device("dsp", &dsp_dev); | ||
87 | } else { | ||
88 | _init_omap_device("l3_main", &l3_dev); | ||
89 | } | ||
90 | } | ||
91 | |||
92 | /* | ||
93 | * This sets pwrdm state (other than mpu & core. Currently only ON & | ||
94 | * RET are supported. Function is assuming that clkdm doesn't have | ||
95 | * hw_sup mode enabled. | ||
96 | */ | ||
97 | int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | ||
98 | { | ||
99 | u32 cur_state; | ||
100 | int sleep_switch = 0; | ||
101 | int ret = 0; | ||
102 | |||
103 | if (pwrdm == NULL || IS_ERR(pwrdm)) | ||
104 | return -EINVAL; | ||
105 | |||
106 | while (!(pwrdm->pwrsts & (1 << state))) { | ||
107 | if (state == PWRDM_POWER_OFF) | ||
108 | return ret; | ||
109 | state--; | ||
110 | } | ||
111 | |||
112 | cur_state = pwrdm_read_next_pwrst(pwrdm); | ||
113 | if (cur_state == state) | ||
114 | return ret; | ||
115 | |||
116 | if (pwrdm_read_pwrst(pwrdm) < PWRDM_POWER_ON) { | ||
117 | omap2_clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); | ||
118 | sleep_switch = 1; | ||
119 | pwrdm_wait_transition(pwrdm); | ||
120 | } | ||
121 | |||
122 | ret = pwrdm_set_next_pwrst(pwrdm, state); | ||
123 | if (ret) { | ||
124 | printk(KERN_ERR "Unable to set state of powerdomain: %s\n", | ||
125 | pwrdm->name); | ||
126 | goto err; | ||
127 | } | ||
128 | |||
129 | if (sleep_switch) { | ||
130 | omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); | ||
131 | pwrdm_wait_transition(pwrdm); | ||
132 | pwrdm_state_switch(pwrdm); | ||
133 | } | ||
134 | |||
135 | err: | ||
136 | return ret; | ||
74 | } | 137 | } |
75 | 138 | ||
76 | static int __init omap2_common_pm_init(void) | 139 | static int __init omap2_common_pm_init(void) |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 3de6ece23fc8..0d75bfd1fdbe 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
@@ -13,14 +13,11 @@ | |||
13 | 13 | ||
14 | #include <plat/powerdomain.h> | 14 | #include <plat/powerdomain.h> |
15 | 15 | ||
16 | extern u32 enable_off_mode; | ||
17 | extern u32 sleep_while_idle; | ||
18 | |||
19 | extern void *omap3_secure_ram_storage; | 16 | extern void *omap3_secure_ram_storage; |
20 | extern void omap3_pm_off_mode_enable(int); | 17 | extern void omap3_pm_off_mode_enable(int); |
21 | extern void omap_sram_idle(void); | 18 | extern void omap_sram_idle(void); |
22 | extern int omap3_can_sleep(void); | 19 | extern int omap3_can_sleep(void); |
23 | extern int set_pwrdm_state(struct powerdomain *pwrdm, u32 state); | 20 | extern int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state); |
24 | extern int omap3_idle_init(void); | 21 | extern int omap3_idle_init(void); |
25 | 22 | ||
26 | struct cpuidle_params { | 23 | struct cpuidle_params { |
@@ -48,10 +45,16 @@ extern struct omap_dm_timer *gptimer_wakeup; | |||
48 | 45 | ||
49 | #ifdef CONFIG_PM_DEBUG | 46 | #ifdef CONFIG_PM_DEBUG |
50 | extern void omap2_pm_dump(int mode, int resume, unsigned int us); | 47 | extern void omap2_pm_dump(int mode, int resume, unsigned int us); |
48 | extern void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds); | ||
51 | extern int omap2_pm_debug; | 49 | extern int omap2_pm_debug; |
50 | extern u32 enable_off_mode; | ||
51 | extern u32 sleep_while_idle; | ||
52 | #else | 52 | #else |
53 | #define omap2_pm_dump(mode, resume, us) do {} while (0); | 53 | #define omap2_pm_dump(mode, resume, us) do {} while (0); |
54 | #define omap2_pm_wakeup_on_timer(seconds, milliseconds) do {} while (0); | ||
54 | #define omap2_pm_debug 0 | 55 | #define omap2_pm_debug 0 |
56 | #define enable_off_mode 0 | ||
57 | #define sleep_while_idle 0 | ||
55 | #endif | 58 | #endif |
56 | 59 | ||
57 | #if defined(CONFIG_CPU_IDLE) | 60 | #if defined(CONFIG_CPU_IDLE) |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index 6aeedeacdad8..a40457d81927 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <mach/irqs.h> | 38 | #include <mach/irqs.h> |
39 | #include <plat/clock.h> | 39 | #include <plat/clock.h> |
40 | #include <plat/sram.h> | 40 | #include <plat/sram.h> |
41 | #include <plat/control.h> | ||
42 | #include <plat/dma.h> | 41 | #include <plat/dma.h> |
43 | #include <plat/board.h> | 42 | #include <plat/board.h> |
44 | 43 | ||
@@ -48,6 +47,7 @@ | |||
48 | #include "cm-regbits-24xx.h" | 47 | #include "cm-regbits-24xx.h" |
49 | #include "sdrc.h" | 48 | #include "sdrc.h" |
50 | #include "pm.h" | 49 | #include "pm.h" |
50 | #include "control.h" | ||
51 | 51 | ||
52 | #include <plat/powerdomain.h> | 52 | #include <plat/powerdomain.h> |
53 | #include <plat/clockdomain.h> | 53 | #include <plat/clockdomain.h> |
@@ -245,6 +245,8 @@ static int omap2_can_sleep(void) | |||
245 | { | 245 | { |
246 | if (omap2_fclks_active()) | 246 | if (omap2_fclks_active()) |
247 | return 0; | 247 | return 0; |
248 | if (!omap_uart_can_sleep()) | ||
249 | return 0; | ||
248 | if (osc_ck->usecount > 1) | 250 | if (osc_ck->usecount > 1) |
249 | return 0; | 251 | return 0; |
250 | if (omap_dma_running()) | 252 | if (omap_dma_running()) |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 7b03426c72a3..75c0cd13ad8e 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -32,13 +32,11 @@ | |||
32 | #include <plat/sram.h> | 32 | #include <plat/sram.h> |
33 | #include <plat/clockdomain.h> | 33 | #include <plat/clockdomain.h> |
34 | #include <plat/powerdomain.h> | 34 | #include <plat/powerdomain.h> |
35 | #include <plat/control.h> | ||
36 | #include <plat/serial.h> | 35 | #include <plat/serial.h> |
37 | #include <plat/sdrc.h> | 36 | #include <plat/sdrc.h> |
38 | #include <plat/prcm.h> | 37 | #include <plat/prcm.h> |
39 | #include <plat/gpmc.h> | 38 | #include <plat/gpmc.h> |
40 | #include <plat/dma.h> | 39 | #include <plat/dma.h> |
41 | #include <plat/dmtimer.h> | ||
42 | 40 | ||
43 | #include <asm/tlbflush.h> | 41 | #include <asm/tlbflush.h> |
44 | 42 | ||
@@ -49,16 +47,12 @@ | |||
49 | #include "prm.h" | 47 | #include "prm.h" |
50 | #include "pm.h" | 48 | #include "pm.h" |
51 | #include "sdrc.h" | 49 | #include "sdrc.h" |
50 | #include "control.h" | ||
52 | 51 | ||
53 | /* Scratchpad offsets */ | 52 | /* Scratchpad offsets */ |
54 | #define OMAP343X_TABLE_ADDRESS_OFFSET 0x31 | 53 | #define OMAP343X_TABLE_ADDRESS_OFFSET 0xc4 |
55 | #define OMAP343X_TABLE_VALUE_OFFSET 0x30 | 54 | #define OMAP343X_TABLE_VALUE_OFFSET 0xc0 |
56 | #define OMAP343X_CONTROL_REG_VALUE_OFFSET 0x32 | 55 | #define OMAP343X_CONTROL_REG_VALUE_OFFSET 0xc8 |
57 | |||
58 | u32 enable_off_mode; | ||
59 | u32 sleep_while_idle; | ||
60 | u32 wakeup_timer_seconds; | ||
61 | u32 wakeup_timer_milliseconds; | ||
62 | 56 | ||
63 | struct power_state { | 57 | struct power_state { |
64 | struct powerdomain *pwrdm; | 58 | struct powerdomain *pwrdm; |
@@ -316,7 +310,7 @@ static void restore_control_register(u32 val) | |||
316 | /* Function to restore the table entry that was modified for enabling MMU */ | 310 | /* Function to restore the table entry that was modified for enabling MMU */ |
317 | static void restore_table_entry(void) | 311 | static void restore_table_entry(void) |
318 | { | 312 | { |
319 | u32 *scratchpad_address; | 313 | void __iomem *scratchpad_address; |
320 | u32 previous_value, control_reg_value; | 314 | u32 previous_value, control_reg_value; |
321 | u32 *address; | 315 | u32 *address; |
322 | 316 | ||
@@ -351,7 +345,6 @@ void omap_sram_idle(void) | |||
351 | int core_next_state = PWRDM_POWER_ON; | 345 | int core_next_state = PWRDM_POWER_ON; |
352 | int core_prev_state, per_prev_state; | 346 | int core_prev_state, per_prev_state; |
353 | u32 sdrc_pwr = 0; | 347 | u32 sdrc_pwr = 0; |
354 | int per_state_modified = 0; | ||
355 | 348 | ||
356 | if (!_omap_sram_idle) | 349 | if (!_omap_sram_idle) |
357 | return; | 350 | return; |
@@ -385,9 +378,9 @@ void omap_sram_idle(void) | |||
385 | /* Enable IO-PAD and IO-CHAIN wakeups */ | 378 | /* Enable IO-PAD and IO-CHAIN wakeups */ |
386 | per_next_state = pwrdm_read_next_pwrst(per_pwrdm); | 379 | per_next_state = pwrdm_read_next_pwrst(per_pwrdm); |
387 | core_next_state = pwrdm_read_next_pwrst(core_pwrdm); | 380 | core_next_state = pwrdm_read_next_pwrst(core_pwrdm); |
388 | if (omap3_has_io_wakeup() && \ | 381 | if (omap3_has_io_wakeup() && |
389 | (per_next_state < PWRDM_POWER_ON || | 382 | (per_next_state < PWRDM_POWER_ON || |
390 | core_next_state < PWRDM_POWER_ON)) { | 383 | core_next_state < PWRDM_POWER_ON)) { |
391 | prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN); | 384 | prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN); |
392 | omap3_enable_io_chain(); | 385 | omap3_enable_io_chain(); |
393 | } | 386 | } |
@@ -395,20 +388,12 @@ void omap_sram_idle(void) | |||
395 | /* PER */ | 388 | /* PER */ |
396 | if (per_next_state < PWRDM_POWER_ON) { | 389 | if (per_next_state < PWRDM_POWER_ON) { |
397 | omap_uart_prepare_idle(2); | 390 | omap_uart_prepare_idle(2); |
391 | omap_uart_prepare_idle(3); | ||
398 | omap2_gpio_prepare_for_idle(per_next_state); | 392 | omap2_gpio_prepare_for_idle(per_next_state); |
399 | if (per_next_state == PWRDM_POWER_OFF) { | 393 | if (per_next_state == PWRDM_POWER_OFF) |
400 | if (core_next_state == PWRDM_POWER_ON) { | ||
401 | per_next_state = PWRDM_POWER_RET; | ||
402 | pwrdm_set_next_pwrst(per_pwrdm, per_next_state); | ||
403 | per_state_modified = 1; | ||
404 | } else | ||
405 | omap3_per_save_context(); | 394 | omap3_per_save_context(); |
406 | } | ||
407 | } | 395 | } |
408 | 396 | ||
409 | if (pwrdm_read_pwrst(cam_pwrdm) == PWRDM_POWER_ON) | ||
410 | omap2_clkdm_deny_idle(mpu_pwrdm->pwrdm_clkdms[0]); | ||
411 | |||
412 | /* CORE */ | 397 | /* CORE */ |
413 | if (core_next_state < PWRDM_POWER_ON) { | 398 | if (core_next_state < PWRDM_POWER_ON) { |
414 | omap_uart_prepare_idle(0); | 399 | omap_uart_prepare_idle(0); |
@@ -475,8 +460,7 @@ void omap_sram_idle(void) | |||
475 | if (per_prev_state == PWRDM_POWER_OFF) | 460 | if (per_prev_state == PWRDM_POWER_OFF) |
476 | omap3_per_restore_context(); | 461 | omap3_per_restore_context(); |
477 | omap_uart_resume_idle(2); | 462 | omap_uart_resume_idle(2); |
478 | if (per_state_modified) | 463 | omap_uart_resume_idle(3); |
479 | pwrdm_set_next_pwrst(per_pwrdm, PWRDM_POWER_OFF); | ||
480 | } | 464 | } |
481 | 465 | ||
482 | /* Disable IO-PAD and IO-CHAIN wakeup */ | 466 | /* Disable IO-PAD and IO-CHAIN wakeup */ |
@@ -501,51 +485,6 @@ int omap3_can_sleep(void) | |||
501 | return 1; | 485 | return 1; |
502 | } | 486 | } |
503 | 487 | ||
504 | /* This sets pwrdm state (other than mpu & core. Currently only ON & | ||
505 | * RET are supported. Function is assuming that clkdm doesn't have | ||
506 | * hw_sup mode enabled. */ | ||
507 | int set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | ||
508 | { | ||
509 | u32 cur_state; | ||
510 | int sleep_switch = 0; | ||
511 | int ret = 0; | ||
512 | |||
513 | if (pwrdm == NULL || IS_ERR(pwrdm)) | ||
514 | return -EINVAL; | ||
515 | |||
516 | while (!(pwrdm->pwrsts & (1 << state))) { | ||
517 | if (state == PWRDM_POWER_OFF) | ||
518 | return ret; | ||
519 | state--; | ||
520 | } | ||
521 | |||
522 | cur_state = pwrdm_read_next_pwrst(pwrdm); | ||
523 | if (cur_state == state) | ||
524 | return ret; | ||
525 | |||
526 | if (pwrdm_read_pwrst(pwrdm) < PWRDM_POWER_ON) { | ||
527 | omap2_clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); | ||
528 | sleep_switch = 1; | ||
529 | pwrdm_wait_transition(pwrdm); | ||
530 | } | ||
531 | |||
532 | ret = pwrdm_set_next_pwrst(pwrdm, state); | ||
533 | if (ret) { | ||
534 | printk(KERN_ERR "Unable to set state of powerdomain: %s\n", | ||
535 | pwrdm->name); | ||
536 | goto err; | ||
537 | } | ||
538 | |||
539 | if (sleep_switch) { | ||
540 | omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); | ||
541 | pwrdm_wait_transition(pwrdm); | ||
542 | pwrdm_state_switch(pwrdm); | ||
543 | } | ||
544 | |||
545 | err: | ||
546 | return ret; | ||
547 | } | ||
548 | |||
549 | static void omap3_pm_idle(void) | 488 | static void omap3_pm_idle(void) |
550 | { | 489 | { |
551 | local_irq_disable(); | 490 | local_irq_disable(); |
@@ -567,23 +506,6 @@ out: | |||
567 | #ifdef CONFIG_SUSPEND | 506 | #ifdef CONFIG_SUSPEND |
568 | static suspend_state_t suspend_state; | 507 | static suspend_state_t suspend_state; |
569 | 508 | ||
570 | static void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds) | ||
571 | { | ||
572 | u32 tick_rate, cycles; | ||
573 | |||
574 | if (!seconds && !milliseconds) | ||
575 | return; | ||
576 | |||
577 | tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer_wakeup)); | ||
578 | cycles = tick_rate * seconds + tick_rate * milliseconds / 1000; | ||
579 | omap_dm_timer_stop(gptimer_wakeup); | ||
580 | omap_dm_timer_set_load_start(gptimer_wakeup, 0, 0xffffffff - cycles); | ||
581 | |||
582 | pr_info("PM: Resume timer in %u.%03u secs" | ||
583 | " (%d ticks at %d ticks/sec.)\n", | ||
584 | seconds, milliseconds, cycles, tick_rate); | ||
585 | } | ||
586 | |||
587 | static int omap3_pm_prepare(void) | 509 | static int omap3_pm_prepare(void) |
588 | { | 510 | { |
589 | disable_hlt(); | 511 | disable_hlt(); |
@@ -604,7 +526,7 @@ static int omap3_pm_suspend(void) | |||
604 | pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); | 526 | pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); |
605 | /* Set ones wanted by suspend */ | 527 | /* Set ones wanted by suspend */ |
606 | list_for_each_entry(pwrst, &pwrst_list, node) { | 528 | list_for_each_entry(pwrst, &pwrst_list, node) { |
607 | if (set_pwrdm_state(pwrst->pwrdm, pwrst->next_state)) | 529 | if (omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state)) |
608 | goto restore; | 530 | goto restore; |
609 | if (pwrdm_clear_all_prev_pwrst(pwrst->pwrdm)) | 531 | if (pwrdm_clear_all_prev_pwrst(pwrst->pwrdm)) |
610 | goto restore; | 532 | goto restore; |
@@ -625,7 +547,7 @@ restore: | |||
625 | pwrst->pwrdm->name, pwrst->next_state); | 547 | pwrst->pwrdm->name, pwrst->next_state); |
626 | ret = -1; | 548 | ret = -1; |
627 | } | 549 | } |
628 | set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state); | 550 | omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state); |
629 | } | 551 | } |
630 | if (ret) | 552 | if (ret) |
631 | printk(KERN_ERR "Could not enter target state in pm_suspend\n"); | 553 | printk(KERN_ERR "Could not enter target state in pm_suspend\n"); |
@@ -756,6 +678,14 @@ static void __init omap3_d2d_idle(void) | |||
756 | 678 | ||
757 | static void __init prcm_setup_regs(void) | 679 | static void __init prcm_setup_regs(void) |
758 | { | 680 | { |
681 | u32 omap3630_auto_uart4_mask = cpu_is_omap3630() ? | ||
682 | OMAP3630_AUTO_UART4_MASK : 0; | ||
683 | u32 omap3630_en_uart4_mask = cpu_is_omap3630() ? | ||
684 | OMAP3630_EN_UART4_MASK : 0; | ||
685 | u32 omap3630_grpsel_uart4_mask = cpu_is_omap3630() ? | ||
686 | OMAP3630_GRPSEL_UART4_MASK : 0; | ||
687 | |||
688 | |||
759 | /* XXX Reset all wkdeps. This should be done when initializing | 689 | /* XXX Reset all wkdeps. This should be done when initializing |
760 | * powerdomains */ | 690 | * powerdomains */ |
761 | prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP); | 691 | prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP); |
@@ -842,6 +772,7 @@ static void __init prcm_setup_regs(void) | |||
842 | CM_AUTOIDLE); | 772 | CM_AUTOIDLE); |
843 | 773 | ||
844 | cm_write_mod_reg( | 774 | cm_write_mod_reg( |
775 | omap3630_auto_uart4_mask | | ||
845 | OMAP3430_AUTO_GPIO6_MASK | | 776 | OMAP3430_AUTO_GPIO6_MASK | |
846 | OMAP3430_AUTO_GPIO5_MASK | | 777 | OMAP3430_AUTO_GPIO5_MASK | |
847 | OMAP3430_AUTO_GPIO4_MASK | | 778 | OMAP3430_AUTO_GPIO4_MASK | |
@@ -918,14 +849,16 @@ static void __init prcm_setup_regs(void) | |||
918 | OMAP3430_DSS_MOD, PM_WKEN); | 849 | OMAP3430_DSS_MOD, PM_WKEN); |
919 | 850 | ||
920 | /* Enable wakeups in PER */ | 851 | /* Enable wakeups in PER */ |
921 | prm_write_mod_reg(OMAP3430_EN_GPIO2_MASK | OMAP3430_EN_GPIO3_MASK | | 852 | prm_write_mod_reg(omap3630_en_uart4_mask | |
853 | OMAP3430_EN_GPIO2_MASK | OMAP3430_EN_GPIO3_MASK | | ||
922 | OMAP3430_EN_GPIO4_MASK | OMAP3430_EN_GPIO5_MASK | | 854 | OMAP3430_EN_GPIO4_MASK | OMAP3430_EN_GPIO5_MASK | |
923 | OMAP3430_EN_GPIO6_MASK | OMAP3430_EN_UART3_MASK | | 855 | OMAP3430_EN_GPIO6_MASK | OMAP3430_EN_UART3_MASK | |
924 | OMAP3430_EN_MCBSP2_MASK | OMAP3430_EN_MCBSP3_MASK | | 856 | OMAP3430_EN_MCBSP2_MASK | OMAP3430_EN_MCBSP3_MASK | |
925 | OMAP3430_EN_MCBSP4_MASK, | 857 | OMAP3430_EN_MCBSP4_MASK, |
926 | OMAP3430_PER_MOD, PM_WKEN); | 858 | OMAP3430_PER_MOD, PM_WKEN); |
927 | /* and allow them to wake up MPU */ | 859 | /* and allow them to wake up MPU */ |
928 | prm_write_mod_reg(OMAP3430_GRPSEL_GPIO2_MASK | | 860 | prm_write_mod_reg(omap3630_grpsel_uart4_mask | |
861 | OMAP3430_GRPSEL_GPIO2_MASK | | ||
929 | OMAP3430_GRPSEL_GPIO3_MASK | | 862 | OMAP3430_GRPSEL_GPIO3_MASK | |
930 | OMAP3430_GRPSEL_GPIO4_MASK | | 863 | OMAP3430_GRPSEL_GPIO4_MASK | |
931 | OMAP3430_GRPSEL_GPIO5_MASK | | 864 | OMAP3430_GRPSEL_GPIO5_MASK | |
@@ -974,7 +907,7 @@ void omap3_pm_off_mode_enable(int enable) | |||
974 | 907 | ||
975 | list_for_each_entry(pwrst, &pwrst_list, node) { | 908 | list_for_each_entry(pwrst, &pwrst_list, node) { |
976 | pwrst->next_state = state; | 909 | pwrst->next_state = state; |
977 | set_pwrdm_state(pwrst->pwrdm, state); | 910 | omap_set_pwrdm_state(pwrst->pwrdm, state); |
978 | } | 911 | } |
979 | } | 912 | } |
980 | 913 | ||
@@ -1019,7 +952,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) | |||
1019 | if (pwrdm_has_hdwr_sar(pwrdm)) | 952 | if (pwrdm_has_hdwr_sar(pwrdm)) |
1020 | pwrdm_enable_hdwr_sar(pwrdm); | 953 | pwrdm_enable_hdwr_sar(pwrdm); |
1021 | 954 | ||
1022 | return set_pwrdm_state(pwrst->pwrdm, pwrst->next_state); | 955 | return omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state); |
1023 | } | 956 | } |
1024 | 957 | ||
1025 | /* | 958 | /* |
@@ -1029,9 +962,6 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) | |||
1029 | */ | 962 | */ |
1030 | static int __init clkdms_setup(struct clockdomain *clkdm, void *unused) | 963 | static int __init clkdms_setup(struct clockdomain *clkdm, void *unused) |
1031 | { | 964 | { |
1032 | clkdm_clear_all_wkdeps(clkdm); | ||
1033 | clkdm_clear_all_sleepdeps(clkdm); | ||
1034 | |||
1035 | if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) | 965 | if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) |
1036 | omap2_clkdm_allow_idle(clkdm); | 966 | omap2_clkdm_allow_idle(clkdm); |
1037 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && | 967 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && |
diff --git a/arch/arm/mach-omap2/pm_bus.c b/arch/arm/mach-omap2/pm_bus.c new file mode 100644 index 000000000000..784989f8f2f5 --- /dev/null +++ b/arch/arm/mach-omap2/pm_bus.c | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * Runtime PM support code for OMAP | ||
3 | * | ||
4 | * Author: Kevin Hilman, Deep Root Systems, LLC | ||
5 | * | ||
6 | * Copyright (C) 2010 Texas Instruments, Inc. | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/pm_runtime.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/mutex.h> | ||
18 | |||
19 | #include <plat/omap_device.h> | ||
20 | #include <plat/omap-pm.h> | ||
21 | |||
22 | #ifdef CONFIG_PM_RUNTIME | ||
23 | int omap_pm_runtime_suspend(struct device *dev) | ||
24 | { | ||
25 | struct platform_device *pdev = to_platform_device(dev); | ||
26 | int r, ret = 0; | ||
27 | |||
28 | dev_dbg(dev, "%s\n", __func__); | ||
29 | |||
30 | ret = pm_generic_runtime_suspend(dev); | ||
31 | |||
32 | if (!ret && dev->parent == &omap_device_parent) { | ||
33 | r = omap_device_idle(pdev); | ||
34 | WARN_ON(r); | ||
35 | } | ||
36 | |||
37 | return ret; | ||
38 | }; | ||
39 | |||
40 | int omap_pm_runtime_resume(struct device *dev) | ||
41 | { | ||
42 | struct platform_device *pdev = to_platform_device(dev); | ||
43 | int r; | ||
44 | |||
45 | dev_dbg(dev, "%s\n", __func__); | ||
46 | |||
47 | if (dev->parent == &omap_device_parent) { | ||
48 | r = omap_device_enable(pdev); | ||
49 | WARN_ON(r); | ||
50 | } | ||
51 | |||
52 | return pm_generic_runtime_resume(dev); | ||
53 | }; | ||
54 | #else | ||
55 | #define omap_pm_runtime_suspend NULL | ||
56 | #define omap_pm_runtime_resume NULL | ||
57 | #endif /* CONFIG_PM_RUNTIME */ | ||
58 | |||
59 | static int __init omap_pm_runtime_init(void) | ||
60 | { | ||
61 | const struct dev_pm_ops *pm; | ||
62 | struct dev_pm_ops *omap_pm; | ||
63 | |||
64 | pm = platform_bus_get_pm_ops(); | ||
65 | if (!pm) { | ||
66 | pr_err("%s: unable to get dev_pm_ops from platform_bus\n", | ||
67 | __func__); | ||
68 | return -ENODEV; | ||
69 | } | ||
70 | |||
71 | omap_pm = kmemdup(pm, sizeof(struct dev_pm_ops), GFP_KERNEL); | ||
72 | if (!omap_pm) { | ||
73 | pr_err("%s: unable to alloc memory for new dev_pm_ops\n", | ||
74 | __func__); | ||
75 | return -ENOMEM; | ||
76 | } | ||
77 | |||
78 | omap_pm->runtime_suspend = omap_pm_runtime_suspend; | ||
79 | omap_pm->runtime_resume = omap_pm_runtime_resume; | ||
80 | |||
81 | platform_bus_set_pm_ops(omap_pm); | ||
82 | |||
83 | return 0; | ||
84 | } | ||
85 | core_initcall(omap_pm_runtime_init); | ||
diff --git a/arch/arm/mach-omap2/powerdomains44xx.h b/arch/arm/mach-omap2/powerdomains44xx.h index c7219513472a..9c01b55d6102 100644 --- a/arch/arm/mach-omap2/powerdomains44xx.h +++ b/arch/arm/mach-omap2/powerdomains44xx.h | |||
@@ -98,7 +98,7 @@ static struct powerdomain dss_44xx_pwrdm = { | |||
98 | .prcm_offs = OMAP4430_PRM_DSS_MOD, | 98 | .prcm_offs = OMAP4430_PRM_DSS_MOD, |
99 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 99 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
100 | .pwrsts = PWRSTS_OFF_RET_ON, | 100 | .pwrsts = PWRSTS_OFF_RET_ON, |
101 | .pwrsts_logic_ret = PWRSTS_OFF_RET, | 101 | .pwrsts_logic_ret = PWRSTS_OFF, |
102 | .banks = 1, | 102 | .banks = 1, |
103 | .pwrsts_mem_ret = { | 103 | .pwrsts_mem_ret = { |
104 | [0] = PWRDM_POWER_OFF, /* dss_mem */ | 104 | [0] = PWRDM_POWER_OFF, /* dss_mem */ |
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h index 995b7edbf18d..298a22a754e2 100644 --- a/arch/arm/mach-omap2/prcm-common.h +++ b/arch/arm/mach-omap2/prcm-common.h | |||
@@ -382,6 +382,9 @@ | |||
382 | #define OMAP3430_EN_MPU_SHIFT 1 | 382 | #define OMAP3430_EN_MPU_SHIFT 1 |
383 | 383 | ||
384 | /* CM_FCLKEN_PER, CM_ICLKEN_PER, PM_WKEN_PER shared bits */ | 384 | /* CM_FCLKEN_PER, CM_ICLKEN_PER, PM_WKEN_PER shared bits */ |
385 | |||
386 | #define OMAP3630_EN_UART4_MASK (1 << 18) | ||
387 | #define OMAP3630_EN_UART4_SHIFT 18 | ||
385 | #define OMAP3430_EN_GPIO6_MASK (1 << 17) | 388 | #define OMAP3430_EN_GPIO6_MASK (1 << 17) |
386 | #define OMAP3430_EN_GPIO6_SHIFT 17 | 389 | #define OMAP3430_EN_GPIO6_SHIFT 17 |
387 | #define OMAP3430_EN_GPIO5_MASK (1 << 16) | 390 | #define OMAP3430_EN_GPIO5_MASK (1 << 16) |
@@ -422,6 +425,8 @@ | |||
422 | #define OMAP3430_EN_MCBSP2_SHIFT 0 | 425 | #define OMAP3430_EN_MCBSP2_SHIFT 0 |
423 | 426 | ||
424 | /* CM_IDLEST_PER, PM_WKST_PER shared bits */ | 427 | /* CM_IDLEST_PER, PM_WKST_PER shared bits */ |
428 | #define OMAP3630_ST_UART4_SHIFT 18 | ||
429 | #define OMAP3630_ST_UART4_MASK (1 << 18) | ||
425 | #define OMAP3430_ST_GPIO6_SHIFT 17 | 430 | #define OMAP3430_ST_GPIO6_SHIFT 17 |
426 | #define OMAP3430_ST_GPIO6_MASK (1 << 17) | 431 | #define OMAP3430_ST_GPIO6_MASK (1 << 17) |
427 | #define OMAP3430_ST_GPIO5_SHIFT 16 | 432 | #define OMAP3430_ST_GPIO5_SHIFT 16 |
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index c20137497c92..a51846e3a6fa 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c | |||
@@ -26,13 +26,14 @@ | |||
26 | #include <plat/common.h> | 26 | #include <plat/common.h> |
27 | #include <plat/prcm.h> | 27 | #include <plat/prcm.h> |
28 | #include <plat/irqs.h> | 28 | #include <plat/irqs.h> |
29 | #include <plat/control.h> | ||
30 | 29 | ||
31 | #include "clock.h" | 30 | #include "clock.h" |
32 | #include "clock2xxx.h" | 31 | #include "clock2xxx.h" |
33 | #include "cm.h" | 32 | #include "cm.h" |
34 | #include "prm.h" | 33 | #include "prm.h" |
35 | #include "prm-regbits-24xx.h" | 34 | #include "prm-regbits-24xx.h" |
35 | #include "prm-regbits-44xx.h" | ||
36 | #include "control.h" | ||
36 | 37 | ||
37 | static void __iomem *prm_base; | 38 | static void __iomem *prm_base; |
38 | static void __iomem *cm_base; | 39 | static void __iomem *cm_base; |
@@ -118,7 +119,7 @@ struct omap3_prcm_regs { | |||
118 | u32 wkup_pm_wken; | 119 | u32 wkup_pm_wken; |
119 | }; | 120 | }; |
120 | 121 | ||
121 | struct omap3_prcm_regs prcm_context; | 122 | static struct omap3_prcm_regs prcm_context; |
122 | 123 | ||
123 | u32 omap_prcm_get_reset_sources(void) | 124 | u32 omap_prcm_get_reset_sources(void) |
124 | { | 125 | { |
@@ -161,8 +162,8 @@ void omap_prcm_arch_reset(char mode, const char *cmd) | |||
161 | prm_set_mod_reg_bits(OMAP_RST_DPLL3_MASK, prcm_offs, | 162 | prm_set_mod_reg_bits(OMAP_RST_DPLL3_MASK, prcm_offs, |
162 | OMAP2_RM_RSTCTRL); | 163 | OMAP2_RM_RSTCTRL); |
163 | if (cpu_is_omap44xx()) | 164 | if (cpu_is_omap44xx()) |
164 | prm_set_mod_reg_bits(OMAP_RST_DPLL3_MASK, prcm_offs, | 165 | prm_set_mod_reg_bits(OMAP4430_RST_GLOBAL_WARM_SW_MASK, |
165 | OMAP4_RM_RSTCTRL); | 166 | prcm_offs, OMAP4_RM_RSTCTRL); |
166 | } | 167 | } |
167 | 168 | ||
168 | static inline u32 __omap_prcm_read(void __iomem *base, s16 module, u16 reg) | 169 | static inline u32 __omap_prcm_read(void __iomem *base, s16 module, u16 reg) |
@@ -215,6 +216,30 @@ u32 prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask) | |||
215 | return v; | 216 | return v; |
216 | } | 217 | } |
217 | 218 | ||
219 | /* Read a PRM register, AND it, and shift the result down to bit 0 */ | ||
220 | u32 omap4_prm_read_bits_shift(void __iomem *reg, u32 mask) | ||
221 | { | ||
222 | u32 v; | ||
223 | |||
224 | v = __raw_readl(reg); | ||
225 | v &= mask; | ||
226 | v >>= __ffs(mask); | ||
227 | |||
228 | return v; | ||
229 | } | ||
230 | |||
231 | /* Read-modify-write a register in a PRM module. Caller must lock */ | ||
232 | u32 omap4_prm_rmw_reg_bits(u32 mask, u32 bits, void __iomem *reg) | ||
233 | { | ||
234 | u32 v; | ||
235 | |||
236 | v = __raw_readl(reg); | ||
237 | v &= ~mask; | ||
238 | v |= bits; | ||
239 | __raw_writel(v, reg); | ||
240 | |||
241 | return v; | ||
242 | } | ||
218 | /* Read a register in a CM module */ | 243 | /* Read a register in a CM module */ |
219 | u32 cm_read_mod_reg(s16 module, u16 idx) | 244 | u32 cm_read_mod_reg(s16 module, u16 idx) |
220 | { | 245 | { |
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h index 7fd6023edf96..9e63cb743a97 100644 --- a/arch/arm/mach-omap2/prm-regbits-34xx.h +++ b/arch/arm/mach-omap2/prm-regbits-34xx.h | |||
@@ -122,6 +122,7 @@ | |||
122 | #define OMAP3430_MEMRETSTATE_MASK (1 << 8) | 122 | #define OMAP3430_MEMRETSTATE_MASK (1 << 8) |
123 | 123 | ||
124 | /* PM_MPUGRPSEL_PER, PM_IVA2GRPSEL_PER shared bits */ | 124 | /* PM_MPUGRPSEL_PER, PM_IVA2GRPSEL_PER shared bits */ |
125 | #define OMAP3630_GRPSEL_UART4_MASK (1 << 18) | ||
125 | #define OMAP3430_GRPSEL_GPIO6_MASK (1 << 17) | 126 | #define OMAP3430_GRPSEL_GPIO6_MASK (1 << 17) |
126 | #define OMAP3430_GRPSEL_GPIO5_MASK (1 << 16) | 127 | #define OMAP3430_GRPSEL_GPIO5_MASK (1 << 16) |
127 | #define OMAP3430_GRPSEL_GPIO4_MASK (1 << 15) | 128 | #define OMAP3430_GRPSEL_GPIO4_MASK (1 << 15) |
diff --git a/arch/arm/mach-omap2/prm-regbits-44xx.h b/arch/arm/mach-omap2/prm-regbits-44xx.h index 597be4a2b9ff..25b19b610177 100644 --- a/arch/arm/mach-omap2/prm-regbits-44xx.h +++ b/arch/arm/mach-omap2/prm-regbits-44xx.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP44xx Power Management register bits | 2 | * OMAP44xx Power Management register bits |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. |
5 | * Copyright (C) 2009 Nokia Corporation | 5 | * Copyright (C) 2009-2010 Nokia Corporation |
6 | * | 6 | * |
7 | * Paul Walmsley (paul@pwsan.com) | 7 | * Paul Walmsley (paul@pwsan.com) |
8 | * Rajendra Nayak (rnayak@ti.com) | 8 | * Rajendra Nayak (rnayak@ti.com) |
@@ -30,587 +30,611 @@ | |||
30 | * PRM_LDO_SRAM_MPU_SETUP | 30 | * PRM_LDO_SRAM_MPU_SETUP |
31 | */ | 31 | */ |
32 | #define OMAP4430_ABBOFF_ACT_EXPORT_SHIFT 1 | 32 | #define OMAP4430_ABBOFF_ACT_EXPORT_SHIFT 1 |
33 | #define OMAP4430_ABBOFF_ACT_EXPORT_MASK BITFIELD(1, 1) | 33 | #define OMAP4430_ABBOFF_ACT_EXPORT_MASK (1 << 1) |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, | 36 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, |
37 | * PRM_LDO_SRAM_MPU_SETUP | 37 | * PRM_LDO_SRAM_MPU_SETUP |
38 | */ | 38 | */ |
39 | #define OMAP4430_ABBOFF_SLEEP_EXPORT_SHIFT 2 | 39 | #define OMAP4430_ABBOFF_SLEEP_EXPORT_SHIFT 2 |
40 | #define OMAP4430_ABBOFF_SLEEP_EXPORT_MASK BITFIELD(2, 2) | 40 | #define OMAP4430_ABBOFF_SLEEP_EXPORT_MASK (1 << 2) |
41 | 41 | ||
42 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 42 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
43 | #define OMAP4430_ABB_IVA_DONE_EN_SHIFT 31 | 43 | #define OMAP4430_ABB_IVA_DONE_EN_SHIFT 31 |
44 | #define OMAP4430_ABB_IVA_DONE_EN_MASK BITFIELD(31, 31) | 44 | #define OMAP4430_ABB_IVA_DONE_EN_MASK (1 << 31) |
45 | 45 | ||
46 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 46 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
47 | #define OMAP4430_ABB_IVA_DONE_ST_SHIFT 31 | 47 | #define OMAP4430_ABB_IVA_DONE_ST_SHIFT 31 |
48 | #define OMAP4430_ABB_IVA_DONE_ST_MASK BITFIELD(31, 31) | 48 | #define OMAP4430_ABB_IVA_DONE_ST_MASK (1 << 31) |
49 | 49 | ||
50 | /* Used by PRM_IRQENABLE_MPU_2 */ | 50 | /* Used by PRM_IRQENABLE_MPU_2 */ |
51 | #define OMAP4430_ABB_MPU_DONE_EN_SHIFT 7 | 51 | #define OMAP4430_ABB_MPU_DONE_EN_SHIFT 7 |
52 | #define OMAP4430_ABB_MPU_DONE_EN_MASK BITFIELD(7, 7) | 52 | #define OMAP4430_ABB_MPU_DONE_EN_MASK (1 << 7) |
53 | 53 | ||
54 | /* Used by PRM_IRQSTATUS_MPU_2 */ | 54 | /* Used by PRM_IRQSTATUS_MPU_2 */ |
55 | #define OMAP4430_ABB_MPU_DONE_ST_SHIFT 7 | 55 | #define OMAP4430_ABB_MPU_DONE_ST_SHIFT 7 |
56 | #define OMAP4430_ABB_MPU_DONE_ST_MASK BITFIELD(7, 7) | 56 | #define OMAP4430_ABB_MPU_DONE_ST_MASK (1 << 7) |
57 | 57 | ||
58 | /* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */ | 58 | /* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */ |
59 | #define OMAP4430_ACTIVE_FBB_SEL_SHIFT 2 | 59 | #define OMAP4430_ACTIVE_FBB_SEL_SHIFT 2 |
60 | #define OMAP4430_ACTIVE_FBB_SEL_MASK BITFIELD(2, 2) | 60 | #define OMAP4430_ACTIVE_FBB_SEL_MASK (1 << 2) |
61 | 61 | ||
62 | /* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */ | 62 | /* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */ |
63 | #define OMAP4430_ACTIVE_RBB_SEL_SHIFT 1 | 63 | #define OMAP4430_ACTIVE_RBB_SEL_SHIFT 1 |
64 | #define OMAP4430_ACTIVE_RBB_SEL_MASK BITFIELD(1, 1) | 64 | #define OMAP4430_ACTIVE_RBB_SEL_MASK (1 << 1) |
65 | 65 | ||
66 | /* Used by PM_ABE_PWRSTCTRL */ | 66 | /* Used by PM_ABE_PWRSTCTRL */ |
67 | #define OMAP4430_AESSMEM_ONSTATE_SHIFT 16 | 67 | #define OMAP4430_AESSMEM_ONSTATE_SHIFT 16 |
68 | #define OMAP4430_AESSMEM_ONSTATE_MASK BITFIELD(16, 17) | 68 | #define OMAP4430_AESSMEM_ONSTATE_MASK (0x3 << 16) |
69 | 69 | ||
70 | /* Used by PM_ABE_PWRSTCTRL */ | 70 | /* Used by PM_ABE_PWRSTCTRL */ |
71 | #define OMAP4430_AESSMEM_RETSTATE_SHIFT 8 | 71 | #define OMAP4430_AESSMEM_RETSTATE_SHIFT 8 |
72 | #define OMAP4430_AESSMEM_RETSTATE_MASK BITFIELD(8, 8) | 72 | #define OMAP4430_AESSMEM_RETSTATE_MASK (1 << 8) |
73 | 73 | ||
74 | /* Used by PM_ABE_PWRSTST */ | 74 | /* Used by PM_ABE_PWRSTST */ |
75 | #define OMAP4430_AESSMEM_STATEST_SHIFT 4 | 75 | #define OMAP4430_AESSMEM_STATEST_SHIFT 4 |
76 | #define OMAP4430_AESSMEM_STATEST_MASK BITFIELD(4, 5) | 76 | #define OMAP4430_AESSMEM_STATEST_MASK (0x3 << 4) |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, | 79 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, |
80 | * PRM_LDO_SRAM_MPU_SETUP | 80 | * PRM_LDO_SRAM_MPU_SETUP |
81 | */ | 81 | */ |
82 | #define OMAP4430_AIPOFF_SHIFT 8 | 82 | #define OMAP4430_AIPOFF_SHIFT 8 |
83 | #define OMAP4430_AIPOFF_MASK BITFIELD(8, 8) | 83 | #define OMAP4430_AIPOFF_MASK (1 << 8) |
84 | 84 | ||
85 | /* Used by PRM_VOLTCTRL */ | 85 | /* Used by PRM_VOLTCTRL */ |
86 | #define OMAP4430_AUTO_CTRL_VDD_CORE_L_SHIFT 0 | 86 | #define OMAP4430_AUTO_CTRL_VDD_CORE_L_SHIFT 0 |
87 | #define OMAP4430_AUTO_CTRL_VDD_CORE_L_MASK BITFIELD(0, 1) | 87 | #define OMAP4430_AUTO_CTRL_VDD_CORE_L_MASK (0x3 << 0) |
88 | 88 | ||
89 | /* Used by PRM_VOLTCTRL */ | 89 | /* Used by PRM_VOLTCTRL */ |
90 | #define OMAP4430_AUTO_CTRL_VDD_IVA_L_SHIFT 4 | 90 | #define OMAP4430_AUTO_CTRL_VDD_IVA_L_SHIFT 4 |
91 | #define OMAP4430_AUTO_CTRL_VDD_IVA_L_MASK BITFIELD(4, 5) | 91 | #define OMAP4430_AUTO_CTRL_VDD_IVA_L_MASK (0x3 << 4) |
92 | 92 | ||
93 | /* Used by PRM_VOLTCTRL */ | 93 | /* Used by PRM_VOLTCTRL */ |
94 | #define OMAP4430_AUTO_CTRL_VDD_MPU_L_SHIFT 2 | 94 | #define OMAP4430_AUTO_CTRL_VDD_MPU_L_SHIFT 2 |
95 | #define OMAP4430_AUTO_CTRL_VDD_MPU_L_MASK BITFIELD(2, 3) | 95 | #define OMAP4430_AUTO_CTRL_VDD_MPU_L_MASK (0x3 << 2) |
96 | |||
97 | /* Used by PRM_VC_ERRST */ | ||
98 | #define OMAP4430_BYPS_RA_ERR_SHIFT 25 | ||
99 | #define OMAP4430_BYPS_RA_ERR_MASK (1 << 25) | ||
100 | |||
101 | /* Used by PRM_VC_ERRST */ | ||
102 | #define OMAP4430_BYPS_SA_ERR_SHIFT 24 | ||
103 | #define OMAP4430_BYPS_SA_ERR_MASK (1 << 24) | ||
104 | |||
105 | /* Used by PRM_VC_ERRST */ | ||
106 | #define OMAP4430_BYPS_TIMEOUT_ERR_SHIFT 26 | ||
107 | #define OMAP4430_BYPS_TIMEOUT_ERR_MASK (1 << 26) | ||
108 | |||
109 | /* Used by PRM_RSTST */ | ||
110 | #define OMAP4430_C2C_RST_SHIFT 10 | ||
111 | #define OMAP4430_C2C_RST_MASK (1 << 10) | ||
96 | 112 | ||
97 | /* Used by PM_CAM_PWRSTCTRL */ | 113 | /* Used by PM_CAM_PWRSTCTRL */ |
98 | #define OMAP4430_CAM_MEM_ONSTATE_SHIFT 16 | 114 | #define OMAP4430_CAM_MEM_ONSTATE_SHIFT 16 |
99 | #define OMAP4430_CAM_MEM_ONSTATE_MASK BITFIELD(16, 17) | 115 | #define OMAP4430_CAM_MEM_ONSTATE_MASK (0x3 << 16) |
100 | 116 | ||
101 | /* Used by PM_CAM_PWRSTST */ | 117 | /* Used by PM_CAM_PWRSTST */ |
102 | #define OMAP4430_CAM_MEM_STATEST_SHIFT 4 | 118 | #define OMAP4430_CAM_MEM_STATEST_SHIFT 4 |
103 | #define OMAP4430_CAM_MEM_STATEST_MASK BITFIELD(4, 5) | 119 | #define OMAP4430_CAM_MEM_STATEST_MASK (0x3 << 4) |
104 | 120 | ||
105 | /* Used by PRM_CLKREQCTRL */ | 121 | /* Used by PRM_CLKREQCTRL */ |
106 | #define OMAP4430_CLKREQ_COND_SHIFT 0 | 122 | #define OMAP4430_CLKREQ_COND_SHIFT 0 |
107 | #define OMAP4430_CLKREQ_COND_MASK BITFIELD(0, 2) | 123 | #define OMAP4430_CLKREQ_COND_MASK (0x7 << 0) |
108 | 124 | ||
109 | /* Used by PRM_VC_VAL_SMPS_RA_CMD */ | 125 | /* Used by PRM_VC_VAL_SMPS_RA_CMD */ |
110 | #define OMAP4430_CMDRA_VDD_CORE_L_SHIFT 0 | 126 | #define OMAP4430_CMDRA_VDD_CORE_L_SHIFT 0 |
111 | #define OMAP4430_CMDRA_VDD_CORE_L_MASK BITFIELD(0, 7) | 127 | #define OMAP4430_CMDRA_VDD_CORE_L_MASK (0xff << 0) |
112 | 128 | ||
113 | /* Used by PRM_VC_VAL_SMPS_RA_CMD */ | 129 | /* Used by PRM_VC_VAL_SMPS_RA_CMD */ |
114 | #define OMAP4430_CMDRA_VDD_IVA_L_SHIFT 8 | 130 | #define OMAP4430_CMDRA_VDD_IVA_L_SHIFT 8 |
115 | #define OMAP4430_CMDRA_VDD_IVA_L_MASK BITFIELD(8, 15) | 131 | #define OMAP4430_CMDRA_VDD_IVA_L_MASK (0xff << 8) |
116 | 132 | ||
117 | /* Used by PRM_VC_VAL_SMPS_RA_CMD */ | 133 | /* Used by PRM_VC_VAL_SMPS_RA_CMD */ |
118 | #define OMAP4430_CMDRA_VDD_MPU_L_SHIFT 16 | 134 | #define OMAP4430_CMDRA_VDD_MPU_L_SHIFT 16 |
119 | #define OMAP4430_CMDRA_VDD_MPU_L_MASK BITFIELD(16, 23) | 135 | #define OMAP4430_CMDRA_VDD_MPU_L_MASK (0xff << 16) |
120 | 136 | ||
121 | /* Used by PRM_VC_CFG_CHANNEL */ | 137 | /* Used by PRM_VC_CFG_CHANNEL */ |
122 | #define OMAP4430_CMD_VDD_CORE_L_SHIFT 4 | 138 | #define OMAP4430_CMD_VDD_CORE_L_SHIFT 4 |
123 | #define OMAP4430_CMD_VDD_CORE_L_MASK BITFIELD(4, 4) | 139 | #define OMAP4430_CMD_VDD_CORE_L_MASK (1 << 4) |
124 | 140 | ||
125 | /* Used by PRM_VC_CFG_CHANNEL */ | 141 | /* Used by PRM_VC_CFG_CHANNEL */ |
126 | #define OMAP4430_CMD_VDD_IVA_L_SHIFT 12 | 142 | #define OMAP4430_CMD_VDD_IVA_L_SHIFT 12 |
127 | #define OMAP4430_CMD_VDD_IVA_L_MASK BITFIELD(12, 12) | 143 | #define OMAP4430_CMD_VDD_IVA_L_MASK (1 << 12) |
128 | 144 | ||
129 | /* Used by PRM_VC_CFG_CHANNEL */ | 145 | /* Used by PRM_VC_CFG_CHANNEL */ |
130 | #define OMAP4430_CMD_VDD_MPU_L_SHIFT 17 | 146 | #define OMAP4430_CMD_VDD_MPU_L_SHIFT 17 |
131 | #define OMAP4430_CMD_VDD_MPU_L_MASK BITFIELD(17, 17) | 147 | #define OMAP4430_CMD_VDD_MPU_L_MASK (1 << 17) |
132 | 148 | ||
133 | /* Used by PM_CORE_PWRSTCTRL */ | 149 | /* Used by PM_CORE_PWRSTCTRL */ |
134 | #define OMAP4430_CORE_OCMRAM_ONSTATE_SHIFT 18 | 150 | #define OMAP4430_CORE_OCMRAM_ONSTATE_SHIFT 18 |
135 | #define OMAP4430_CORE_OCMRAM_ONSTATE_MASK BITFIELD(18, 19) | 151 | #define OMAP4430_CORE_OCMRAM_ONSTATE_MASK (0x3 << 18) |
136 | 152 | ||
137 | /* Used by PM_CORE_PWRSTCTRL */ | 153 | /* Used by PM_CORE_PWRSTCTRL */ |
138 | #define OMAP4430_CORE_OCMRAM_RETSTATE_SHIFT 9 | 154 | #define OMAP4430_CORE_OCMRAM_RETSTATE_SHIFT 9 |
139 | #define OMAP4430_CORE_OCMRAM_RETSTATE_MASK BITFIELD(9, 9) | 155 | #define OMAP4430_CORE_OCMRAM_RETSTATE_MASK (1 << 9) |
140 | 156 | ||
141 | /* Used by PM_CORE_PWRSTST */ | 157 | /* Used by PM_CORE_PWRSTST */ |
142 | #define OMAP4430_CORE_OCMRAM_STATEST_SHIFT 6 | 158 | #define OMAP4430_CORE_OCMRAM_STATEST_SHIFT 6 |
143 | #define OMAP4430_CORE_OCMRAM_STATEST_MASK BITFIELD(6, 7) | 159 | #define OMAP4430_CORE_OCMRAM_STATEST_MASK (0x3 << 6) |
144 | 160 | ||
145 | /* Used by PM_CORE_PWRSTCTRL */ | 161 | /* Used by PM_CORE_PWRSTCTRL */ |
146 | #define OMAP4430_CORE_OTHER_BANK_ONSTATE_SHIFT 16 | 162 | #define OMAP4430_CORE_OTHER_BANK_ONSTATE_SHIFT 16 |
147 | #define OMAP4430_CORE_OTHER_BANK_ONSTATE_MASK BITFIELD(16, 17) | 163 | #define OMAP4430_CORE_OTHER_BANK_ONSTATE_MASK (0x3 << 16) |
148 | 164 | ||
149 | /* Used by PM_CORE_PWRSTCTRL */ | 165 | /* Used by PM_CORE_PWRSTCTRL */ |
150 | #define OMAP4430_CORE_OTHER_BANK_RETSTATE_SHIFT 8 | 166 | #define OMAP4430_CORE_OTHER_BANK_RETSTATE_SHIFT 8 |
151 | #define OMAP4430_CORE_OTHER_BANK_RETSTATE_MASK BITFIELD(8, 8) | 167 | #define OMAP4430_CORE_OTHER_BANK_RETSTATE_MASK (1 << 8) |
152 | 168 | ||
153 | /* Used by PM_CORE_PWRSTST */ | 169 | /* Used by PM_CORE_PWRSTST */ |
154 | #define OMAP4430_CORE_OTHER_BANK_STATEST_SHIFT 4 | 170 | #define OMAP4430_CORE_OTHER_BANK_STATEST_SHIFT 4 |
155 | #define OMAP4430_CORE_OTHER_BANK_STATEST_MASK BITFIELD(4, 5) | 171 | #define OMAP4430_CORE_OTHER_BANK_STATEST_MASK (0x3 << 4) |
172 | |||
173 | /* Used by REVISION_PRM */ | ||
174 | #define OMAP4430_CUSTOM_SHIFT 6 | ||
175 | #define OMAP4430_CUSTOM_MASK (0x3 << 6) | ||
156 | 176 | ||
157 | /* Used by PRM_VC_VAL_BYPASS */ | 177 | /* Used by PRM_VC_VAL_BYPASS */ |
158 | #define OMAP4430_DATA_SHIFT 16 | 178 | #define OMAP4430_DATA_SHIFT 16 |
159 | #define OMAP4430_DATA_MASK BITFIELD(16, 23) | 179 | #define OMAP4430_DATA_MASK (0xff << 16) |
160 | 180 | ||
161 | /* Used by PRM_DEVICE_OFF_CTRL */ | 181 | /* Used by PRM_DEVICE_OFF_CTRL */ |
162 | #define OMAP4430_DEVICE_OFF_ENABLE_SHIFT 0 | 182 | #define OMAP4430_DEVICE_OFF_ENABLE_SHIFT 0 |
163 | #define OMAP4430_DEVICE_OFF_ENABLE_MASK BITFIELD(0, 0) | 183 | #define OMAP4430_DEVICE_OFF_ENABLE_MASK (1 << 0) |
164 | 184 | ||
165 | /* Used by PRM_VC_CFG_I2C_MODE */ | 185 | /* Used by PRM_VC_CFG_I2C_MODE */ |
166 | #define OMAP4430_DFILTEREN_SHIFT 6 | 186 | #define OMAP4430_DFILTEREN_SHIFT 6 |
167 | #define OMAP4430_DFILTEREN_MASK BITFIELD(6, 6) | 187 | #define OMAP4430_DFILTEREN_MASK (1 << 6) |
168 | 188 | ||
169 | /* Used by PRM_IRQENABLE_MPU, PRM_IRQENABLE_TESLA */ | 189 | /* |
190 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, | ||
191 | * PRM_LDO_SRAM_MPU_SETUP, PRM_SRAM_WKUP_SETUP | ||
192 | */ | ||
193 | #define OMAP4430_DISABLE_RTA_EXPORT_SHIFT 0 | ||
194 | #define OMAP4430_DISABLE_RTA_EXPORT_MASK (1 << 0) | ||
195 | |||
196 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU, PRM_IRQENABLE_TESLA */ | ||
170 | #define OMAP4430_DPLL_ABE_RECAL_EN_SHIFT 4 | 197 | #define OMAP4430_DPLL_ABE_RECAL_EN_SHIFT 4 |
171 | #define OMAP4430_DPLL_ABE_RECAL_EN_MASK BITFIELD(4, 4) | 198 | #define OMAP4430_DPLL_ABE_RECAL_EN_MASK (1 << 4) |
172 | 199 | ||
173 | /* Used by PRM_IRQSTATUS_MPU, PRM_IRQSTATUS_TESLA */ | 200 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU, PRM_IRQSTATUS_TESLA */ |
174 | #define OMAP4430_DPLL_ABE_RECAL_ST_SHIFT 4 | 201 | #define OMAP4430_DPLL_ABE_RECAL_ST_SHIFT 4 |
175 | #define OMAP4430_DPLL_ABE_RECAL_ST_MASK BITFIELD(4, 4) | 202 | #define OMAP4430_DPLL_ABE_RECAL_ST_MASK (1 << 4) |
176 | 203 | ||
177 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 204 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
178 | #define OMAP4430_DPLL_CORE_RECAL_EN_SHIFT 0 | 205 | #define OMAP4430_DPLL_CORE_RECAL_EN_SHIFT 0 |
179 | #define OMAP4430_DPLL_CORE_RECAL_EN_MASK BITFIELD(0, 0) | 206 | #define OMAP4430_DPLL_CORE_RECAL_EN_MASK (1 << 0) |
180 | 207 | ||
181 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 208 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
182 | #define OMAP4430_DPLL_CORE_RECAL_ST_SHIFT 0 | 209 | #define OMAP4430_DPLL_CORE_RECAL_ST_SHIFT 0 |
183 | #define OMAP4430_DPLL_CORE_RECAL_ST_MASK BITFIELD(0, 0) | 210 | #define OMAP4430_DPLL_CORE_RECAL_ST_MASK (1 << 0) |
184 | 211 | ||
185 | /* Used by PRM_IRQENABLE_MPU */ | 212 | /* Used by PRM_IRQENABLE_MPU */ |
186 | #define OMAP4430_DPLL_DDRPHY_RECAL_EN_SHIFT 6 | 213 | #define OMAP4430_DPLL_DDRPHY_RECAL_EN_SHIFT 6 |
187 | #define OMAP4430_DPLL_DDRPHY_RECAL_EN_MASK BITFIELD(6, 6) | 214 | #define OMAP4430_DPLL_DDRPHY_RECAL_EN_MASK (1 << 6) |
188 | 215 | ||
189 | /* Used by PRM_IRQSTATUS_MPU */ | 216 | /* Used by PRM_IRQSTATUS_MPU */ |
190 | #define OMAP4430_DPLL_DDRPHY_RECAL_ST_SHIFT 6 | 217 | #define OMAP4430_DPLL_DDRPHY_RECAL_ST_SHIFT 6 |
191 | #define OMAP4430_DPLL_DDRPHY_RECAL_ST_MASK BITFIELD(6, 6) | 218 | #define OMAP4430_DPLL_DDRPHY_RECAL_ST_MASK (1 << 6) |
192 | 219 | ||
193 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU, PRM_IRQENABLE_TESLA */ | 220 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU, PRM_IRQENABLE_TESLA */ |
194 | #define OMAP4430_DPLL_IVA_RECAL_EN_SHIFT 2 | 221 | #define OMAP4430_DPLL_IVA_RECAL_EN_SHIFT 2 |
195 | #define OMAP4430_DPLL_IVA_RECAL_EN_MASK BITFIELD(2, 2) | 222 | #define OMAP4430_DPLL_IVA_RECAL_EN_MASK (1 << 2) |
196 | 223 | ||
197 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU, PRM_IRQSTATUS_TESLA */ | 224 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU, PRM_IRQSTATUS_TESLA */ |
198 | #define OMAP4430_DPLL_IVA_RECAL_ST_SHIFT 2 | 225 | #define OMAP4430_DPLL_IVA_RECAL_ST_SHIFT 2 |
199 | #define OMAP4430_DPLL_IVA_RECAL_ST_MASK BITFIELD(2, 2) | 226 | #define OMAP4430_DPLL_IVA_RECAL_ST_MASK (1 << 2) |
200 | 227 | ||
201 | /* Used by PRM_IRQENABLE_MPU */ | 228 | /* Used by PRM_IRQENABLE_MPU */ |
202 | #define OMAP4430_DPLL_MPU_RECAL_EN_SHIFT 1 | 229 | #define OMAP4430_DPLL_MPU_RECAL_EN_SHIFT 1 |
203 | #define OMAP4430_DPLL_MPU_RECAL_EN_MASK BITFIELD(1, 1) | 230 | #define OMAP4430_DPLL_MPU_RECAL_EN_MASK (1 << 1) |
204 | 231 | ||
205 | /* Used by PRM_IRQSTATUS_MPU */ | 232 | /* Used by PRM_IRQSTATUS_MPU */ |
206 | #define OMAP4430_DPLL_MPU_RECAL_ST_SHIFT 1 | 233 | #define OMAP4430_DPLL_MPU_RECAL_ST_SHIFT 1 |
207 | #define OMAP4430_DPLL_MPU_RECAL_ST_MASK BITFIELD(1, 1) | 234 | #define OMAP4430_DPLL_MPU_RECAL_ST_MASK (1 << 1) |
208 | 235 | ||
209 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 236 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
210 | #define OMAP4430_DPLL_PER_RECAL_EN_SHIFT 3 | 237 | #define OMAP4430_DPLL_PER_RECAL_EN_SHIFT 3 |
211 | #define OMAP4430_DPLL_PER_RECAL_EN_MASK BITFIELD(3, 3) | 238 | #define OMAP4430_DPLL_PER_RECAL_EN_MASK (1 << 3) |
212 | 239 | ||
213 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 240 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
214 | #define OMAP4430_DPLL_PER_RECAL_ST_SHIFT 3 | 241 | #define OMAP4430_DPLL_PER_RECAL_ST_SHIFT 3 |
215 | #define OMAP4430_DPLL_PER_RECAL_ST_MASK BITFIELD(3, 3) | 242 | #define OMAP4430_DPLL_PER_RECAL_ST_MASK (1 << 3) |
216 | 243 | ||
217 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 244 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
218 | #define OMAP4430_DPLL_UNIPRO_RECAL_EN_SHIFT 7 | 245 | #define OMAP4430_DPLL_UNIPRO_RECAL_EN_SHIFT 7 |
219 | #define OMAP4430_DPLL_UNIPRO_RECAL_EN_MASK BITFIELD(7, 7) | 246 | #define OMAP4430_DPLL_UNIPRO_RECAL_EN_MASK (1 << 7) |
220 | 247 | ||
221 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 248 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
222 | #define OMAP4430_DPLL_UNIPRO_RECAL_ST_SHIFT 7 | 249 | #define OMAP4430_DPLL_UNIPRO_RECAL_ST_SHIFT 7 |
223 | #define OMAP4430_DPLL_UNIPRO_RECAL_ST_MASK BITFIELD(7, 7) | 250 | #define OMAP4430_DPLL_UNIPRO_RECAL_ST_MASK (1 << 7) |
224 | |||
225 | /* Used by PRM_IRQENABLE_MPU */ | ||
226 | #define OMAP4430_DPLL_USB_RECAL_EN_SHIFT 5 | ||
227 | #define OMAP4430_DPLL_USB_RECAL_EN_MASK BITFIELD(5, 5) | ||
228 | |||
229 | /* Used by PRM_IRQSTATUS_MPU */ | ||
230 | #define OMAP4430_DPLL_USB_RECAL_ST_SHIFT 5 | ||
231 | #define OMAP4430_DPLL_USB_RECAL_ST_MASK BITFIELD(5, 5) | ||
232 | 251 | ||
233 | /* Used by PM_DSS_PWRSTCTRL */ | 252 | /* Used by PM_DSS_PWRSTCTRL */ |
234 | #define OMAP4430_DSS_MEM_ONSTATE_SHIFT 16 | 253 | #define OMAP4430_DSS_MEM_ONSTATE_SHIFT 16 |
235 | #define OMAP4430_DSS_MEM_ONSTATE_MASK BITFIELD(16, 17) | 254 | #define OMAP4430_DSS_MEM_ONSTATE_MASK (0x3 << 16) |
236 | 255 | ||
237 | /* Used by PM_DSS_PWRSTCTRL */ | 256 | /* Used by PM_DSS_PWRSTCTRL */ |
238 | #define OMAP4430_DSS_MEM_RETSTATE_SHIFT 8 | 257 | #define OMAP4430_DSS_MEM_RETSTATE_SHIFT 8 |
239 | #define OMAP4430_DSS_MEM_RETSTATE_MASK BITFIELD(8, 8) | 258 | #define OMAP4430_DSS_MEM_RETSTATE_MASK (1 << 8) |
240 | 259 | ||
241 | /* Used by PM_DSS_PWRSTST */ | 260 | /* Used by PM_DSS_PWRSTST */ |
242 | #define OMAP4430_DSS_MEM_STATEST_SHIFT 4 | 261 | #define OMAP4430_DSS_MEM_STATEST_SHIFT 4 |
243 | #define OMAP4430_DSS_MEM_STATEST_MASK BITFIELD(4, 5) | 262 | #define OMAP4430_DSS_MEM_STATEST_MASK (0x3 << 4) |
244 | 263 | ||
245 | /* Used by PM_CORE_PWRSTCTRL */ | 264 | /* Used by PM_CORE_PWRSTCTRL */ |
246 | #define OMAP4430_DUCATI_L2RAM_ONSTATE_SHIFT 20 | 265 | #define OMAP4430_DUCATI_L2RAM_ONSTATE_SHIFT 20 |
247 | #define OMAP4430_DUCATI_L2RAM_ONSTATE_MASK BITFIELD(20, 21) | 266 | #define OMAP4430_DUCATI_L2RAM_ONSTATE_MASK (0x3 << 20) |
248 | 267 | ||
249 | /* Used by PM_CORE_PWRSTCTRL */ | 268 | /* Used by PM_CORE_PWRSTCTRL */ |
250 | #define OMAP4430_DUCATI_L2RAM_RETSTATE_SHIFT 10 | 269 | #define OMAP4430_DUCATI_L2RAM_RETSTATE_SHIFT 10 |
251 | #define OMAP4430_DUCATI_L2RAM_RETSTATE_MASK BITFIELD(10, 10) | 270 | #define OMAP4430_DUCATI_L2RAM_RETSTATE_MASK (1 << 10) |
252 | 271 | ||
253 | /* Used by PM_CORE_PWRSTST */ | 272 | /* Used by PM_CORE_PWRSTST */ |
254 | #define OMAP4430_DUCATI_L2RAM_STATEST_SHIFT 8 | 273 | #define OMAP4430_DUCATI_L2RAM_STATEST_SHIFT 8 |
255 | #define OMAP4430_DUCATI_L2RAM_STATEST_MASK BITFIELD(8, 9) | 274 | #define OMAP4430_DUCATI_L2RAM_STATEST_MASK (0x3 << 8) |
256 | 275 | ||
257 | /* Used by PM_CORE_PWRSTCTRL */ | 276 | /* Used by PM_CORE_PWRSTCTRL */ |
258 | #define OMAP4430_DUCATI_UNICACHE_ONSTATE_SHIFT 22 | 277 | #define OMAP4430_DUCATI_UNICACHE_ONSTATE_SHIFT 22 |
259 | #define OMAP4430_DUCATI_UNICACHE_ONSTATE_MASK BITFIELD(22, 23) | 278 | #define OMAP4430_DUCATI_UNICACHE_ONSTATE_MASK (0x3 << 22) |
260 | 279 | ||
261 | /* Used by PM_CORE_PWRSTCTRL */ | 280 | /* Used by PM_CORE_PWRSTCTRL */ |
262 | #define OMAP4430_DUCATI_UNICACHE_RETSTATE_SHIFT 11 | 281 | #define OMAP4430_DUCATI_UNICACHE_RETSTATE_SHIFT 11 |
263 | #define OMAP4430_DUCATI_UNICACHE_RETSTATE_MASK BITFIELD(11, 11) | 282 | #define OMAP4430_DUCATI_UNICACHE_RETSTATE_MASK (1 << 11) |
264 | 283 | ||
265 | /* Used by PM_CORE_PWRSTST */ | 284 | /* Used by PM_CORE_PWRSTST */ |
266 | #define OMAP4430_DUCATI_UNICACHE_STATEST_SHIFT 10 | 285 | #define OMAP4430_DUCATI_UNICACHE_STATEST_SHIFT 10 |
267 | #define OMAP4430_DUCATI_UNICACHE_STATEST_MASK BITFIELD(10, 11) | 286 | #define OMAP4430_DUCATI_UNICACHE_STATEST_MASK (0x3 << 10) |
268 | 287 | ||
269 | /* Used by RM_MPU_RSTST */ | 288 | /* Used by RM_MPU_RSTST */ |
270 | #define OMAP4430_EMULATION_RST_SHIFT 0 | 289 | #define OMAP4430_EMULATION_RST_SHIFT 0 |
271 | #define OMAP4430_EMULATION_RST_MASK BITFIELD(0, 0) | 290 | #define OMAP4430_EMULATION_RST_MASK (1 << 0) |
272 | 291 | ||
273 | /* Used by RM_DUCATI_RSTST */ | 292 | /* Used by RM_DUCATI_RSTST */ |
274 | #define OMAP4430_EMULATION_RST1ST_SHIFT 3 | 293 | #define OMAP4430_EMULATION_RST1ST_SHIFT 3 |
275 | #define OMAP4430_EMULATION_RST1ST_MASK BITFIELD(3, 3) | 294 | #define OMAP4430_EMULATION_RST1ST_MASK (1 << 3) |
276 | 295 | ||
277 | /* Used by RM_DUCATI_RSTST */ | 296 | /* Used by RM_DUCATI_RSTST */ |
278 | #define OMAP4430_EMULATION_RST2ST_SHIFT 4 | 297 | #define OMAP4430_EMULATION_RST2ST_SHIFT 4 |
279 | #define OMAP4430_EMULATION_RST2ST_MASK BITFIELD(4, 4) | 298 | #define OMAP4430_EMULATION_RST2ST_MASK (1 << 4) |
280 | 299 | ||
281 | /* Used by RM_IVAHD_RSTST */ | 300 | /* Used by RM_IVAHD_RSTST */ |
282 | #define OMAP4430_EMULATION_SEQ1_RST1ST_SHIFT 3 | 301 | #define OMAP4430_EMULATION_SEQ1_RST1ST_SHIFT 3 |
283 | #define OMAP4430_EMULATION_SEQ1_RST1ST_MASK BITFIELD(3, 3) | 302 | #define OMAP4430_EMULATION_SEQ1_RST1ST_MASK (1 << 3) |
284 | 303 | ||
285 | /* Used by RM_IVAHD_RSTST */ | 304 | /* Used by RM_IVAHD_RSTST */ |
286 | #define OMAP4430_EMULATION_SEQ2_RST2ST_SHIFT 4 | 305 | #define OMAP4430_EMULATION_SEQ2_RST2ST_SHIFT 4 |
287 | #define OMAP4430_EMULATION_SEQ2_RST2ST_MASK BITFIELD(4, 4) | 306 | #define OMAP4430_EMULATION_SEQ2_RST2ST_MASK (1 << 4) |
288 | 307 | ||
289 | /* Used by PM_EMU_PWRSTCTRL */ | 308 | /* Used by PM_EMU_PWRSTCTRL */ |
290 | #define OMAP4430_EMU_BANK_ONSTATE_SHIFT 16 | 309 | #define OMAP4430_EMU_BANK_ONSTATE_SHIFT 16 |
291 | #define OMAP4430_EMU_BANK_ONSTATE_MASK BITFIELD(16, 17) | 310 | #define OMAP4430_EMU_BANK_ONSTATE_MASK (0x3 << 16) |
292 | 311 | ||
293 | /* Used by PM_EMU_PWRSTST */ | 312 | /* Used by PM_EMU_PWRSTST */ |
294 | #define OMAP4430_EMU_BANK_STATEST_SHIFT 4 | 313 | #define OMAP4430_EMU_BANK_STATEST_SHIFT 4 |
295 | #define OMAP4430_EMU_BANK_STATEST_MASK BITFIELD(4, 5) | 314 | #define OMAP4430_EMU_BANK_STATEST_MASK (0x3 << 4) |
296 | |||
297 | /* | ||
298 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, | ||
299 | * PRM_LDO_SRAM_MPU_SETUP, PRM_SRAM_WKUP_SETUP | ||
300 | */ | ||
301 | #define OMAP4430_ENABLE_RTA_EXPORT_SHIFT 0 | ||
302 | #define OMAP4430_ENABLE_RTA_EXPORT_MASK BITFIELD(0, 0) | ||
303 | 315 | ||
304 | /* | 316 | /* |
305 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, | 317 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, |
306 | * PRM_LDO_SRAM_MPU_SETUP | 318 | * PRM_LDO_SRAM_MPU_SETUP |
307 | */ | 319 | */ |
308 | #define OMAP4430_ENFUNC1_SHIFT 3 | 320 | #define OMAP4430_ENFUNC1_EXPORT_SHIFT 3 |
309 | #define OMAP4430_ENFUNC1_MASK BITFIELD(3, 3) | 321 | #define OMAP4430_ENFUNC1_EXPORT_MASK (1 << 3) |
310 | 322 | ||
311 | /* | 323 | /* |
312 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, | 324 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, |
313 | * PRM_LDO_SRAM_MPU_SETUP | 325 | * PRM_LDO_SRAM_MPU_SETUP |
314 | */ | 326 | */ |
315 | #define OMAP4430_ENFUNC3_SHIFT 5 | 327 | #define OMAP4430_ENFUNC3_EXPORT_SHIFT 5 |
316 | #define OMAP4430_ENFUNC3_MASK BITFIELD(5, 5) | 328 | #define OMAP4430_ENFUNC3_EXPORT_MASK (1 << 5) |
317 | 329 | ||
318 | /* | 330 | /* |
319 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, | 331 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, |
320 | * PRM_LDO_SRAM_MPU_SETUP | 332 | * PRM_LDO_SRAM_MPU_SETUP |
321 | */ | 333 | */ |
322 | #define OMAP4430_ENFUNC4_SHIFT 6 | 334 | #define OMAP4430_ENFUNC4_SHIFT 6 |
323 | #define OMAP4430_ENFUNC4_MASK BITFIELD(6, 6) | 335 | #define OMAP4430_ENFUNC4_MASK (1 << 6) |
324 | 336 | ||
325 | /* | 337 | /* |
326 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, | 338 | * Used by PRM_LDO_SRAM_CORE_SETUP, PRM_LDO_SRAM_IVA_SETUP, |
327 | * PRM_LDO_SRAM_MPU_SETUP | 339 | * PRM_LDO_SRAM_MPU_SETUP |
328 | */ | 340 | */ |
329 | #define OMAP4430_ENFUNC5_SHIFT 7 | 341 | #define OMAP4430_ENFUNC5_SHIFT 7 |
330 | #define OMAP4430_ENFUNC5_MASK BITFIELD(7, 7) | 342 | #define OMAP4430_ENFUNC5_MASK (1 << 7) |
331 | 343 | ||
332 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ | 344 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ |
333 | #define OMAP4430_ERRORGAIN_SHIFT 16 | 345 | #define OMAP4430_ERRORGAIN_SHIFT 16 |
334 | #define OMAP4430_ERRORGAIN_MASK BITFIELD(16, 23) | 346 | #define OMAP4430_ERRORGAIN_MASK (0xff << 16) |
335 | 347 | ||
336 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ | 348 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ |
337 | #define OMAP4430_ERROROFFSET_SHIFT 24 | 349 | #define OMAP4430_ERROROFFSET_SHIFT 24 |
338 | #define OMAP4430_ERROROFFSET_MASK BITFIELD(24, 31) | 350 | #define OMAP4430_ERROROFFSET_MASK (0xff << 24) |
339 | 351 | ||
340 | /* Used by PRM_RSTST */ | 352 | /* Used by PRM_RSTST */ |
341 | #define OMAP4430_EXTERNAL_WARM_RST_SHIFT 5 | 353 | #define OMAP4430_EXTERNAL_WARM_RST_SHIFT 5 |
342 | #define OMAP4430_EXTERNAL_WARM_RST_MASK BITFIELD(5, 5) | 354 | #define OMAP4430_EXTERNAL_WARM_RST_MASK (1 << 5) |
343 | 355 | ||
344 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ | 356 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ |
345 | #define OMAP4430_FORCEUPDATE_SHIFT 1 | 357 | #define OMAP4430_FORCEUPDATE_SHIFT 1 |
346 | #define OMAP4430_FORCEUPDATE_MASK BITFIELD(1, 1) | 358 | #define OMAP4430_FORCEUPDATE_MASK (1 << 1) |
347 | 359 | ||
348 | /* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_IVA_VOLTAGE, PRM_VP_MPU_VOLTAGE */ | 360 | /* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_IVA_VOLTAGE, PRM_VP_MPU_VOLTAGE */ |
349 | #define OMAP4430_FORCEUPDATEWAIT_SHIFT 8 | 361 | #define OMAP4430_FORCEUPDATEWAIT_SHIFT 8 |
350 | #define OMAP4430_FORCEUPDATEWAIT_MASK BITFIELD(8, 31) | 362 | #define OMAP4430_FORCEUPDATEWAIT_MASK (0xffffff << 8) |
351 | 363 | ||
352 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_TESLA */ | 364 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_TESLA */ |
353 | #define OMAP4430_FORCEWKUP_EN_SHIFT 10 | 365 | #define OMAP4430_FORCEWKUP_EN_SHIFT 10 |
354 | #define OMAP4430_FORCEWKUP_EN_MASK BITFIELD(10, 10) | 366 | #define OMAP4430_FORCEWKUP_EN_MASK (1 << 10) |
355 | 367 | ||
356 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_TESLA */ | 368 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_TESLA */ |
357 | #define OMAP4430_FORCEWKUP_ST_SHIFT 10 | 369 | #define OMAP4430_FORCEWKUP_ST_SHIFT 10 |
358 | #define OMAP4430_FORCEWKUP_ST_MASK BITFIELD(10, 10) | 370 | #define OMAP4430_FORCEWKUP_ST_MASK (1 << 10) |
371 | |||
372 | /* Used by REVISION_PRM */ | ||
373 | #define OMAP4430_FUNC_SHIFT 16 | ||
374 | #define OMAP4430_FUNC_MASK (0xfff << 16) | ||
359 | 375 | ||
360 | /* Used by PM_GFX_PWRSTCTRL */ | 376 | /* Used by PM_GFX_PWRSTCTRL */ |
361 | #define OMAP4430_GFX_MEM_ONSTATE_SHIFT 16 | 377 | #define OMAP4430_GFX_MEM_ONSTATE_SHIFT 16 |
362 | #define OMAP4430_GFX_MEM_ONSTATE_MASK BITFIELD(16, 17) | 378 | #define OMAP4430_GFX_MEM_ONSTATE_MASK (0x3 << 16) |
363 | 379 | ||
364 | /* Used by PM_GFX_PWRSTST */ | 380 | /* Used by PM_GFX_PWRSTST */ |
365 | #define OMAP4430_GFX_MEM_STATEST_SHIFT 4 | 381 | #define OMAP4430_GFX_MEM_STATEST_SHIFT 4 |
366 | #define OMAP4430_GFX_MEM_STATEST_MASK BITFIELD(4, 5) | 382 | #define OMAP4430_GFX_MEM_STATEST_MASK (0x3 << 4) |
367 | 383 | ||
368 | /* Used by PRM_RSTST */ | 384 | /* Used by PRM_RSTST */ |
369 | #define OMAP4430_GLOBAL_COLD_RST_SHIFT 0 | 385 | #define OMAP4430_GLOBAL_COLD_RST_SHIFT 0 |
370 | #define OMAP4430_GLOBAL_COLD_RST_MASK BITFIELD(0, 0) | 386 | #define OMAP4430_GLOBAL_COLD_RST_MASK (1 << 0) |
371 | 387 | ||
372 | /* Used by PRM_RSTST */ | 388 | /* Used by PRM_RSTST */ |
373 | #define OMAP4430_GLOBAL_WARM_SW_RST_SHIFT 1 | 389 | #define OMAP4430_GLOBAL_WARM_SW_RST_SHIFT 1 |
374 | #define OMAP4430_GLOBAL_WARM_SW_RST_MASK BITFIELD(1, 1) | 390 | #define OMAP4430_GLOBAL_WARM_SW_RST_MASK (1 << 1) |
375 | 391 | ||
376 | /* Used by PRM_IO_PMCTRL */ | 392 | /* Used by PRM_IO_PMCTRL */ |
377 | #define OMAP4430_GLOBAL_WUEN_SHIFT 16 | 393 | #define OMAP4430_GLOBAL_WUEN_SHIFT 16 |
378 | #define OMAP4430_GLOBAL_WUEN_MASK BITFIELD(16, 16) | 394 | #define OMAP4430_GLOBAL_WUEN_MASK (1 << 16) |
379 | 395 | ||
380 | /* Used by PRM_VC_CFG_I2C_MODE */ | 396 | /* Used by PRM_VC_CFG_I2C_MODE */ |
381 | #define OMAP4430_HSMCODE_SHIFT 0 | 397 | #define OMAP4430_HSMCODE_SHIFT 0 |
382 | #define OMAP4430_HSMCODE_MASK BITFIELD(0, 2) | 398 | #define OMAP4430_HSMCODE_MASK (0x7 << 0) |
383 | 399 | ||
384 | /* Used by PRM_VC_CFG_I2C_MODE */ | 400 | /* Used by PRM_VC_CFG_I2C_MODE */ |
385 | #define OMAP4430_HSMODEEN_SHIFT 3 | 401 | #define OMAP4430_HSMODEEN_SHIFT 3 |
386 | #define OMAP4430_HSMODEEN_MASK BITFIELD(3, 3) | 402 | #define OMAP4430_HSMODEEN_MASK (1 << 3) |
387 | 403 | ||
388 | /* Used by PRM_VC_CFG_I2C_CLK */ | 404 | /* Used by PRM_VC_CFG_I2C_CLK */ |
389 | #define OMAP4430_HSSCLH_SHIFT 16 | 405 | #define OMAP4430_HSSCLH_SHIFT 16 |
390 | #define OMAP4430_HSSCLH_MASK BITFIELD(16, 23) | 406 | #define OMAP4430_HSSCLH_MASK (0xff << 16) |
391 | 407 | ||
392 | /* Used by PRM_VC_CFG_I2C_CLK */ | 408 | /* Used by PRM_VC_CFG_I2C_CLK */ |
393 | #define OMAP4430_HSSCLL_SHIFT 24 | 409 | #define OMAP4430_HSSCLL_SHIFT 24 |
394 | #define OMAP4430_HSSCLL_MASK BITFIELD(24, 31) | 410 | #define OMAP4430_HSSCLL_MASK (0xff << 24) |
395 | 411 | ||
396 | /* Used by PM_IVAHD_PWRSTCTRL */ | 412 | /* Used by PM_IVAHD_PWRSTCTRL */ |
397 | #define OMAP4430_HWA_MEM_ONSTATE_SHIFT 16 | 413 | #define OMAP4430_HWA_MEM_ONSTATE_SHIFT 16 |
398 | #define OMAP4430_HWA_MEM_ONSTATE_MASK BITFIELD(16, 17) | 414 | #define OMAP4430_HWA_MEM_ONSTATE_MASK (0x3 << 16) |
399 | 415 | ||
400 | /* Used by PM_IVAHD_PWRSTCTRL */ | 416 | /* Used by PM_IVAHD_PWRSTCTRL */ |
401 | #define OMAP4430_HWA_MEM_RETSTATE_SHIFT 8 | 417 | #define OMAP4430_HWA_MEM_RETSTATE_SHIFT 8 |
402 | #define OMAP4430_HWA_MEM_RETSTATE_MASK BITFIELD(8, 8) | 418 | #define OMAP4430_HWA_MEM_RETSTATE_MASK (1 << 8) |
403 | 419 | ||
404 | /* Used by PM_IVAHD_PWRSTST */ | 420 | /* Used by PM_IVAHD_PWRSTST */ |
405 | #define OMAP4430_HWA_MEM_STATEST_SHIFT 4 | 421 | #define OMAP4430_HWA_MEM_STATEST_SHIFT 4 |
406 | #define OMAP4430_HWA_MEM_STATEST_MASK BITFIELD(4, 5) | 422 | #define OMAP4430_HWA_MEM_STATEST_MASK (0x3 << 4) |
407 | 423 | ||
408 | /* Used by RM_MPU_RSTST */ | 424 | /* Used by RM_MPU_RSTST */ |
409 | #define OMAP4430_ICECRUSHER_MPU_RST_SHIFT 1 | 425 | #define OMAP4430_ICECRUSHER_MPU_RST_SHIFT 1 |
410 | #define OMAP4430_ICECRUSHER_MPU_RST_MASK BITFIELD(1, 1) | 426 | #define OMAP4430_ICECRUSHER_MPU_RST_MASK (1 << 1) |
411 | 427 | ||
412 | /* Used by RM_DUCATI_RSTST */ | 428 | /* Used by RM_DUCATI_RSTST */ |
413 | #define OMAP4430_ICECRUSHER_RST1ST_SHIFT 5 | 429 | #define OMAP4430_ICECRUSHER_RST1ST_SHIFT 5 |
414 | #define OMAP4430_ICECRUSHER_RST1ST_MASK BITFIELD(5, 5) | 430 | #define OMAP4430_ICECRUSHER_RST1ST_MASK (1 << 5) |
415 | 431 | ||
416 | /* Used by RM_DUCATI_RSTST */ | 432 | /* Used by RM_DUCATI_RSTST */ |
417 | #define OMAP4430_ICECRUSHER_RST2ST_SHIFT 6 | 433 | #define OMAP4430_ICECRUSHER_RST2ST_SHIFT 6 |
418 | #define OMAP4430_ICECRUSHER_RST2ST_MASK BITFIELD(6, 6) | 434 | #define OMAP4430_ICECRUSHER_RST2ST_MASK (1 << 6) |
419 | 435 | ||
420 | /* Used by RM_IVAHD_RSTST */ | 436 | /* Used by RM_IVAHD_RSTST */ |
421 | #define OMAP4430_ICECRUSHER_SEQ1_RST1ST_SHIFT 5 | 437 | #define OMAP4430_ICECRUSHER_SEQ1_RST1ST_SHIFT 5 |
422 | #define OMAP4430_ICECRUSHER_SEQ1_RST1ST_MASK BITFIELD(5, 5) | 438 | #define OMAP4430_ICECRUSHER_SEQ1_RST1ST_MASK (1 << 5) |
423 | 439 | ||
424 | /* Used by RM_IVAHD_RSTST */ | 440 | /* Used by RM_IVAHD_RSTST */ |
425 | #define OMAP4430_ICECRUSHER_SEQ2_RST2ST_SHIFT 6 | 441 | #define OMAP4430_ICECRUSHER_SEQ2_RST2ST_SHIFT 6 |
426 | #define OMAP4430_ICECRUSHER_SEQ2_RST2ST_MASK BITFIELD(6, 6) | 442 | #define OMAP4430_ICECRUSHER_SEQ2_RST2ST_MASK (1 << 6) |
427 | 443 | ||
428 | /* Used by PRM_RSTST */ | 444 | /* Used by PRM_RSTST */ |
429 | #define OMAP4430_ICEPICK_RST_SHIFT 9 | 445 | #define OMAP4430_ICEPICK_RST_SHIFT 9 |
430 | #define OMAP4430_ICEPICK_RST_MASK BITFIELD(9, 9) | 446 | #define OMAP4430_ICEPICK_RST_MASK (1 << 9) |
431 | 447 | ||
432 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ | 448 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ |
433 | #define OMAP4430_INITVDD_SHIFT 2 | 449 | #define OMAP4430_INITVDD_SHIFT 2 |
434 | #define OMAP4430_INITVDD_MASK BITFIELD(2, 2) | 450 | #define OMAP4430_INITVDD_MASK (1 << 2) |
435 | 451 | ||
436 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ | 452 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ |
437 | #define OMAP4430_INITVOLTAGE_SHIFT 8 | 453 | #define OMAP4430_INITVOLTAGE_SHIFT 8 |
438 | #define OMAP4430_INITVOLTAGE_MASK BITFIELD(8, 15) | 454 | #define OMAP4430_INITVOLTAGE_MASK (0xff << 8) |
439 | 455 | ||
440 | /* | 456 | /* |
441 | * Used by PM_EMU_PWRSTST, PM_CORE_PWRSTST, PM_CAM_PWRSTST, PM_L3INIT_PWRSTST, | 457 | * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CEFUSE_PWRSTST, PM_CORE_PWRSTST, |
442 | * PM_ABE_PWRSTST, PM_GFX_PWRSTST, PM_MPU_PWRSTST, PM_CEFUSE_PWRSTST, | 458 | * PM_DSS_PWRSTST, PM_EMU_PWRSTST, PM_GFX_PWRSTST, PM_IVAHD_PWRSTST, |
443 | * PM_DSS_PWRSTST, PM_L4PER_PWRSTST, PM_TESLA_PWRSTST, PM_IVAHD_PWRSTST | 459 | * PM_L3INIT_PWRSTST, PM_L4PER_PWRSTST, PM_MPU_PWRSTST, PM_TESLA_PWRSTST |
444 | */ | 460 | */ |
445 | #define OMAP4430_INTRANSITION_SHIFT 20 | 461 | #define OMAP4430_INTRANSITION_SHIFT 20 |
446 | #define OMAP4430_INTRANSITION_MASK BITFIELD(20, 20) | 462 | #define OMAP4430_INTRANSITION_MASK (1 << 20) |
447 | 463 | ||
448 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 464 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
449 | #define OMAP4430_IO_EN_SHIFT 9 | 465 | #define OMAP4430_IO_EN_SHIFT 9 |
450 | #define OMAP4430_IO_EN_MASK BITFIELD(9, 9) | 466 | #define OMAP4430_IO_EN_MASK (1 << 9) |
451 | 467 | ||
452 | /* Used by PRM_IO_PMCTRL */ | 468 | /* Used by PRM_IO_PMCTRL */ |
453 | #define OMAP4430_IO_ON_STATUS_SHIFT 5 | 469 | #define OMAP4430_IO_ON_STATUS_SHIFT 5 |
454 | #define OMAP4430_IO_ON_STATUS_MASK BITFIELD(5, 5) | 470 | #define OMAP4430_IO_ON_STATUS_MASK (1 << 5) |
455 | 471 | ||
456 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 472 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
457 | #define OMAP4430_IO_ST_SHIFT 9 | 473 | #define OMAP4430_IO_ST_SHIFT 9 |
458 | #define OMAP4430_IO_ST_MASK BITFIELD(9, 9) | 474 | #define OMAP4430_IO_ST_MASK (1 << 9) |
459 | 475 | ||
460 | /* Used by PRM_IO_PMCTRL */ | 476 | /* Used by PRM_IO_PMCTRL */ |
461 | #define OMAP4430_ISOCLK_OVERRIDE_SHIFT 0 | 477 | #define OMAP4430_ISOCLK_OVERRIDE_SHIFT 0 |
462 | #define OMAP4430_ISOCLK_OVERRIDE_MASK BITFIELD(0, 0) | 478 | #define OMAP4430_ISOCLK_OVERRIDE_MASK (1 << 0) |
463 | 479 | ||
464 | /* Used by PRM_IO_PMCTRL */ | 480 | /* Used by PRM_IO_PMCTRL */ |
465 | #define OMAP4430_ISOCLK_STATUS_SHIFT 1 | 481 | #define OMAP4430_ISOCLK_STATUS_SHIFT 1 |
466 | #define OMAP4430_ISOCLK_STATUS_MASK BITFIELD(1, 1) | 482 | #define OMAP4430_ISOCLK_STATUS_MASK (1 << 1) |
467 | 483 | ||
468 | /* Used by PRM_IO_PMCTRL */ | 484 | /* Used by PRM_IO_PMCTRL */ |
469 | #define OMAP4430_ISOOVR_EXTEND_SHIFT 4 | 485 | #define OMAP4430_ISOOVR_EXTEND_SHIFT 4 |
470 | #define OMAP4430_ISOOVR_EXTEND_MASK BITFIELD(4, 4) | 486 | #define OMAP4430_ISOOVR_EXTEND_MASK (1 << 4) |
471 | 487 | ||
472 | /* Used by PRM_IO_COUNT */ | 488 | /* Used by PRM_IO_COUNT */ |
473 | #define OMAP4430_ISO_2_ON_TIME_SHIFT 0 | 489 | #define OMAP4430_ISO_2_ON_TIME_SHIFT 0 |
474 | #define OMAP4430_ISO_2_ON_TIME_MASK BITFIELD(0, 7) | 490 | #define OMAP4430_ISO_2_ON_TIME_MASK (0xff << 0) |
475 | 491 | ||
476 | /* Used by PM_L3INIT_PWRSTCTRL */ | 492 | /* Used by PM_L3INIT_PWRSTCTRL */ |
477 | #define OMAP4430_L3INIT_BANK1_ONSTATE_SHIFT 16 | 493 | #define OMAP4430_L3INIT_BANK1_ONSTATE_SHIFT 16 |
478 | #define OMAP4430_L3INIT_BANK1_ONSTATE_MASK BITFIELD(16, 17) | 494 | #define OMAP4430_L3INIT_BANK1_ONSTATE_MASK (0x3 << 16) |
479 | 495 | ||
480 | /* Used by PM_L3INIT_PWRSTCTRL */ | 496 | /* Used by PM_L3INIT_PWRSTCTRL */ |
481 | #define OMAP4430_L3INIT_BANK1_RETSTATE_SHIFT 8 | 497 | #define OMAP4430_L3INIT_BANK1_RETSTATE_SHIFT 8 |
482 | #define OMAP4430_L3INIT_BANK1_RETSTATE_MASK BITFIELD(8, 8) | 498 | #define OMAP4430_L3INIT_BANK1_RETSTATE_MASK (1 << 8) |
483 | 499 | ||
484 | /* Used by PM_L3INIT_PWRSTST */ | 500 | /* Used by PM_L3INIT_PWRSTST */ |
485 | #define OMAP4430_L3INIT_BANK1_STATEST_SHIFT 4 | 501 | #define OMAP4430_L3INIT_BANK1_STATEST_SHIFT 4 |
486 | #define OMAP4430_L3INIT_BANK1_STATEST_MASK BITFIELD(4, 5) | 502 | #define OMAP4430_L3INIT_BANK1_STATEST_MASK (0x3 << 4) |
503 | |||
504 | /* | ||
505 | * Used by PM_ABE_PWRSTST, PM_CORE_PWRSTST, PM_IVAHD_PWRSTST, | ||
506 | * PM_L3INIT_PWRSTST, PM_L4PER_PWRSTST, PM_MPU_PWRSTST, PM_TESLA_PWRSTST | ||
507 | */ | ||
508 | #define OMAP4430_LASTPOWERSTATEENTERED_SHIFT 24 | ||
509 | #define OMAP4430_LASTPOWERSTATEENTERED_MASK (0x3 << 24) | ||
487 | 510 | ||
488 | /* | 511 | /* |
489 | * Used by PM_CORE_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, PM_ABE_PWRSTCTRL, | 512 | * Used by PM_ABE_PWRSTCTRL, PM_CORE_PWRSTCTRL, PM_DSS_PWRSTCTRL, |
490 | * PM_MPU_PWRSTCTRL, PM_DSS_PWRSTCTRL, PM_L4PER_PWRSTCTRL, PM_TESLA_PWRSTCTRL, | 513 | * PM_IVAHD_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, PM_L4PER_PWRSTCTRL, |
491 | * PM_IVAHD_PWRSTCTRL | 514 | * PM_MPU_PWRSTCTRL, PM_TESLA_PWRSTCTRL |
492 | */ | 515 | */ |
493 | #define OMAP4430_LOGICRETSTATE_SHIFT 2 | 516 | #define OMAP4430_LOGICRETSTATE_SHIFT 2 |
494 | #define OMAP4430_LOGICRETSTATE_MASK BITFIELD(2, 2) | 517 | #define OMAP4430_LOGICRETSTATE_MASK (1 << 2) |
495 | 518 | ||
496 | /* | 519 | /* |
497 | * Used by PM_EMU_PWRSTST, PM_CORE_PWRSTST, PM_CAM_PWRSTST, PM_L3INIT_PWRSTST, | 520 | * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CEFUSE_PWRSTST, PM_CORE_PWRSTST, |
498 | * PM_ABE_PWRSTST, PM_GFX_PWRSTST, PM_MPU_PWRSTST, PM_CEFUSE_PWRSTST, | 521 | * PM_DSS_PWRSTST, PM_EMU_PWRSTST, PM_GFX_PWRSTST, PM_IVAHD_PWRSTST, |
499 | * PM_DSS_PWRSTST, PM_L4PER_PWRSTST, PM_TESLA_PWRSTST, PM_IVAHD_PWRSTST | 522 | * PM_L3INIT_PWRSTST, PM_L4PER_PWRSTST, PM_MPU_PWRSTST, PM_TESLA_PWRSTST |
500 | */ | 523 | */ |
501 | #define OMAP4430_LOGICSTATEST_SHIFT 2 | 524 | #define OMAP4430_LOGICSTATEST_SHIFT 2 |
502 | #define OMAP4430_LOGICSTATEST_MASK BITFIELD(2, 2) | 525 | #define OMAP4430_LOGICSTATEST_MASK (1 << 2) |
503 | 526 | ||
504 | /* | 527 | /* |
505 | * Used by RM_WKUP_GPIO1_CONTEXT, RM_WKUP_KEYBOARD_CONTEXT, | 528 | * Used by RM_ABE_AESS_CONTEXT, RM_ABE_DMIC_CONTEXT, RM_ABE_MCASP_CONTEXT, |
506 | * RM_WKUP_L4WKUP_CONTEXT, RM_WKUP_RTC_CONTEXT, RM_WKUP_SARRAM_CONTEXT, | ||
507 | * RM_WKUP_SYNCTIMER_CONTEXT, RM_WKUP_TIMER12_CONTEXT, RM_WKUP_TIMER1_CONTEXT, | ||
508 | * RM_WKUP_USIM_CONTEXT, RM_WKUP_WDT1_CONTEXT, RM_WKUP_WDT2_CONTEXT, | ||
509 | * RM_EMU_DEBUGSS_CONTEXT, RM_D2D_SAD2D_CONTEXT, RM_D2D_SAD2D_FW_CONTEXT, | ||
510 | * RM_DUCATI_DUCATI_CONTEXT, RM_L3INSTR_L3_3_CONTEXT, | ||
511 | * RM_L3INSTR_L3_INSTR_CONTEXT, RM_L3INSTR_OCP_WP1_CONTEXT, | ||
512 | * RM_L3_1_L3_1_CONTEXT, RM_L3_2_L3_2_CONTEXT, RM_L3_2_OCMC_RAM_CONTEXT, | ||
513 | * RM_L4CFG_L4_CFG_CONTEXT, RM_L4CFG_SAR_ROM_CONTEXT, RM_MEMIF_DLL_CONTEXT, | ||
514 | * RM_MEMIF_DLL_H_CONTEXT, RM_MEMIF_DMM_CONTEXT, RM_MEMIF_EMIF_FW_CONTEXT, | ||
515 | * RM_CAM_FDIF_CONTEXT, RM_CAM_ISS_CONTEXT, RM_L3INIT_CCPTX_CONTEXT, | ||
516 | * RM_L3INIT_EMAC_CONTEXT, RM_L3INIT_P1500_CONTEXT, RM_L3INIT_PCIESS_CONTEXT, | ||
517 | * RM_L3INIT_SATA_CONTEXT, RM_L3INIT_TPPSS_CONTEXT, RM_L3INIT_UNIPRO1_CONTEXT, | ||
518 | * RM_L3INIT_USBPHYOCP2SCP_CONTEXT, RM_L3INIT_XHPI_CONTEXT, | ||
519 | * RM_ABE_AESS_CONTEXT, RM_ABE_DMIC_CONTEXT, RM_ABE_MCASP_CONTEXT, | ||
520 | * RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT, RM_ABE_MCBSP3_CONTEXT, | 529 | * RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT, RM_ABE_MCBSP3_CONTEXT, |
521 | * RM_ABE_PDM_CONTEXT, RM_ABE_SLIMBUS_CONTEXT, RM_ABE_TIMER5_CONTEXT, | 530 | * RM_ABE_PDM_CONTEXT, RM_ABE_SLIMBUS_CONTEXT, RM_ABE_TIMER5_CONTEXT, |
522 | * RM_ABE_TIMER6_CONTEXT, RM_ABE_TIMER7_CONTEXT, RM_ABE_TIMER8_CONTEXT, | 531 | * RM_ABE_TIMER6_CONTEXT, RM_ABE_TIMER7_CONTEXT, RM_ABE_TIMER8_CONTEXT, |
523 | * RM_ABE_WDT3_CONTEXT, RM_GFX_GFX_CONTEXT, RM_MPU_MPU_CONTEXT, | 532 | * RM_ABE_WDT3_CONTEXT, RM_ALWON_MDMINTC_CONTEXT, RM_ALWON_SR_CORE_CONTEXT, |
524 | * RM_CEFUSE_CEFUSE_CONTEXT, RM_ALWON_MDMINTC_CONTEXT, | 533 | * RM_ALWON_SR_IVA_CONTEXT, RM_ALWON_SR_MPU_CONTEXT, RM_CAM_FDIF_CONTEXT, |
525 | * RM_ALWON_SR_CORE_CONTEXT, RM_ALWON_SR_IVA_CONTEXT, RM_ALWON_SR_MPU_CONTEXT, | 534 | * RM_CAM_ISS_CONTEXT, RM_CEFUSE_CEFUSE_CONTEXT, RM_D2D_SAD2D_CONTEXT, |
526 | * RM_DSS_DEISS_CONTEXT, RM_DSS_DSS_CONTEXT, RM_L4PER_ADC_CONTEXT, | 535 | * RM_D2D_SAD2D_FW_CONTEXT, RM_DSS_DEISS_CONTEXT, RM_DSS_DSS_CONTEXT, |
527 | * RM_L4PER_DMTIMER10_CONTEXT, RM_L4PER_DMTIMER11_CONTEXT, | 536 | * RM_DUCATI_DUCATI_CONTEXT, RM_EMU_DEBUGSS_CONTEXT, RM_GFX_GFX_CONTEXT, |
528 | * RM_L4PER_DMTIMER2_CONTEXT, RM_L4PER_DMTIMER3_CONTEXT, | 537 | * RM_IVAHD_IVAHD_CONTEXT, RM_IVAHD_SL2_CONTEXT, RM_L3INIT_CCPTX_CONTEXT, |
529 | * RM_L4PER_DMTIMER4_CONTEXT, RM_L4PER_DMTIMER9_CONTEXT, RM_L4PER_ELM_CONTEXT, | 538 | * RM_L3INIT_EMAC_CONTEXT, RM_L3INIT_P1500_CONTEXT, RM_L3INIT_PCIESS_CONTEXT, |
530 | * RM_L4PER_HDQ1W_CONTEXT, RM_L4PER_HECC1_CONTEXT, RM_L4PER_HECC2_CONTEXT, | 539 | * RM_L3INIT_SATA_CONTEXT, RM_L3INIT_TPPSS_CONTEXT, RM_L3INIT_UNIPRO1_CONTEXT, |
531 | * RM_L4PER_I2C2_CONTEXT, RM_L4PER_I2C3_CONTEXT, RM_L4PER_I2C4_CONTEXT, | 540 | * RM_L3INIT_USBPHYOCP2SCP_CONTEXT, RM_L3INIT_XHPI_CONTEXT, |
532 | * RM_L4PER_I2C5_CONTEXT, RM_L4PER_L4_PER_CONTEXT, RM_L4PER_MCASP2_CONTEXT, | 541 | * RM_L3INSTR_L3_3_CONTEXT, RM_L3INSTR_L3_INSTR_CONTEXT, |
533 | * RM_L4PER_MCASP3_CONTEXT, RM_L4PER_MCBSP4_CONTEXT, RM_L4PER_MCSPI1_CONTEXT, | 542 | * RM_L3INSTR_OCP_WP1_CONTEXT, RM_L3_1_L3_1_CONTEXT, RM_L3_2_L3_2_CONTEXT, |
534 | * RM_L4PER_MCSPI2_CONTEXT, RM_L4PER_MCSPI3_CONTEXT, RM_L4PER_MCSPI4_CONTEXT, | 543 | * RM_L3_2_OCMC_RAM_CONTEXT, RM_L4CFG_L4_CFG_CONTEXT, RM_L4CFG_SAR_ROM_CONTEXT, |
535 | * RM_L4PER_MGATE_CONTEXT, RM_L4PER_MMCSD3_CONTEXT, RM_L4PER_MMCSD4_CONTEXT, | 544 | * RM_L4PER_ADC_CONTEXT, RM_L4PER_DMTIMER10_CONTEXT, |
536 | * RM_L4PER_MMCSD5_CONTEXT, RM_L4PER_MSPROHG_CONTEXT, | 545 | * RM_L4PER_DMTIMER11_CONTEXT, RM_L4PER_DMTIMER2_CONTEXT, |
537 | * RM_L4PER_SLIMBUS2_CONTEXT, RM_L4SEC_PKAEIP29_CONTEXT, | 546 | * RM_L4PER_DMTIMER3_CONTEXT, RM_L4PER_DMTIMER4_CONTEXT, |
538 | * RM_TESLA_TESLA_CONTEXT, RM_IVAHD_IVAHD_CONTEXT, RM_IVAHD_SL2_CONTEXT | 547 | * RM_L4PER_DMTIMER9_CONTEXT, RM_L4PER_ELM_CONTEXT, RM_L4PER_HDQ1W_CONTEXT, |
548 | * RM_L4PER_HECC1_CONTEXT, RM_L4PER_HECC2_CONTEXT, RM_L4PER_I2C2_CONTEXT, | ||
549 | * RM_L4PER_I2C3_CONTEXT, RM_L4PER_I2C4_CONTEXT, RM_L4PER_I2C5_CONTEXT, | ||
550 | * RM_L4PER_L4_PER_CONTEXT, RM_L4PER_MCASP2_CONTEXT, RM_L4PER_MCASP3_CONTEXT, | ||
551 | * RM_L4PER_MCBSP4_CONTEXT, RM_L4PER_MCSPI1_CONTEXT, RM_L4PER_MCSPI2_CONTEXT, | ||
552 | * RM_L4PER_MCSPI3_CONTEXT, RM_L4PER_MCSPI4_CONTEXT, RM_L4PER_MGATE_CONTEXT, | ||
553 | * RM_L4PER_MMCSD3_CONTEXT, RM_L4PER_MMCSD4_CONTEXT, RM_L4PER_MMCSD5_CONTEXT, | ||
554 | * RM_L4PER_MSPROHG_CONTEXT, RM_L4PER_SLIMBUS2_CONTEXT, | ||
555 | * RM_L4SEC_PKAEIP29_CONTEXT, RM_MEMIF_DLL_CONTEXT, RM_MEMIF_DLL_H_CONTEXT, | ||
556 | * RM_MEMIF_DMM_CONTEXT, RM_MEMIF_EMIF_1_CONTEXT, RM_MEMIF_EMIF_2_CONTEXT, | ||
557 | * RM_MEMIF_EMIF_FW_CONTEXT, RM_MPU_MPU_CONTEXT, RM_TESLA_TESLA_CONTEXT, | ||
558 | * RM_WKUP_GPIO1_CONTEXT, RM_WKUP_KEYBOARD_CONTEXT, RM_WKUP_L4WKUP_CONTEXT, | ||
559 | * RM_WKUP_RTC_CONTEXT, RM_WKUP_SARRAM_CONTEXT, RM_WKUP_SYNCTIMER_CONTEXT, | ||
560 | * RM_WKUP_TIMER12_CONTEXT, RM_WKUP_TIMER1_CONTEXT, RM_WKUP_USIM_CONTEXT, | ||
561 | * RM_WKUP_WDT1_CONTEXT, RM_WKUP_WDT2_CONTEXT | ||
539 | */ | 562 | */ |
540 | #define OMAP4430_LOSTCONTEXT_DFF_SHIFT 0 | 563 | #define OMAP4430_LOSTCONTEXT_DFF_SHIFT 0 |
541 | #define OMAP4430_LOSTCONTEXT_DFF_MASK BITFIELD(0, 0) | 564 | #define OMAP4430_LOSTCONTEXT_DFF_MASK (1 << 0) |
542 | 565 | ||
543 | /* | 566 | /* |
544 | * Used by RM_D2D_MODEM_ICR_CONTEXT, RM_D2D_SAD2D_CONTEXT, | 567 | * Used by RM_D2D_MODEM_ICR_CONTEXT, RM_D2D_SAD2D_CONTEXT, |
545 | * RM_D2D_SAD2D_FW_CONTEXT, RM_DUCATI_DUCATI_CONTEXT, RM_L3INSTR_L3_3_CONTEXT, | 568 | * RM_D2D_SAD2D_FW_CONTEXT, RM_DSS_DSS_CONTEXT, RM_DUCATI_DUCATI_CONTEXT, |
569 | * RM_L3INIT_HSI_CONTEXT, RM_L3INIT_MMC1_CONTEXT, RM_L3INIT_MMC2_CONTEXT, | ||
570 | * RM_L3INIT_MMC6_CONTEXT, RM_L3INIT_USB_HOST_CONTEXT, | ||
571 | * RM_L3INIT_USB_HOST_FS_CONTEXT, RM_L3INIT_USB_OTG_CONTEXT, | ||
572 | * RM_L3INIT_USB_TLL_CONTEXT, RM_L3INSTR_L3_3_CONTEXT, | ||
546 | * RM_L3INSTR_OCP_WP1_CONTEXT, RM_L3_1_L3_1_CONTEXT, RM_L3_2_GPMC_CONTEXT, | 573 | * RM_L3INSTR_OCP_WP1_CONTEXT, RM_L3_1_L3_1_CONTEXT, RM_L3_2_GPMC_CONTEXT, |
547 | * RM_L3_2_L3_2_CONTEXT, RM_L4CFG_HW_SEM_CONTEXT, RM_L4CFG_L4_CFG_CONTEXT, | 574 | * RM_L3_2_L3_2_CONTEXT, RM_L4CFG_HW_SEM_CONTEXT, RM_L4CFG_L4_CFG_CONTEXT, |
548 | * RM_L4CFG_MAILBOX_CONTEXT, RM_MEMIF_DMM_CONTEXT, RM_MEMIF_EMIF_1_CONTEXT, | 575 | * RM_L4CFG_MAILBOX_CONTEXT, RM_L4PER_GPIO2_CONTEXT, RM_L4PER_GPIO3_CONTEXT, |
549 | * RM_MEMIF_EMIF_2_CONTEXT, RM_MEMIF_EMIF_FW_CONTEXT, RM_MEMIF_EMIF_H1_CONTEXT, | 576 | * RM_L4PER_GPIO4_CONTEXT, RM_L4PER_GPIO5_CONTEXT, RM_L4PER_GPIO6_CONTEXT, |
550 | * RM_MEMIF_EMIF_H2_CONTEXT, RM_SDMA_SDMA_CONTEXT, RM_L3INIT_HSI_CONTEXT, | 577 | * RM_L4PER_I2C1_CONTEXT, RM_L4PER_L4_PER_CONTEXT, RM_L4PER_UART1_CONTEXT, |
551 | * RM_L3INIT_MMC1_CONTEXT, RM_L3INIT_MMC2_CONTEXT, RM_L3INIT_MMC6_CONTEXT, | 578 | * RM_L4PER_UART2_CONTEXT, RM_L4PER_UART3_CONTEXT, RM_L4PER_UART4_CONTEXT, |
552 | * RM_L3INIT_USB_HOST_CONTEXT, RM_L3INIT_USB_HOST_FS_CONTEXT, | 579 | * RM_L4SEC_AES1_CONTEXT, RM_L4SEC_AES2_CONTEXT, RM_L4SEC_CRYPTODMA_CONTEXT, |
553 | * RM_L3INIT_USB_OTG_CONTEXT, RM_L3INIT_USB_TLL_CONTEXT, RM_DSS_DSS_CONTEXT, | 580 | * RM_L4SEC_DES3DES_CONTEXT, RM_L4SEC_RNG_CONTEXT, RM_L4SEC_SHA2MD51_CONTEXT, |
554 | * RM_L4PER_GPIO2_CONTEXT, RM_L4PER_GPIO3_CONTEXT, RM_L4PER_GPIO4_CONTEXT, | 581 | * RM_MEMIF_DMM_CONTEXT, RM_MEMIF_EMIF_1_CONTEXT, RM_MEMIF_EMIF_2_CONTEXT, |
555 | * RM_L4PER_GPIO5_CONTEXT, RM_L4PER_GPIO6_CONTEXT, RM_L4PER_I2C1_CONTEXT, | 582 | * RM_MEMIF_EMIF_FW_CONTEXT, RM_MEMIF_EMIF_H1_CONTEXT, |
556 | * RM_L4PER_L4_PER_CONTEXT, RM_L4PER_UART1_CONTEXT, RM_L4PER_UART2_CONTEXT, | 583 | * RM_MEMIF_EMIF_H2_CONTEXT, RM_SDMA_SDMA_CONTEXT, RM_TESLA_TESLA_CONTEXT |
557 | * RM_L4PER_UART3_CONTEXT, RM_L4PER_UART4_CONTEXT, RM_L4SEC_AES1_CONTEXT, | ||
558 | * RM_L4SEC_AES2_CONTEXT, RM_L4SEC_CRYPTODMA_CONTEXT, RM_L4SEC_DES3DES_CONTEXT, | ||
559 | * RM_L4SEC_RNG_CONTEXT, RM_L4SEC_SHA2MD51_CONTEXT, RM_TESLA_TESLA_CONTEXT | ||
560 | */ | 584 | */ |
561 | #define OMAP4430_LOSTCONTEXT_RFF_SHIFT 1 | 585 | #define OMAP4430_LOSTCONTEXT_RFF_SHIFT 1 |
562 | #define OMAP4430_LOSTCONTEXT_RFF_MASK BITFIELD(1, 1) | 586 | #define OMAP4430_LOSTCONTEXT_RFF_MASK (1 << 1) |
563 | 587 | ||
564 | /* Used by RM_ABE_AESS_CONTEXT */ | 588 | /* Used by RM_ABE_AESS_CONTEXT */ |
565 | #define OMAP4430_LOSTMEM_AESSMEM_SHIFT 8 | 589 | #define OMAP4430_LOSTMEM_AESSMEM_SHIFT 8 |
566 | #define OMAP4430_LOSTMEM_AESSMEM_MASK BITFIELD(8, 8) | 590 | #define OMAP4430_LOSTMEM_AESSMEM_MASK (1 << 8) |
567 | 591 | ||
568 | /* Used by RM_CAM_FDIF_CONTEXT, RM_CAM_ISS_CONTEXT */ | 592 | /* Used by RM_CAM_FDIF_CONTEXT, RM_CAM_ISS_CONTEXT */ |
569 | #define OMAP4430_LOSTMEM_CAM_MEM_SHIFT 8 | 593 | #define OMAP4430_LOSTMEM_CAM_MEM_SHIFT 8 |
570 | #define OMAP4430_LOSTMEM_CAM_MEM_MASK BITFIELD(8, 8) | 594 | #define OMAP4430_LOSTMEM_CAM_MEM_MASK (1 << 8) |
571 | 595 | ||
572 | /* Used by RM_L3INSTR_OCP_WP1_CONTEXT */ | 596 | /* Used by RM_L3INSTR_OCP_WP1_CONTEXT */ |
573 | #define OMAP4430_LOSTMEM_CORE_NRET_BANK_SHIFT 8 | 597 | #define OMAP4430_LOSTMEM_CORE_NRET_BANK_SHIFT 8 |
574 | #define OMAP4430_LOSTMEM_CORE_NRET_BANK_MASK BITFIELD(8, 8) | 598 | #define OMAP4430_LOSTMEM_CORE_NRET_BANK_MASK (1 << 8) |
575 | 599 | ||
576 | /* Renamed from LOSTMEM_CORE_NRET_BANK Used by RM_MEMIF_DMM_CONTEXT */ | 600 | /* Renamed from LOSTMEM_CORE_NRET_BANK Used by RM_MEMIF_DMM_CONTEXT */ |
577 | #define OMAP4430_LOSTMEM_CORE_NRET_BANK_9_9_SHIFT 9 | 601 | #define OMAP4430_LOSTMEM_CORE_NRET_BANK_9_9_SHIFT 9 |
578 | #define OMAP4430_LOSTMEM_CORE_NRET_BANK_9_9_MASK BITFIELD(9, 9) | 602 | #define OMAP4430_LOSTMEM_CORE_NRET_BANK_9_9_MASK (1 << 9) |
579 | 603 | ||
580 | /* Used by RM_L3_2_OCMC_RAM_CONTEXT */ | 604 | /* Used by RM_L3_2_OCMC_RAM_CONTEXT */ |
581 | #define OMAP4430_LOSTMEM_CORE_OCMRAM_SHIFT 8 | 605 | #define OMAP4430_LOSTMEM_CORE_OCMRAM_SHIFT 8 |
582 | #define OMAP4430_LOSTMEM_CORE_OCMRAM_MASK BITFIELD(8, 8) | 606 | #define OMAP4430_LOSTMEM_CORE_OCMRAM_MASK (1 << 8) |
583 | 607 | ||
584 | /* | 608 | /* |
585 | * Used by RM_D2D_MODEM_ICR_CONTEXT, RM_MEMIF_DMM_CONTEXT, | 609 | * Used by RM_D2D_MODEM_ICR_CONTEXT, RM_MEMIF_DMM_CONTEXT, |
586 | * RM_SDMA_SDMA_CONTEXT | 610 | * RM_SDMA_SDMA_CONTEXT |
587 | */ | 611 | */ |
588 | #define OMAP4430_LOSTMEM_CORE_OTHER_BANK_SHIFT 8 | 612 | #define OMAP4430_LOSTMEM_CORE_OTHER_BANK_SHIFT 8 |
589 | #define OMAP4430_LOSTMEM_CORE_OTHER_BANK_MASK BITFIELD(8, 8) | 613 | #define OMAP4430_LOSTMEM_CORE_OTHER_BANK_MASK (1 << 8) |
590 | 614 | ||
591 | /* Used by RM_DSS_DEISS_CONTEXT, RM_DSS_DSS_CONTEXT */ | 615 | /* Used by RM_DSS_DEISS_CONTEXT, RM_DSS_DSS_CONTEXT */ |
592 | #define OMAP4430_LOSTMEM_DSS_MEM_SHIFT 8 | 616 | #define OMAP4430_LOSTMEM_DSS_MEM_SHIFT 8 |
593 | #define OMAP4430_LOSTMEM_DSS_MEM_MASK BITFIELD(8, 8) | 617 | #define OMAP4430_LOSTMEM_DSS_MEM_MASK (1 << 8) |
594 | 618 | ||
595 | /* Used by RM_DUCATI_DUCATI_CONTEXT */ | 619 | /* Used by RM_DUCATI_DUCATI_CONTEXT */ |
596 | #define OMAP4430_LOSTMEM_DUCATI_L2RAM_SHIFT 9 | 620 | #define OMAP4430_LOSTMEM_DUCATI_L2RAM_SHIFT 9 |
597 | #define OMAP4430_LOSTMEM_DUCATI_L2RAM_MASK BITFIELD(9, 9) | 621 | #define OMAP4430_LOSTMEM_DUCATI_L2RAM_MASK (1 << 9) |
598 | 622 | ||
599 | /* Used by RM_DUCATI_DUCATI_CONTEXT */ | 623 | /* Used by RM_DUCATI_DUCATI_CONTEXT */ |
600 | #define OMAP4430_LOSTMEM_DUCATI_UNICACHE_SHIFT 8 | 624 | #define OMAP4430_LOSTMEM_DUCATI_UNICACHE_SHIFT 8 |
601 | #define OMAP4430_LOSTMEM_DUCATI_UNICACHE_MASK BITFIELD(8, 8) | 625 | #define OMAP4430_LOSTMEM_DUCATI_UNICACHE_MASK (1 << 8) |
602 | 626 | ||
603 | /* Used by RM_EMU_DEBUGSS_CONTEXT */ | 627 | /* Used by RM_EMU_DEBUGSS_CONTEXT */ |
604 | #define OMAP4430_LOSTMEM_EMU_BANK_SHIFT 8 | 628 | #define OMAP4430_LOSTMEM_EMU_BANK_SHIFT 8 |
605 | #define OMAP4430_LOSTMEM_EMU_BANK_MASK BITFIELD(8, 8) | 629 | #define OMAP4430_LOSTMEM_EMU_BANK_MASK (1 << 8) |
606 | 630 | ||
607 | /* Used by RM_GFX_GFX_CONTEXT */ | 631 | /* Used by RM_GFX_GFX_CONTEXT */ |
608 | #define OMAP4430_LOSTMEM_GFX_MEM_SHIFT 8 | 632 | #define OMAP4430_LOSTMEM_GFX_MEM_SHIFT 8 |
609 | #define OMAP4430_LOSTMEM_GFX_MEM_MASK BITFIELD(8, 8) | 633 | #define OMAP4430_LOSTMEM_GFX_MEM_MASK (1 << 8) |
610 | 634 | ||
611 | /* Used by RM_IVAHD_IVAHD_CONTEXT */ | 635 | /* Used by RM_IVAHD_IVAHD_CONTEXT */ |
612 | #define OMAP4430_LOSTMEM_HWA_MEM_SHIFT 10 | 636 | #define OMAP4430_LOSTMEM_HWA_MEM_SHIFT 10 |
613 | #define OMAP4430_LOSTMEM_HWA_MEM_MASK BITFIELD(10, 10) | 637 | #define OMAP4430_LOSTMEM_HWA_MEM_MASK (1 << 10) |
614 | 638 | ||
615 | /* | 639 | /* |
616 | * Used by RM_L3INIT_CCPTX_CONTEXT, RM_L3INIT_EMAC_CONTEXT, | 640 | * Used by RM_L3INIT_CCPTX_CONTEXT, RM_L3INIT_EMAC_CONTEXT, |
@@ -620,19 +644,19 @@ | |||
620 | * RM_L3INIT_USB_OTG_CONTEXT, RM_L3INIT_XHPI_CONTEXT | 644 | * RM_L3INIT_USB_OTG_CONTEXT, RM_L3INIT_XHPI_CONTEXT |
621 | */ | 645 | */ |
622 | #define OMAP4430_LOSTMEM_L3INIT_BANK1_SHIFT 8 | 646 | #define OMAP4430_LOSTMEM_L3INIT_BANK1_SHIFT 8 |
623 | #define OMAP4430_LOSTMEM_L3INIT_BANK1_MASK BITFIELD(8, 8) | 647 | #define OMAP4430_LOSTMEM_L3INIT_BANK1_MASK (1 << 8) |
624 | 648 | ||
625 | /* Used by RM_MPU_MPU_CONTEXT */ | 649 | /* Used by RM_MPU_MPU_CONTEXT */ |
626 | #define OMAP4430_LOSTMEM_MPU_L1_SHIFT 8 | 650 | #define OMAP4430_LOSTMEM_MPU_L1_SHIFT 8 |
627 | #define OMAP4430_LOSTMEM_MPU_L1_MASK BITFIELD(8, 8) | 651 | #define OMAP4430_LOSTMEM_MPU_L1_MASK (1 << 8) |
628 | 652 | ||
629 | /* Used by RM_MPU_MPU_CONTEXT */ | 653 | /* Used by RM_MPU_MPU_CONTEXT */ |
630 | #define OMAP4430_LOSTMEM_MPU_L2_SHIFT 9 | 654 | #define OMAP4430_LOSTMEM_MPU_L2_SHIFT 9 |
631 | #define OMAP4430_LOSTMEM_MPU_L2_MASK BITFIELD(9, 9) | 655 | #define OMAP4430_LOSTMEM_MPU_L2_MASK (1 << 9) |
632 | 656 | ||
633 | /* Used by RM_MPU_MPU_CONTEXT */ | 657 | /* Used by RM_MPU_MPU_CONTEXT */ |
634 | #define OMAP4430_LOSTMEM_MPU_RAM_SHIFT 10 | 658 | #define OMAP4430_LOSTMEM_MPU_RAM_SHIFT 10 |
635 | #define OMAP4430_LOSTMEM_MPU_RAM_MASK BITFIELD(10, 10) | 659 | #define OMAP4430_LOSTMEM_MPU_RAM_MASK (1 << 10) |
636 | 660 | ||
637 | /* | 661 | /* |
638 | * Used by RM_L4PER_HECC1_CONTEXT, RM_L4PER_HECC2_CONTEXT, | 662 | * Used by RM_L4PER_HECC1_CONTEXT, RM_L4PER_HECC2_CONTEXT, |
@@ -640,14 +664,14 @@ | |||
640 | * RM_L4PER_MMCSD5_CONTEXT, RM_L4PER_SLIMBUS2_CONTEXT, RM_L4SEC_PKAEIP29_CONTEXT | 664 | * RM_L4PER_MMCSD5_CONTEXT, RM_L4PER_SLIMBUS2_CONTEXT, RM_L4SEC_PKAEIP29_CONTEXT |
641 | */ | 665 | */ |
642 | #define OMAP4430_LOSTMEM_NONRETAINED_BANK_SHIFT 8 | 666 | #define OMAP4430_LOSTMEM_NONRETAINED_BANK_SHIFT 8 |
643 | #define OMAP4430_LOSTMEM_NONRETAINED_BANK_MASK BITFIELD(8, 8) | 667 | #define OMAP4430_LOSTMEM_NONRETAINED_BANK_MASK (1 << 8) |
644 | 668 | ||
645 | /* | 669 | /* |
646 | * Used by RM_ABE_DMIC_CONTEXT, RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT, | 670 | * Used by RM_ABE_DMIC_CONTEXT, RM_ABE_MCBSP1_CONTEXT, RM_ABE_MCBSP2_CONTEXT, |
647 | * RM_ABE_MCBSP3_CONTEXT, RM_ABE_PDM_CONTEXT, RM_ABE_SLIMBUS_CONTEXT | 671 | * RM_ABE_MCBSP3_CONTEXT, RM_ABE_PDM_CONTEXT, RM_ABE_SLIMBUS_CONTEXT |
648 | */ | 672 | */ |
649 | #define OMAP4430_LOSTMEM_PERIHPMEM_SHIFT 8 | 673 | #define OMAP4430_LOSTMEM_PERIHPMEM_SHIFT 8 |
650 | #define OMAP4430_LOSTMEM_PERIHPMEM_MASK BITFIELD(8, 8) | 674 | #define OMAP4430_LOSTMEM_PERIHPMEM_MASK (1 << 8) |
651 | 675 | ||
652 | /* | 676 | /* |
653 | * Used by RM_L4PER_MSPROHG_CONTEXT, RM_L4PER_UART1_CONTEXT, | 677 | * Used by RM_L4PER_MSPROHG_CONTEXT, RM_L4PER_UART1_CONTEXT, |
@@ -655,245 +679,237 @@ | |||
655 | * RM_L4SEC_CRYPTODMA_CONTEXT | 679 | * RM_L4SEC_CRYPTODMA_CONTEXT |
656 | */ | 680 | */ |
657 | #define OMAP4430_LOSTMEM_RETAINED_BANK_SHIFT 8 | 681 | #define OMAP4430_LOSTMEM_RETAINED_BANK_SHIFT 8 |
658 | #define OMAP4430_LOSTMEM_RETAINED_BANK_MASK BITFIELD(8, 8) | 682 | #define OMAP4430_LOSTMEM_RETAINED_BANK_MASK (1 << 8) |
659 | 683 | ||
660 | /* Used by RM_IVAHD_SL2_CONTEXT */ | 684 | /* Used by RM_IVAHD_SL2_CONTEXT */ |
661 | #define OMAP4430_LOSTMEM_SL2_MEM_SHIFT 8 | 685 | #define OMAP4430_LOSTMEM_SL2_MEM_SHIFT 8 |
662 | #define OMAP4430_LOSTMEM_SL2_MEM_MASK BITFIELD(8, 8) | 686 | #define OMAP4430_LOSTMEM_SL2_MEM_MASK (1 << 8) |
663 | 687 | ||
664 | /* Used by RM_IVAHD_IVAHD_CONTEXT */ | 688 | /* Used by RM_IVAHD_IVAHD_CONTEXT */ |
665 | #define OMAP4430_LOSTMEM_TCM1_MEM_SHIFT 8 | 689 | #define OMAP4430_LOSTMEM_TCM1_MEM_SHIFT 8 |
666 | #define OMAP4430_LOSTMEM_TCM1_MEM_MASK BITFIELD(8, 8) | 690 | #define OMAP4430_LOSTMEM_TCM1_MEM_MASK (1 << 8) |
667 | 691 | ||
668 | /* Used by RM_IVAHD_IVAHD_CONTEXT */ | 692 | /* Used by RM_IVAHD_IVAHD_CONTEXT */ |
669 | #define OMAP4430_LOSTMEM_TCM2_MEM_SHIFT 9 | 693 | #define OMAP4430_LOSTMEM_TCM2_MEM_SHIFT 9 |
670 | #define OMAP4430_LOSTMEM_TCM2_MEM_MASK BITFIELD(9, 9) | 694 | #define OMAP4430_LOSTMEM_TCM2_MEM_MASK (1 << 9) |
671 | 695 | ||
672 | /* Used by RM_TESLA_TESLA_CONTEXT */ | 696 | /* Used by RM_TESLA_TESLA_CONTEXT */ |
673 | #define OMAP4430_LOSTMEM_TESLA_EDMA_SHIFT 10 | 697 | #define OMAP4430_LOSTMEM_TESLA_EDMA_SHIFT 10 |
674 | #define OMAP4430_LOSTMEM_TESLA_EDMA_MASK BITFIELD(10, 10) | 698 | #define OMAP4430_LOSTMEM_TESLA_EDMA_MASK (1 << 10) |
675 | 699 | ||
676 | /* Used by RM_TESLA_TESLA_CONTEXT */ | 700 | /* Used by RM_TESLA_TESLA_CONTEXT */ |
677 | #define OMAP4430_LOSTMEM_TESLA_L1_SHIFT 8 | 701 | #define OMAP4430_LOSTMEM_TESLA_L1_SHIFT 8 |
678 | #define OMAP4430_LOSTMEM_TESLA_L1_MASK BITFIELD(8, 8) | 702 | #define OMAP4430_LOSTMEM_TESLA_L1_MASK (1 << 8) |
679 | 703 | ||
680 | /* Used by RM_TESLA_TESLA_CONTEXT */ | 704 | /* Used by RM_TESLA_TESLA_CONTEXT */ |
681 | #define OMAP4430_LOSTMEM_TESLA_L2_SHIFT 9 | 705 | #define OMAP4430_LOSTMEM_TESLA_L2_SHIFT 9 |
682 | #define OMAP4430_LOSTMEM_TESLA_L2_MASK BITFIELD(9, 9) | 706 | #define OMAP4430_LOSTMEM_TESLA_L2_MASK (1 << 9) |
683 | 707 | ||
684 | /* Used by RM_WKUP_SARRAM_CONTEXT */ | 708 | /* Used by RM_WKUP_SARRAM_CONTEXT */ |
685 | #define OMAP4430_LOSTMEM_WKUP_BANK_SHIFT 8 | 709 | #define OMAP4430_LOSTMEM_WKUP_BANK_SHIFT 8 |
686 | #define OMAP4430_LOSTMEM_WKUP_BANK_MASK BITFIELD(8, 8) | 710 | #define OMAP4430_LOSTMEM_WKUP_BANK_MASK (1 << 8) |
687 | 711 | ||
688 | /* | 712 | /* |
689 | * Used by PM_CORE_PWRSTCTRL, PM_CAM_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, | 713 | * Used by PM_ABE_PWRSTCTRL, PM_CAM_PWRSTCTRL, PM_CEFUSE_PWRSTCTRL, |
690 | * PM_ABE_PWRSTCTRL, PM_GFX_PWRSTCTRL, PM_MPU_PWRSTCTRL, PM_CEFUSE_PWRSTCTRL, | 714 | * PM_CORE_PWRSTCTRL, PM_DSS_PWRSTCTRL, PM_GFX_PWRSTCTRL, PM_IVAHD_PWRSTCTRL, |
691 | * PM_DSS_PWRSTCTRL, PM_L4PER_PWRSTCTRL, PM_TESLA_PWRSTCTRL, PM_IVAHD_PWRSTCTRL | 715 | * PM_L3INIT_PWRSTCTRL, PM_L4PER_PWRSTCTRL, PM_MPU_PWRSTCTRL, PM_TESLA_PWRSTCTRL |
692 | */ | 716 | */ |
693 | #define OMAP4430_LOWPOWERSTATECHANGE_SHIFT 4 | 717 | #define OMAP4430_LOWPOWERSTATECHANGE_SHIFT 4 |
694 | #define OMAP4430_LOWPOWERSTATECHANGE_MASK BITFIELD(4, 4) | 718 | #define OMAP4430_LOWPOWERSTATECHANGE_MASK (1 << 4) |
695 | |||
696 | /* Used by PM_CORE_PWRSTCTRL */ | ||
697 | #define OMAP4430_MEMORYCHANGE_SHIFT 3 | ||
698 | #define OMAP4430_MEMORYCHANGE_MASK BITFIELD(3, 3) | ||
699 | 719 | ||
700 | /* Used by PRM_MODEM_IF_CTRL */ | 720 | /* Used by PRM_MODEM_IF_CTRL */ |
701 | #define OMAP4430_MODEM_READY_SHIFT 1 | 721 | #define OMAP4430_MODEM_READY_SHIFT 1 |
702 | #define OMAP4430_MODEM_READY_MASK BITFIELD(1, 1) | 722 | #define OMAP4430_MODEM_READY_MASK (1 << 1) |
703 | 723 | ||
704 | /* Used by PRM_MODEM_IF_CTRL */ | 724 | /* Used by PRM_MODEM_IF_CTRL */ |
705 | #define OMAP4430_MODEM_SHUTDOWN_IRQ_SHIFT 9 | 725 | #define OMAP4430_MODEM_SHUTDOWN_IRQ_SHIFT 9 |
706 | #define OMAP4430_MODEM_SHUTDOWN_IRQ_MASK BITFIELD(9, 9) | 726 | #define OMAP4430_MODEM_SHUTDOWN_IRQ_MASK (1 << 9) |
707 | 727 | ||
708 | /* Used by PRM_MODEM_IF_CTRL */ | 728 | /* Used by PRM_MODEM_IF_CTRL */ |
709 | #define OMAP4430_MODEM_SLEEP_ST_SHIFT 16 | 729 | #define OMAP4430_MODEM_SLEEP_ST_SHIFT 16 |
710 | #define OMAP4430_MODEM_SLEEP_ST_MASK BITFIELD(16, 16) | 730 | #define OMAP4430_MODEM_SLEEP_ST_MASK (1 << 16) |
711 | 731 | ||
712 | /* Used by PRM_MODEM_IF_CTRL */ | 732 | /* Used by PRM_MODEM_IF_CTRL */ |
713 | #define OMAP4430_MODEM_WAKE_IRQ_SHIFT 8 | 733 | #define OMAP4430_MODEM_WAKE_IRQ_SHIFT 8 |
714 | #define OMAP4430_MODEM_WAKE_IRQ_MASK BITFIELD(8, 8) | 734 | #define OMAP4430_MODEM_WAKE_IRQ_MASK (1 << 8) |
715 | 735 | ||
716 | /* Used by PM_MPU_PWRSTCTRL */ | 736 | /* Used by PM_MPU_PWRSTCTRL */ |
717 | #define OMAP4430_MPU_L1_ONSTATE_SHIFT 16 | 737 | #define OMAP4430_MPU_L1_ONSTATE_SHIFT 16 |
718 | #define OMAP4430_MPU_L1_ONSTATE_MASK BITFIELD(16, 17) | 738 | #define OMAP4430_MPU_L1_ONSTATE_MASK (0x3 << 16) |
719 | 739 | ||
720 | /* Used by PM_MPU_PWRSTCTRL */ | 740 | /* Used by PM_MPU_PWRSTCTRL */ |
721 | #define OMAP4430_MPU_L1_RETSTATE_SHIFT 8 | 741 | #define OMAP4430_MPU_L1_RETSTATE_SHIFT 8 |
722 | #define OMAP4430_MPU_L1_RETSTATE_MASK BITFIELD(8, 8) | 742 | #define OMAP4430_MPU_L1_RETSTATE_MASK (1 << 8) |
723 | 743 | ||
724 | /* Used by PM_MPU_PWRSTST */ | 744 | /* Used by PM_MPU_PWRSTST */ |
725 | #define OMAP4430_MPU_L1_STATEST_SHIFT 4 | 745 | #define OMAP4430_MPU_L1_STATEST_SHIFT 4 |
726 | #define OMAP4430_MPU_L1_STATEST_MASK BITFIELD(4, 5) | 746 | #define OMAP4430_MPU_L1_STATEST_MASK (0x3 << 4) |
727 | 747 | ||
728 | /* Used by PM_MPU_PWRSTCTRL */ | 748 | /* Used by PM_MPU_PWRSTCTRL */ |
729 | #define OMAP4430_MPU_L2_ONSTATE_SHIFT 18 | 749 | #define OMAP4430_MPU_L2_ONSTATE_SHIFT 18 |
730 | #define OMAP4430_MPU_L2_ONSTATE_MASK BITFIELD(18, 19) | 750 | #define OMAP4430_MPU_L2_ONSTATE_MASK (0x3 << 18) |
731 | 751 | ||
732 | /* Used by PM_MPU_PWRSTCTRL */ | 752 | /* Used by PM_MPU_PWRSTCTRL */ |
733 | #define OMAP4430_MPU_L2_RETSTATE_SHIFT 9 | 753 | #define OMAP4430_MPU_L2_RETSTATE_SHIFT 9 |
734 | #define OMAP4430_MPU_L2_RETSTATE_MASK BITFIELD(9, 9) | 754 | #define OMAP4430_MPU_L2_RETSTATE_MASK (1 << 9) |
735 | 755 | ||
736 | /* Used by PM_MPU_PWRSTST */ | 756 | /* Used by PM_MPU_PWRSTST */ |
737 | #define OMAP4430_MPU_L2_STATEST_SHIFT 6 | 757 | #define OMAP4430_MPU_L2_STATEST_SHIFT 6 |
738 | #define OMAP4430_MPU_L2_STATEST_MASK BITFIELD(6, 7) | 758 | #define OMAP4430_MPU_L2_STATEST_MASK (0x3 << 6) |
739 | 759 | ||
740 | /* Used by PM_MPU_PWRSTCTRL */ | 760 | /* Used by PM_MPU_PWRSTCTRL */ |
741 | #define OMAP4430_MPU_RAM_ONSTATE_SHIFT 20 | 761 | #define OMAP4430_MPU_RAM_ONSTATE_SHIFT 20 |
742 | #define OMAP4430_MPU_RAM_ONSTATE_MASK BITFIELD(20, 21) | 762 | #define OMAP4430_MPU_RAM_ONSTATE_MASK (0x3 << 20) |
743 | 763 | ||
744 | /* Used by PM_MPU_PWRSTCTRL */ | 764 | /* Used by PM_MPU_PWRSTCTRL */ |
745 | #define OMAP4430_MPU_RAM_RETSTATE_SHIFT 10 | 765 | #define OMAP4430_MPU_RAM_RETSTATE_SHIFT 10 |
746 | #define OMAP4430_MPU_RAM_RETSTATE_MASK BITFIELD(10, 10) | 766 | #define OMAP4430_MPU_RAM_RETSTATE_MASK (1 << 10) |
747 | 767 | ||
748 | /* Used by PM_MPU_PWRSTST */ | 768 | /* Used by PM_MPU_PWRSTST */ |
749 | #define OMAP4430_MPU_RAM_STATEST_SHIFT 8 | 769 | #define OMAP4430_MPU_RAM_STATEST_SHIFT 8 |
750 | #define OMAP4430_MPU_RAM_STATEST_MASK BITFIELD(8, 9) | 770 | #define OMAP4430_MPU_RAM_STATEST_MASK (0x3 << 8) |
751 | 771 | ||
752 | /* Used by PRM_RSTST */ | 772 | /* Used by PRM_RSTST */ |
753 | #define OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT 2 | 773 | #define OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT 2 |
754 | #define OMAP4430_MPU_SECURITY_VIOL_RST_MASK BITFIELD(2, 2) | 774 | #define OMAP4430_MPU_SECURITY_VIOL_RST_MASK (1 << 2) |
755 | 775 | ||
756 | /* Used by PRM_RSTST */ | 776 | /* Used by PRM_RSTST */ |
757 | #define OMAP4430_MPU_WDT_RST_SHIFT 3 | 777 | #define OMAP4430_MPU_WDT_RST_SHIFT 3 |
758 | #define OMAP4430_MPU_WDT_RST_MASK BITFIELD(3, 3) | 778 | #define OMAP4430_MPU_WDT_RST_MASK (1 << 3) |
759 | 779 | ||
760 | /* Used by PM_L4PER_PWRSTCTRL */ | 780 | /* Used by PM_L4PER_PWRSTCTRL */ |
761 | #define OMAP4430_NONRETAINED_BANK_ONSTATE_SHIFT 18 | 781 | #define OMAP4430_NONRETAINED_BANK_ONSTATE_SHIFT 18 |
762 | #define OMAP4430_NONRETAINED_BANK_ONSTATE_MASK BITFIELD(18, 19) | 782 | #define OMAP4430_NONRETAINED_BANK_ONSTATE_MASK (0x3 << 18) |
763 | 783 | ||
764 | /* Used by PM_L4PER_PWRSTCTRL */ | 784 | /* Used by PM_L4PER_PWRSTCTRL */ |
765 | #define OMAP4430_NONRETAINED_BANK_RETSTATE_SHIFT 9 | 785 | #define OMAP4430_NONRETAINED_BANK_RETSTATE_SHIFT 9 |
766 | #define OMAP4430_NONRETAINED_BANK_RETSTATE_MASK BITFIELD(9, 9) | 786 | #define OMAP4430_NONRETAINED_BANK_RETSTATE_MASK (1 << 9) |
767 | 787 | ||
768 | /* Used by PM_L4PER_PWRSTST */ | 788 | /* Used by PM_L4PER_PWRSTST */ |
769 | #define OMAP4430_NONRETAINED_BANK_STATEST_SHIFT 6 | 789 | #define OMAP4430_NONRETAINED_BANK_STATEST_SHIFT 6 |
770 | #define OMAP4430_NONRETAINED_BANK_STATEST_MASK BITFIELD(6, 7) | 790 | #define OMAP4430_NONRETAINED_BANK_STATEST_MASK (0x3 << 6) |
771 | 791 | ||
772 | /* Used by PM_CORE_PWRSTCTRL */ | 792 | /* Used by PM_CORE_PWRSTCTRL */ |
773 | #define OMAP4430_OCP_NRET_BANK_ONSTATE_SHIFT 24 | 793 | #define OMAP4430_OCP_NRET_BANK_ONSTATE_SHIFT 24 |
774 | #define OMAP4430_OCP_NRET_BANK_ONSTATE_MASK BITFIELD(24, 25) | 794 | #define OMAP4430_OCP_NRET_BANK_ONSTATE_MASK (0x3 << 24) |
775 | 795 | ||
776 | /* Used by PM_CORE_PWRSTCTRL */ | 796 | /* Used by PM_CORE_PWRSTCTRL */ |
777 | #define OMAP4430_OCP_NRET_BANK_RETSTATE_SHIFT 12 | 797 | #define OMAP4430_OCP_NRET_BANK_RETSTATE_SHIFT 12 |
778 | #define OMAP4430_OCP_NRET_BANK_RETSTATE_MASK BITFIELD(12, 12) | 798 | #define OMAP4430_OCP_NRET_BANK_RETSTATE_MASK (1 << 12) |
779 | 799 | ||
780 | /* Used by PM_CORE_PWRSTST */ | 800 | /* Used by PM_CORE_PWRSTST */ |
781 | #define OMAP4430_OCP_NRET_BANK_STATEST_SHIFT 12 | 801 | #define OMAP4430_OCP_NRET_BANK_STATEST_SHIFT 12 |
782 | #define OMAP4430_OCP_NRET_BANK_STATEST_MASK BITFIELD(12, 13) | 802 | #define OMAP4430_OCP_NRET_BANK_STATEST_MASK (0x3 << 12) |
783 | 803 | ||
784 | /* | 804 | /* |
785 | * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L, | 805 | * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L, |
786 | * PRM_VC_VAL_CMD_VDD_MPU_L | 806 | * PRM_VC_VAL_CMD_VDD_MPU_L |
787 | */ | 807 | */ |
788 | #define OMAP4430_OFF_SHIFT 0 | 808 | #define OMAP4430_OFF_SHIFT 0 |
789 | #define OMAP4430_OFF_MASK BITFIELD(0, 7) | 809 | #define OMAP4430_OFF_MASK (0xff << 0) |
790 | |||
791 | /* Used by PRM_LDO_BANDGAP_CTRL */ | ||
792 | #define OMAP4430_OFF_ENABLE_SHIFT 0 | ||
793 | #define OMAP4430_OFF_ENABLE_MASK BITFIELD(0, 0) | ||
794 | 810 | ||
795 | /* | 811 | /* |
796 | * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L, | 812 | * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L, |
797 | * PRM_VC_VAL_CMD_VDD_MPU_L | 813 | * PRM_VC_VAL_CMD_VDD_MPU_L |
798 | */ | 814 | */ |
799 | #define OMAP4430_ON_SHIFT 24 | 815 | #define OMAP4430_ON_SHIFT 24 |
800 | #define OMAP4430_ON_MASK BITFIELD(24, 31) | 816 | #define OMAP4430_ON_MASK (0xff << 24) |
801 | 817 | ||
802 | /* | 818 | /* |
803 | * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L, | 819 | * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L, |
804 | * PRM_VC_VAL_CMD_VDD_MPU_L | 820 | * PRM_VC_VAL_CMD_VDD_MPU_L |
805 | */ | 821 | */ |
806 | #define OMAP4430_ONLP_SHIFT 16 | 822 | #define OMAP4430_ONLP_SHIFT 16 |
807 | #define OMAP4430_ONLP_MASK BITFIELD(16, 23) | 823 | #define OMAP4430_ONLP_MASK (0xff << 16) |
808 | 824 | ||
809 | /* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */ | 825 | /* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */ |
810 | #define OMAP4430_OPP_CHANGE_SHIFT 2 | 826 | #define OMAP4430_OPP_CHANGE_SHIFT 2 |
811 | #define OMAP4430_OPP_CHANGE_MASK BITFIELD(2, 2) | 827 | #define OMAP4430_OPP_CHANGE_MASK (1 << 2) |
812 | 828 | ||
813 | /* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */ | 829 | /* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */ |
814 | #define OMAP4430_OPP_SEL_SHIFT 0 | 830 | #define OMAP4430_OPP_SEL_SHIFT 0 |
815 | #define OMAP4430_OPP_SEL_MASK BITFIELD(0, 1) | 831 | #define OMAP4430_OPP_SEL_MASK (0x3 << 0) |
816 | 832 | ||
817 | /* Used by PRM_SRAM_COUNT */ | 833 | /* Used by PRM_SRAM_COUNT */ |
818 | #define OMAP4430_PCHARGECNT_VALUE_SHIFT 0 | 834 | #define OMAP4430_PCHARGECNT_VALUE_SHIFT 0 |
819 | #define OMAP4430_PCHARGECNT_VALUE_MASK BITFIELD(0, 5) | 835 | #define OMAP4430_PCHARGECNT_VALUE_MASK (0x3f << 0) |
820 | 836 | ||
821 | /* Used by PRM_PSCON_COUNT */ | 837 | /* Used by PRM_PSCON_COUNT */ |
822 | #define OMAP4430_PCHARGE_TIME_SHIFT 0 | 838 | #define OMAP4430_PCHARGE_TIME_SHIFT 0 |
823 | #define OMAP4430_PCHARGE_TIME_MASK BITFIELD(0, 7) | 839 | #define OMAP4430_PCHARGE_TIME_MASK (0xff << 0) |
824 | 840 | ||
825 | /* Used by PM_ABE_PWRSTCTRL */ | 841 | /* Used by PM_ABE_PWRSTCTRL */ |
826 | #define OMAP4430_PERIPHMEM_ONSTATE_SHIFT 20 | 842 | #define OMAP4430_PERIPHMEM_ONSTATE_SHIFT 20 |
827 | #define OMAP4430_PERIPHMEM_ONSTATE_MASK BITFIELD(20, 21) | 843 | #define OMAP4430_PERIPHMEM_ONSTATE_MASK (0x3 << 20) |
828 | 844 | ||
829 | /* Used by PM_ABE_PWRSTCTRL */ | 845 | /* Used by PM_ABE_PWRSTCTRL */ |
830 | #define OMAP4430_PERIPHMEM_RETSTATE_SHIFT 10 | 846 | #define OMAP4430_PERIPHMEM_RETSTATE_SHIFT 10 |
831 | #define OMAP4430_PERIPHMEM_RETSTATE_MASK BITFIELD(10, 10) | 847 | #define OMAP4430_PERIPHMEM_RETSTATE_MASK (1 << 10) |
832 | 848 | ||
833 | /* Used by PM_ABE_PWRSTST */ | 849 | /* Used by PM_ABE_PWRSTST */ |
834 | #define OMAP4430_PERIPHMEM_STATEST_SHIFT 8 | 850 | #define OMAP4430_PERIPHMEM_STATEST_SHIFT 8 |
835 | #define OMAP4430_PERIPHMEM_STATEST_MASK BITFIELD(8, 9) | 851 | #define OMAP4430_PERIPHMEM_STATEST_MASK (0x3 << 8) |
836 | 852 | ||
837 | /* Used by PRM_PHASE1_CNDP */ | 853 | /* Used by PRM_PHASE1_CNDP */ |
838 | #define OMAP4430_PHASE1_CNDP_SHIFT 0 | 854 | #define OMAP4430_PHASE1_CNDP_SHIFT 0 |
839 | #define OMAP4430_PHASE1_CNDP_MASK BITFIELD(0, 31) | 855 | #define OMAP4430_PHASE1_CNDP_MASK (0xffffffff << 0) |
840 | 856 | ||
841 | /* Used by PRM_PHASE2A_CNDP */ | 857 | /* Used by PRM_PHASE2A_CNDP */ |
842 | #define OMAP4430_PHASE2A_CNDP_SHIFT 0 | 858 | #define OMAP4430_PHASE2A_CNDP_SHIFT 0 |
843 | #define OMAP4430_PHASE2A_CNDP_MASK BITFIELD(0, 31) | 859 | #define OMAP4430_PHASE2A_CNDP_MASK (0xffffffff << 0) |
844 | 860 | ||
845 | /* Used by PRM_PHASE2B_CNDP */ | 861 | /* Used by PRM_PHASE2B_CNDP */ |
846 | #define OMAP4430_PHASE2B_CNDP_SHIFT 0 | 862 | #define OMAP4430_PHASE2B_CNDP_SHIFT 0 |
847 | #define OMAP4430_PHASE2B_CNDP_MASK BITFIELD(0, 31) | 863 | #define OMAP4430_PHASE2B_CNDP_MASK (0xffffffff << 0) |
848 | 864 | ||
849 | /* Used by PRM_PSCON_COUNT */ | 865 | /* Used by PRM_PSCON_COUNT */ |
850 | #define OMAP4430_PONOUT_2_PGOODIN_TIME_SHIFT 8 | 866 | #define OMAP4430_PONOUT_2_PGOODIN_TIME_SHIFT 8 |
851 | #define OMAP4430_PONOUT_2_PGOODIN_TIME_MASK BITFIELD(8, 15) | 867 | #define OMAP4430_PONOUT_2_PGOODIN_TIME_MASK (0xff << 8) |
852 | 868 | ||
853 | /* | 869 | /* |
854 | * Used by PM_EMU_PWRSTCTRL, PM_CORE_PWRSTCTRL, PM_CAM_PWRSTCTRL, | 870 | * Used by PM_ABE_PWRSTCTRL, PM_CAM_PWRSTCTRL, PM_CEFUSE_PWRSTCTRL, |
855 | * PM_L3INIT_PWRSTCTRL, PM_ABE_PWRSTCTRL, PM_GFX_PWRSTCTRL, PM_MPU_PWRSTCTRL, | 871 | * PM_CORE_PWRSTCTRL, PM_DSS_PWRSTCTRL, PM_EMU_PWRSTCTRL, PM_GFX_PWRSTCTRL, |
856 | * PM_CEFUSE_PWRSTCTRL, PM_DSS_PWRSTCTRL, PM_L4PER_PWRSTCTRL, | 872 | * PM_IVAHD_PWRSTCTRL, PM_L3INIT_PWRSTCTRL, PM_L4PER_PWRSTCTRL, |
857 | * PM_TESLA_PWRSTCTRL, PM_IVAHD_PWRSTCTRL | 873 | * PM_MPU_PWRSTCTRL, PM_TESLA_PWRSTCTRL |
858 | */ | 874 | */ |
859 | #define OMAP4430_POWERSTATE_SHIFT 0 | 875 | #define OMAP4430_POWERSTATE_SHIFT 0 |
860 | #define OMAP4430_POWERSTATE_MASK BITFIELD(0, 1) | 876 | #define OMAP4430_POWERSTATE_MASK (0x3 << 0) |
861 | 877 | ||
862 | /* | 878 | /* |
863 | * Used by PM_EMU_PWRSTST, PM_CORE_PWRSTST, PM_CAM_PWRSTST, PM_L3INIT_PWRSTST, | 879 | * Used by PM_ABE_PWRSTST, PM_CAM_PWRSTST, PM_CEFUSE_PWRSTST, PM_CORE_PWRSTST, |
864 | * PM_ABE_PWRSTST, PM_GFX_PWRSTST, PM_MPU_PWRSTST, PM_CEFUSE_PWRSTST, | 880 | * PM_DSS_PWRSTST, PM_EMU_PWRSTST, PM_GFX_PWRSTST, PM_IVAHD_PWRSTST, |
865 | * PM_DSS_PWRSTST, PM_L4PER_PWRSTST, PM_TESLA_PWRSTST, PM_IVAHD_PWRSTST | 881 | * PM_L3INIT_PWRSTST, PM_L4PER_PWRSTST, PM_MPU_PWRSTST, PM_TESLA_PWRSTST |
866 | */ | 882 | */ |
867 | #define OMAP4430_POWERSTATEST_SHIFT 0 | 883 | #define OMAP4430_POWERSTATEST_SHIFT 0 |
868 | #define OMAP4430_POWERSTATEST_MASK BITFIELD(0, 1) | 884 | #define OMAP4430_POWERSTATEST_MASK (0x3 << 0) |
869 | 885 | ||
870 | /* Used by PRM_PWRREQCTRL */ | 886 | /* Used by PRM_PWRREQCTRL */ |
871 | #define OMAP4430_PWRREQ_COND_SHIFT 0 | 887 | #define OMAP4430_PWRREQ_COND_SHIFT 0 |
872 | #define OMAP4430_PWRREQ_COND_MASK BITFIELD(0, 1) | 888 | #define OMAP4430_PWRREQ_COND_MASK (0x3 << 0) |
873 | 889 | ||
874 | /* Used by PRM_VC_CFG_CHANNEL */ | 890 | /* Used by PRM_VC_CFG_CHANNEL */ |
875 | #define OMAP4430_RACEN_VDD_CORE_L_SHIFT 3 | 891 | #define OMAP4430_RACEN_VDD_CORE_L_SHIFT 3 |
876 | #define OMAP4430_RACEN_VDD_CORE_L_MASK BITFIELD(3, 3) | 892 | #define OMAP4430_RACEN_VDD_CORE_L_MASK (1 << 3) |
877 | 893 | ||
878 | /* Used by PRM_VC_CFG_CHANNEL */ | 894 | /* Used by PRM_VC_CFG_CHANNEL */ |
879 | #define OMAP4430_RACEN_VDD_IVA_L_SHIFT 11 | 895 | #define OMAP4430_RACEN_VDD_IVA_L_SHIFT 11 |
880 | #define OMAP4430_RACEN_VDD_IVA_L_MASK BITFIELD(11, 11) | 896 | #define OMAP4430_RACEN_VDD_IVA_L_MASK (1 << 11) |
881 | 897 | ||
882 | /* Used by PRM_VC_CFG_CHANNEL */ | 898 | /* Used by PRM_VC_CFG_CHANNEL */ |
883 | #define OMAP4430_RACEN_VDD_MPU_L_SHIFT 20 | 899 | #define OMAP4430_RACEN_VDD_MPU_L_SHIFT 20 |
884 | #define OMAP4430_RACEN_VDD_MPU_L_MASK BITFIELD(20, 20) | 900 | #define OMAP4430_RACEN_VDD_MPU_L_MASK (1 << 20) |
885 | 901 | ||
886 | /* Used by PRM_VC_CFG_CHANNEL */ | 902 | /* Used by PRM_VC_CFG_CHANNEL */ |
887 | #define OMAP4430_RAC_VDD_CORE_L_SHIFT 2 | 903 | #define OMAP4430_RAC_VDD_CORE_L_SHIFT 2 |
888 | #define OMAP4430_RAC_VDD_CORE_L_MASK BITFIELD(2, 2) | 904 | #define OMAP4430_RAC_VDD_CORE_L_MASK (1 << 2) |
889 | 905 | ||
890 | /* Used by PRM_VC_CFG_CHANNEL */ | 906 | /* Used by PRM_VC_CFG_CHANNEL */ |
891 | #define OMAP4430_RAC_VDD_IVA_L_SHIFT 10 | 907 | #define OMAP4430_RAC_VDD_IVA_L_SHIFT 10 |
892 | #define OMAP4430_RAC_VDD_IVA_L_MASK BITFIELD(10, 10) | 908 | #define OMAP4430_RAC_VDD_IVA_L_MASK (1 << 10) |
893 | 909 | ||
894 | /* Used by PRM_VC_CFG_CHANNEL */ | 910 | /* Used by PRM_VC_CFG_CHANNEL */ |
895 | #define OMAP4430_RAC_VDD_MPU_L_SHIFT 19 | 911 | #define OMAP4430_RAC_VDD_MPU_L_SHIFT 19 |
896 | #define OMAP4430_RAC_VDD_MPU_L_MASK BITFIELD(19, 19) | 912 | #define OMAP4430_RAC_VDD_MPU_L_MASK (1 << 19) |
897 | 913 | ||
898 | /* | 914 | /* |
899 | * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP, | 915 | * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP, |
@@ -901,7 +917,7 @@ | |||
901 | * PRM_VOLTSETUP_MPU_RET_SLEEP | 917 | * PRM_VOLTSETUP_MPU_RET_SLEEP |
902 | */ | 918 | */ |
903 | #define OMAP4430_RAMP_DOWN_COUNT_SHIFT 16 | 919 | #define OMAP4430_RAMP_DOWN_COUNT_SHIFT 16 |
904 | #define OMAP4430_RAMP_DOWN_COUNT_MASK BITFIELD(16, 21) | 920 | #define OMAP4430_RAMP_DOWN_COUNT_MASK (0x3f << 16) |
905 | 921 | ||
906 | /* | 922 | /* |
907 | * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP, | 923 | * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP, |
@@ -909,7 +925,7 @@ | |||
909 | * PRM_VOLTSETUP_MPU_RET_SLEEP | 925 | * PRM_VOLTSETUP_MPU_RET_SLEEP |
910 | */ | 926 | */ |
911 | #define OMAP4430_RAMP_DOWN_PRESCAL_SHIFT 24 | 927 | #define OMAP4430_RAMP_DOWN_PRESCAL_SHIFT 24 |
912 | #define OMAP4430_RAMP_DOWN_PRESCAL_MASK BITFIELD(24, 25) | 928 | #define OMAP4430_RAMP_DOWN_PRESCAL_MASK (0x3 << 24) |
913 | 929 | ||
914 | /* | 930 | /* |
915 | * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP, | 931 | * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP, |
@@ -917,7 +933,7 @@ | |||
917 | * PRM_VOLTSETUP_MPU_RET_SLEEP | 933 | * PRM_VOLTSETUP_MPU_RET_SLEEP |
918 | */ | 934 | */ |
919 | #define OMAP4430_RAMP_UP_COUNT_SHIFT 0 | 935 | #define OMAP4430_RAMP_UP_COUNT_SHIFT 0 |
920 | #define OMAP4430_RAMP_UP_COUNT_MASK BITFIELD(0, 5) | 936 | #define OMAP4430_RAMP_UP_COUNT_MASK (0x3f << 0) |
921 | 937 | ||
922 | /* | 938 | /* |
923 | * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP, | 939 | * Used by PRM_VOLTSETUP_CORE_OFF, PRM_VOLTSETUP_CORE_RET_SLEEP, |
@@ -925,1281 +941,1381 @@ | |||
925 | * PRM_VOLTSETUP_MPU_RET_SLEEP | 941 | * PRM_VOLTSETUP_MPU_RET_SLEEP |
926 | */ | 942 | */ |
927 | #define OMAP4430_RAMP_UP_PRESCAL_SHIFT 8 | 943 | #define OMAP4430_RAMP_UP_PRESCAL_SHIFT 8 |
928 | #define OMAP4430_RAMP_UP_PRESCAL_MASK BITFIELD(8, 9) | 944 | #define OMAP4430_RAMP_UP_PRESCAL_MASK (0x3 << 8) |
929 | 945 | ||
930 | /* Used by PRM_VC_CFG_CHANNEL */ | 946 | /* Used by PRM_VC_CFG_CHANNEL */ |
931 | #define OMAP4430_RAV_VDD_CORE_L_SHIFT 1 | 947 | #define OMAP4430_RAV_VDD_CORE_L_SHIFT 1 |
932 | #define OMAP4430_RAV_VDD_CORE_L_MASK BITFIELD(1, 1) | 948 | #define OMAP4430_RAV_VDD_CORE_L_MASK (1 << 1) |
933 | 949 | ||
934 | /* Used by PRM_VC_CFG_CHANNEL */ | 950 | /* Used by PRM_VC_CFG_CHANNEL */ |
935 | #define OMAP4430_RAV_VDD_IVA_L_SHIFT 9 | 951 | #define OMAP4430_RAV_VDD_IVA_L_SHIFT 9 |
936 | #define OMAP4430_RAV_VDD_IVA_L_MASK BITFIELD(9, 9) | 952 | #define OMAP4430_RAV_VDD_IVA_L_MASK (1 << 9) |
937 | 953 | ||
938 | /* Used by PRM_VC_CFG_CHANNEL */ | 954 | /* Used by PRM_VC_CFG_CHANNEL */ |
939 | #define OMAP4430_RAV_VDD_MPU_L_SHIFT 18 | 955 | #define OMAP4430_RAV_VDD_MPU_L_SHIFT 18 |
940 | #define OMAP4430_RAV_VDD_MPU_L_MASK BITFIELD(18, 18) | 956 | #define OMAP4430_RAV_VDD_MPU_L_MASK (1 << 18) |
941 | 957 | ||
942 | /* Used by PRM_VC_VAL_BYPASS */ | 958 | /* Used by PRM_VC_VAL_BYPASS */ |
943 | #define OMAP4430_REGADDR_SHIFT 8 | 959 | #define OMAP4430_REGADDR_SHIFT 8 |
944 | #define OMAP4430_REGADDR_MASK BITFIELD(8, 15) | 960 | #define OMAP4430_REGADDR_MASK (0xff << 8) |
945 | 961 | ||
946 | /* | 962 | /* |
947 | * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L, | 963 | * Used by PRM_VC_VAL_CMD_VDD_CORE_L, PRM_VC_VAL_CMD_VDD_IVA_L, |
948 | * PRM_VC_VAL_CMD_VDD_MPU_L | 964 | * PRM_VC_VAL_CMD_VDD_MPU_L |
949 | */ | 965 | */ |
950 | #define OMAP4430_RET_SHIFT 8 | 966 | #define OMAP4430_RET_SHIFT 8 |
951 | #define OMAP4430_RET_MASK BITFIELD(8, 15) | 967 | #define OMAP4430_RET_MASK (0xff << 8) |
952 | 968 | ||
953 | /* Used by PM_L4PER_PWRSTCTRL */ | 969 | /* Used by PM_L4PER_PWRSTCTRL */ |
954 | #define OMAP4430_RETAINED_BANK_ONSTATE_SHIFT 16 | 970 | #define OMAP4430_RETAINED_BANK_ONSTATE_SHIFT 16 |
955 | #define OMAP4430_RETAINED_BANK_ONSTATE_MASK BITFIELD(16, 17) | 971 | #define OMAP4430_RETAINED_BANK_ONSTATE_MASK (0x3 << 16) |
956 | 972 | ||
957 | /* Used by PM_L4PER_PWRSTCTRL */ | 973 | /* Used by PM_L4PER_PWRSTCTRL */ |
958 | #define OMAP4430_RETAINED_BANK_RETSTATE_SHIFT 8 | 974 | #define OMAP4430_RETAINED_BANK_RETSTATE_SHIFT 8 |
959 | #define OMAP4430_RETAINED_BANK_RETSTATE_MASK BITFIELD(8, 8) | 975 | #define OMAP4430_RETAINED_BANK_RETSTATE_MASK (1 << 8) |
960 | 976 | ||
961 | /* Used by PM_L4PER_PWRSTST */ | 977 | /* Used by PM_L4PER_PWRSTST */ |
962 | #define OMAP4430_RETAINED_BANK_STATEST_SHIFT 4 | 978 | #define OMAP4430_RETAINED_BANK_STATEST_SHIFT 4 |
963 | #define OMAP4430_RETAINED_BANK_STATEST_MASK BITFIELD(4, 5) | 979 | #define OMAP4430_RETAINED_BANK_STATEST_MASK (0x3 << 4) |
964 | 980 | ||
965 | /* | 981 | /* |
966 | * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL, | 982 | * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL, |
967 | * PRM_LDO_SRAM_MPU_CTRL | 983 | * PRM_LDO_SRAM_MPU_CTRL |
968 | */ | 984 | */ |
969 | #define OMAP4430_RETMODE_ENABLE_SHIFT 0 | 985 | #define OMAP4430_RETMODE_ENABLE_SHIFT 0 |
970 | #define OMAP4430_RETMODE_ENABLE_MASK BITFIELD(0, 0) | 986 | #define OMAP4430_RETMODE_ENABLE_MASK (1 << 0) |
971 | 987 | ||
972 | /* Used by REVISION_PRM */ | 988 | /* Used by RM_DUCATI_RSTCTRL, RM_IVAHD_RSTCTRL, RM_TESLA_RSTCTRL */ |
973 | #define OMAP4430_REV_SHIFT 0 | ||
974 | #define OMAP4430_REV_MASK BITFIELD(0, 7) | ||
975 | |||
976 | /* Used by RM_DUCATI_RSTCTRL, RM_TESLA_RSTCTRL, RM_IVAHD_RSTCTRL */ | ||
977 | #define OMAP4430_RST1_SHIFT 0 | 989 | #define OMAP4430_RST1_SHIFT 0 |
978 | #define OMAP4430_RST1_MASK BITFIELD(0, 0) | 990 | #define OMAP4430_RST1_MASK (1 << 0) |
979 | 991 | ||
980 | /* Used by RM_DUCATI_RSTST, RM_TESLA_RSTST, RM_IVAHD_RSTST */ | 992 | /* Used by RM_DUCATI_RSTST, RM_IVAHD_RSTST, RM_TESLA_RSTST */ |
981 | #define OMAP4430_RST1ST_SHIFT 0 | 993 | #define OMAP4430_RST1ST_SHIFT 0 |
982 | #define OMAP4430_RST1ST_MASK BITFIELD(0, 0) | 994 | #define OMAP4430_RST1ST_MASK (1 << 0) |
983 | 995 | ||
984 | /* Used by RM_DUCATI_RSTCTRL, RM_TESLA_RSTCTRL, RM_IVAHD_RSTCTRL */ | 996 | /* Used by RM_DUCATI_RSTCTRL, RM_IVAHD_RSTCTRL, RM_TESLA_RSTCTRL */ |
985 | #define OMAP4430_RST2_SHIFT 1 | 997 | #define OMAP4430_RST2_SHIFT 1 |
986 | #define OMAP4430_RST2_MASK BITFIELD(1, 1) | 998 | #define OMAP4430_RST2_MASK (1 << 1) |
987 | 999 | ||
988 | /* Used by RM_DUCATI_RSTST, RM_TESLA_RSTST, RM_IVAHD_RSTST */ | 1000 | /* Used by RM_DUCATI_RSTST, RM_IVAHD_RSTST, RM_TESLA_RSTST */ |
989 | #define OMAP4430_RST2ST_SHIFT 1 | 1001 | #define OMAP4430_RST2ST_SHIFT 1 |
990 | #define OMAP4430_RST2ST_MASK BITFIELD(1, 1) | 1002 | #define OMAP4430_RST2ST_MASK (1 << 1) |
991 | 1003 | ||
992 | /* Used by RM_DUCATI_RSTCTRL, RM_IVAHD_RSTCTRL */ | 1004 | /* Used by RM_DUCATI_RSTCTRL, RM_IVAHD_RSTCTRL */ |
993 | #define OMAP4430_RST3_SHIFT 2 | 1005 | #define OMAP4430_RST3_SHIFT 2 |
994 | #define OMAP4430_RST3_MASK BITFIELD(2, 2) | 1006 | #define OMAP4430_RST3_MASK (1 << 2) |
995 | 1007 | ||
996 | /* Used by RM_DUCATI_RSTST, RM_IVAHD_RSTST */ | 1008 | /* Used by RM_DUCATI_RSTST, RM_IVAHD_RSTST */ |
997 | #define OMAP4430_RST3ST_SHIFT 2 | 1009 | #define OMAP4430_RST3ST_SHIFT 2 |
998 | #define OMAP4430_RST3ST_MASK BITFIELD(2, 2) | 1010 | #define OMAP4430_RST3ST_MASK (1 << 2) |
999 | 1011 | ||
1000 | /* Used by PRM_RSTTIME */ | 1012 | /* Used by PRM_RSTTIME */ |
1001 | #define OMAP4430_RSTTIME1_SHIFT 0 | 1013 | #define OMAP4430_RSTTIME1_SHIFT 0 |
1002 | #define OMAP4430_RSTTIME1_MASK BITFIELD(0, 9) | 1014 | #define OMAP4430_RSTTIME1_MASK (0x3ff << 0) |
1003 | 1015 | ||
1004 | /* Used by PRM_RSTTIME */ | 1016 | /* Used by PRM_RSTTIME */ |
1005 | #define OMAP4430_RSTTIME2_SHIFT 10 | 1017 | #define OMAP4430_RSTTIME2_SHIFT 10 |
1006 | #define OMAP4430_RSTTIME2_MASK BITFIELD(10, 14) | 1018 | #define OMAP4430_RSTTIME2_MASK (0x1f << 10) |
1007 | 1019 | ||
1008 | /* Used by PRM_RSTCTRL */ | 1020 | /* Used by PRM_RSTCTRL */ |
1009 | #define OMAP4430_RST_GLOBAL_COLD_SW_SHIFT 1 | 1021 | #define OMAP4430_RST_GLOBAL_COLD_SW_SHIFT 1 |
1010 | #define OMAP4430_RST_GLOBAL_COLD_SW_MASK BITFIELD(1, 1) | 1022 | #define OMAP4430_RST_GLOBAL_COLD_SW_MASK (1 << 1) |
1011 | 1023 | ||
1012 | /* Used by PRM_RSTCTRL */ | 1024 | /* Used by PRM_RSTCTRL */ |
1013 | #define OMAP4430_RST_GLOBAL_WARM_SW_SHIFT 0 | 1025 | #define OMAP4430_RST_GLOBAL_WARM_SW_SHIFT 0 |
1014 | #define OMAP4430_RST_GLOBAL_WARM_SW_MASK BITFIELD(0, 0) | 1026 | #define OMAP4430_RST_GLOBAL_WARM_SW_MASK (1 << 0) |
1027 | |||
1028 | /* Used by REVISION_PRM */ | ||
1029 | #define OMAP4430_R_RTL_SHIFT 11 | ||
1030 | #define OMAP4430_R_RTL_MASK (0x1f << 11) | ||
1015 | 1031 | ||
1016 | /* Used by PRM_VC_CFG_CHANNEL */ | 1032 | /* Used by PRM_VC_CFG_CHANNEL */ |
1017 | #define OMAP4430_SA_VDD_CORE_L_SHIFT 0 | 1033 | #define OMAP4430_SA_VDD_CORE_L_SHIFT 0 |
1018 | #define OMAP4430_SA_VDD_CORE_L_MASK BITFIELD(0, 0) | 1034 | #define OMAP4430_SA_VDD_CORE_L_MASK (1 << 0) |
1019 | 1035 | ||
1020 | /* Renamed from SA_VDD_CORE_L Used by PRM_VC_SMPS_SA */ | 1036 | /* Renamed from SA_VDD_CORE_L Used by PRM_VC_SMPS_SA */ |
1021 | #define OMAP4430_SA_VDD_CORE_L_0_6_SHIFT 0 | 1037 | #define OMAP4430_SA_VDD_CORE_L_0_6_SHIFT 0 |
1022 | #define OMAP4430_SA_VDD_CORE_L_0_6_MASK BITFIELD(0, 6) | 1038 | #define OMAP4430_SA_VDD_CORE_L_0_6_MASK (0x7f << 0) |
1023 | 1039 | ||
1024 | /* Used by PRM_VC_CFG_CHANNEL */ | 1040 | /* Used by PRM_VC_CFG_CHANNEL */ |
1025 | #define OMAP4430_SA_VDD_IVA_L_SHIFT 8 | 1041 | #define OMAP4430_SA_VDD_IVA_L_SHIFT 8 |
1026 | #define OMAP4430_SA_VDD_IVA_L_MASK BITFIELD(8, 8) | 1042 | #define OMAP4430_SA_VDD_IVA_L_MASK (1 << 8) |
1027 | 1043 | ||
1028 | /* Renamed from SA_VDD_IVA_L Used by PRM_VC_SMPS_SA */ | 1044 | /* Renamed from SA_VDD_IVA_L Used by PRM_VC_SMPS_SA */ |
1029 | #define OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_SHIFT 8 | 1045 | #define OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_SHIFT 8 |
1030 | #define OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_MASK BITFIELD(8, 14) | 1046 | #define OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_MASK (0x7f << 8) |
1031 | 1047 | ||
1032 | /* Used by PRM_VC_CFG_CHANNEL */ | 1048 | /* Used by PRM_VC_CFG_CHANNEL */ |
1033 | #define OMAP4430_SA_VDD_MPU_L_SHIFT 16 | 1049 | #define OMAP4430_SA_VDD_MPU_L_SHIFT 16 |
1034 | #define OMAP4430_SA_VDD_MPU_L_MASK BITFIELD(16, 16) | 1050 | #define OMAP4430_SA_VDD_MPU_L_MASK (1 << 16) |
1035 | 1051 | ||
1036 | /* Renamed from SA_VDD_MPU_L Used by PRM_VC_SMPS_SA */ | 1052 | /* Renamed from SA_VDD_MPU_L Used by PRM_VC_SMPS_SA */ |
1037 | #define OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_SHIFT 16 | 1053 | #define OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_SHIFT 16 |
1038 | #define OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_MASK BITFIELD(16, 22) | 1054 | #define OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_MASK (0x7f << 16) |
1055 | |||
1056 | /* Used by REVISION_PRM */ | ||
1057 | #define OMAP4430_SCHEME_SHIFT 30 | ||
1058 | #define OMAP4430_SCHEME_MASK (0x3 << 30) | ||
1039 | 1059 | ||
1040 | /* Used by PRM_VC_CFG_I2C_CLK */ | 1060 | /* Used by PRM_VC_CFG_I2C_CLK */ |
1041 | #define OMAP4430_SCLH_SHIFT 0 | 1061 | #define OMAP4430_SCLH_SHIFT 0 |
1042 | #define OMAP4430_SCLH_MASK BITFIELD(0, 7) | 1062 | #define OMAP4430_SCLH_MASK (0xff << 0) |
1043 | 1063 | ||
1044 | /* Used by PRM_VC_CFG_I2C_CLK */ | 1064 | /* Used by PRM_VC_CFG_I2C_CLK */ |
1045 | #define OMAP4430_SCLL_SHIFT 8 | 1065 | #define OMAP4430_SCLL_SHIFT 8 |
1046 | #define OMAP4430_SCLL_MASK BITFIELD(8, 15) | 1066 | #define OMAP4430_SCLL_MASK (0xff << 8) |
1047 | 1067 | ||
1048 | /* Used by PRM_RSTST */ | 1068 | /* Used by PRM_RSTST */ |
1049 | #define OMAP4430_SECURE_WDT_RST_SHIFT 4 | 1069 | #define OMAP4430_SECURE_WDT_RST_SHIFT 4 |
1050 | #define OMAP4430_SECURE_WDT_RST_MASK BITFIELD(4, 4) | 1070 | #define OMAP4430_SECURE_WDT_RST_MASK (1 << 4) |
1051 | 1071 | ||
1052 | /* Used by PM_IVAHD_PWRSTCTRL */ | 1072 | /* Used by PM_IVAHD_PWRSTCTRL */ |
1053 | #define OMAP4430_SL2_MEM_ONSTATE_SHIFT 18 | 1073 | #define OMAP4430_SL2_MEM_ONSTATE_SHIFT 18 |
1054 | #define OMAP4430_SL2_MEM_ONSTATE_MASK BITFIELD(18, 19) | 1074 | #define OMAP4430_SL2_MEM_ONSTATE_MASK (0x3 << 18) |
1055 | 1075 | ||
1056 | /* Used by PM_IVAHD_PWRSTCTRL */ | 1076 | /* Used by PM_IVAHD_PWRSTCTRL */ |
1057 | #define OMAP4430_SL2_MEM_RETSTATE_SHIFT 9 | 1077 | #define OMAP4430_SL2_MEM_RETSTATE_SHIFT 9 |
1058 | #define OMAP4430_SL2_MEM_RETSTATE_MASK BITFIELD(9, 9) | 1078 | #define OMAP4430_SL2_MEM_RETSTATE_MASK (1 << 9) |
1059 | 1079 | ||
1060 | /* Used by PM_IVAHD_PWRSTST */ | 1080 | /* Used by PM_IVAHD_PWRSTST */ |
1061 | #define OMAP4430_SL2_MEM_STATEST_SHIFT 6 | 1081 | #define OMAP4430_SL2_MEM_STATEST_SHIFT 6 |
1062 | #define OMAP4430_SL2_MEM_STATEST_MASK BITFIELD(6, 7) | 1082 | #define OMAP4430_SL2_MEM_STATEST_MASK (0x3 << 6) |
1063 | 1083 | ||
1064 | /* Used by PRM_VC_VAL_BYPASS */ | 1084 | /* Used by PRM_VC_VAL_BYPASS */ |
1065 | #define OMAP4430_SLAVEADDR_SHIFT 0 | 1085 | #define OMAP4430_SLAVEADDR_SHIFT 0 |
1066 | #define OMAP4430_SLAVEADDR_MASK BITFIELD(0, 6) | 1086 | #define OMAP4430_SLAVEADDR_MASK (0x7f << 0) |
1067 | 1087 | ||
1068 | /* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */ | 1088 | /* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */ |
1069 | #define OMAP4430_SLEEP_RBB_SEL_SHIFT 3 | 1089 | #define OMAP4430_SLEEP_RBB_SEL_SHIFT 3 |
1070 | #define OMAP4430_SLEEP_RBB_SEL_MASK BITFIELD(3, 3) | 1090 | #define OMAP4430_SLEEP_RBB_SEL_MASK (1 << 3) |
1071 | 1091 | ||
1072 | /* Used by PRM_SRAM_COUNT */ | 1092 | /* Used by PRM_SRAM_COUNT */ |
1073 | #define OMAP4430_SLPCNT_VALUE_SHIFT 16 | 1093 | #define OMAP4430_SLPCNT_VALUE_SHIFT 16 |
1074 | #define OMAP4430_SLPCNT_VALUE_MASK BITFIELD(16, 23) | 1094 | #define OMAP4430_SLPCNT_VALUE_MASK (0xff << 16) |
1075 | 1095 | ||
1076 | /* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_IVA_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */ | 1096 | /* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_IVA_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */ |
1077 | #define OMAP4430_SMPSWAITTIMEMAX_SHIFT 8 | 1097 | #define OMAP4430_SMPSWAITTIMEMAX_SHIFT 8 |
1078 | #define OMAP4430_SMPSWAITTIMEMAX_MASK BITFIELD(8, 23) | 1098 | #define OMAP4430_SMPSWAITTIMEMAX_MASK (0xffff << 8) |
1079 | 1099 | ||
1080 | /* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_IVA_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */ | 1100 | /* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_IVA_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */ |
1081 | #define OMAP4430_SMPSWAITTIMEMIN_SHIFT 8 | 1101 | #define OMAP4430_SMPSWAITTIMEMIN_SHIFT 8 |
1082 | #define OMAP4430_SMPSWAITTIMEMIN_MASK BITFIELD(8, 23) | 1102 | #define OMAP4430_SMPSWAITTIMEMIN_MASK (0xffff << 8) |
1103 | |||
1104 | /* Used by PRM_VC_ERRST */ | ||
1105 | #define OMAP4430_SMPS_RA_ERR_CORE_SHIFT 1 | ||
1106 | #define OMAP4430_SMPS_RA_ERR_CORE_MASK (1 << 1) | ||
1107 | |||
1108 | /* Used by PRM_VC_ERRST */ | ||
1109 | #define OMAP4430_SMPS_RA_ERR_IVA_SHIFT 9 | ||
1110 | #define OMAP4430_SMPS_RA_ERR_IVA_MASK (1 << 9) | ||
1111 | |||
1112 | /* Used by PRM_VC_ERRST */ | ||
1113 | #define OMAP4430_SMPS_RA_ERR_MPU_SHIFT 17 | ||
1114 | #define OMAP4430_SMPS_RA_ERR_MPU_MASK (1 << 17) | ||
1115 | |||
1116 | /* Used by PRM_VC_ERRST */ | ||
1117 | #define OMAP4430_SMPS_SA_ERR_CORE_SHIFT 0 | ||
1118 | #define OMAP4430_SMPS_SA_ERR_CORE_MASK (1 << 0) | ||
1119 | |||
1120 | /* Used by PRM_VC_ERRST */ | ||
1121 | #define OMAP4430_SMPS_SA_ERR_IVA_SHIFT 8 | ||
1122 | #define OMAP4430_SMPS_SA_ERR_IVA_MASK (1 << 8) | ||
1123 | |||
1124 | /* Used by PRM_VC_ERRST */ | ||
1125 | #define OMAP4430_SMPS_SA_ERR_MPU_SHIFT 16 | ||
1126 | #define OMAP4430_SMPS_SA_ERR_MPU_MASK (1 << 16) | ||
1127 | |||
1128 | /* Used by PRM_VC_ERRST */ | ||
1129 | #define OMAP4430_SMPS_TIMEOUT_ERR_CORE_SHIFT 2 | ||
1130 | #define OMAP4430_SMPS_TIMEOUT_ERR_CORE_MASK (1 << 2) | ||
1131 | |||
1132 | /* Used by PRM_VC_ERRST */ | ||
1133 | #define OMAP4430_SMPS_TIMEOUT_ERR_IVA_SHIFT 10 | ||
1134 | #define OMAP4430_SMPS_TIMEOUT_ERR_IVA_MASK (1 << 10) | ||
1135 | |||
1136 | /* Used by PRM_VC_ERRST */ | ||
1137 | #define OMAP4430_SMPS_TIMEOUT_ERR_MPU_SHIFT 18 | ||
1138 | #define OMAP4430_SMPS_TIMEOUT_ERR_MPU_MASK (1 << 18) | ||
1083 | 1139 | ||
1084 | /* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */ | 1140 | /* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */ |
1085 | #define OMAP4430_SR2EN_SHIFT 0 | 1141 | #define OMAP4430_SR2EN_SHIFT 0 |
1086 | #define OMAP4430_SR2EN_MASK BITFIELD(0, 0) | 1142 | #define OMAP4430_SR2EN_MASK (1 << 0) |
1087 | 1143 | ||
1088 | /* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */ | 1144 | /* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */ |
1089 | #define OMAP4430_SR2_IN_TRANSITION_SHIFT 6 | 1145 | #define OMAP4430_SR2_IN_TRANSITION_SHIFT 6 |
1090 | #define OMAP4430_SR2_IN_TRANSITION_MASK BITFIELD(6, 6) | 1146 | #define OMAP4430_SR2_IN_TRANSITION_MASK (1 << 6) |
1091 | 1147 | ||
1092 | /* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */ | 1148 | /* Used by PRM_LDO_ABB_IVA_CTRL, PRM_LDO_ABB_MPU_CTRL */ |
1093 | #define OMAP4430_SR2_STATUS_SHIFT 3 | 1149 | #define OMAP4430_SR2_STATUS_SHIFT 3 |
1094 | #define OMAP4430_SR2_STATUS_MASK BITFIELD(3, 4) | 1150 | #define OMAP4430_SR2_STATUS_MASK (0x3 << 3) |
1095 | 1151 | ||
1096 | /* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */ | 1152 | /* Used by PRM_LDO_ABB_IVA_SETUP, PRM_LDO_ABB_MPU_SETUP */ |
1097 | #define OMAP4430_SR2_WTCNT_VALUE_SHIFT 8 | 1153 | #define OMAP4430_SR2_WTCNT_VALUE_SHIFT 8 |
1098 | #define OMAP4430_SR2_WTCNT_VALUE_MASK BITFIELD(8, 15) | 1154 | #define OMAP4430_SR2_WTCNT_VALUE_MASK (0xff << 8) |
1099 | 1155 | ||
1100 | /* | 1156 | /* |
1101 | * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL, | 1157 | * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL, |
1102 | * PRM_LDO_SRAM_MPU_CTRL | 1158 | * PRM_LDO_SRAM_MPU_CTRL |
1103 | */ | 1159 | */ |
1104 | #define OMAP4430_SRAMLDO_STATUS_SHIFT 8 | 1160 | #define OMAP4430_SRAMLDO_STATUS_SHIFT 8 |
1105 | #define OMAP4430_SRAMLDO_STATUS_MASK BITFIELD(8, 8) | 1161 | #define OMAP4430_SRAMLDO_STATUS_MASK (1 << 8) |
1106 | 1162 | ||
1107 | /* | 1163 | /* |
1108 | * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL, | 1164 | * Used by PRM_LDO_SRAM_CORE_CTRL, PRM_LDO_SRAM_IVA_CTRL, |
1109 | * PRM_LDO_SRAM_MPU_CTRL | 1165 | * PRM_LDO_SRAM_MPU_CTRL |
1110 | */ | 1166 | */ |
1111 | #define OMAP4430_SRAM_IN_TRANSITION_SHIFT 9 | 1167 | #define OMAP4430_SRAM_IN_TRANSITION_SHIFT 9 |
1112 | #define OMAP4430_SRAM_IN_TRANSITION_MASK BITFIELD(9, 9) | 1168 | #define OMAP4430_SRAM_IN_TRANSITION_MASK (1 << 9) |
1113 | 1169 | ||
1114 | /* Used by PRM_VC_CFG_I2C_MODE */ | 1170 | /* Used by PRM_VC_CFG_I2C_MODE */ |
1115 | #define OMAP4430_SRMODEEN_SHIFT 4 | 1171 | #define OMAP4430_SRMODEEN_SHIFT 4 |
1116 | #define OMAP4430_SRMODEEN_MASK BITFIELD(4, 4) | 1172 | #define OMAP4430_SRMODEEN_MASK (1 << 4) |
1117 | 1173 | ||
1118 | /* Used by PRM_VOLTSETUP_WARMRESET */ | 1174 | /* Used by PRM_VOLTSETUP_WARMRESET */ |
1119 | #define OMAP4430_STABLE_COUNT_SHIFT 0 | 1175 | #define OMAP4430_STABLE_COUNT_SHIFT 0 |
1120 | #define OMAP4430_STABLE_COUNT_MASK BITFIELD(0, 5) | 1176 | #define OMAP4430_STABLE_COUNT_MASK (0x3f << 0) |
1121 | 1177 | ||
1122 | /* Used by PRM_VOLTSETUP_WARMRESET */ | 1178 | /* Used by PRM_VOLTSETUP_WARMRESET */ |
1123 | #define OMAP4430_STABLE_PRESCAL_SHIFT 8 | 1179 | #define OMAP4430_STABLE_PRESCAL_SHIFT 8 |
1124 | #define OMAP4430_STABLE_PRESCAL_MASK BITFIELD(8, 9) | 1180 | #define OMAP4430_STABLE_PRESCAL_MASK (0x3 << 8) |
1181 | |||
1182 | /* Used by PRM_LDO_BANDGAP_SETUP */ | ||
1183 | #define OMAP4430_STARTUP_COUNT_SHIFT 0 | ||
1184 | #define OMAP4430_STARTUP_COUNT_MASK (0xff << 0) | ||
1185 | |||
1186 | /* Renamed from STARTUP_COUNT Used by PRM_SRAM_COUNT */ | ||
1187 | #define OMAP4430_STARTUP_COUNT_24_31_SHIFT 24 | ||
1188 | #define OMAP4430_STARTUP_COUNT_24_31_MASK (0xff << 24) | ||
1125 | 1189 | ||
1126 | /* Used by PM_IVAHD_PWRSTCTRL */ | 1190 | /* Used by PM_IVAHD_PWRSTCTRL */ |
1127 | #define OMAP4430_TCM1_MEM_ONSTATE_SHIFT 20 | 1191 | #define OMAP4430_TCM1_MEM_ONSTATE_SHIFT 20 |
1128 | #define OMAP4430_TCM1_MEM_ONSTATE_MASK BITFIELD(20, 21) | 1192 | #define OMAP4430_TCM1_MEM_ONSTATE_MASK (0x3 << 20) |
1129 | 1193 | ||
1130 | /* Used by PM_IVAHD_PWRSTCTRL */ | 1194 | /* Used by PM_IVAHD_PWRSTCTRL */ |
1131 | #define OMAP4430_TCM1_MEM_RETSTATE_SHIFT 10 | 1195 | #define OMAP4430_TCM1_MEM_RETSTATE_SHIFT 10 |
1132 | #define OMAP4430_TCM1_MEM_RETSTATE_MASK BITFIELD(10, 10) | 1196 | #define OMAP4430_TCM1_MEM_RETSTATE_MASK (1 << 10) |
1133 | 1197 | ||
1134 | /* Used by PM_IVAHD_PWRSTST */ | 1198 | /* Used by PM_IVAHD_PWRSTST */ |
1135 | #define OMAP4430_TCM1_MEM_STATEST_SHIFT 8 | 1199 | #define OMAP4430_TCM1_MEM_STATEST_SHIFT 8 |
1136 | #define OMAP4430_TCM1_MEM_STATEST_MASK BITFIELD(8, 9) | 1200 | #define OMAP4430_TCM1_MEM_STATEST_MASK (0x3 << 8) |
1137 | 1201 | ||
1138 | /* Used by PM_IVAHD_PWRSTCTRL */ | 1202 | /* Used by PM_IVAHD_PWRSTCTRL */ |
1139 | #define OMAP4430_TCM2_MEM_ONSTATE_SHIFT 22 | 1203 | #define OMAP4430_TCM2_MEM_ONSTATE_SHIFT 22 |
1140 | #define OMAP4430_TCM2_MEM_ONSTATE_MASK BITFIELD(22, 23) | 1204 | #define OMAP4430_TCM2_MEM_ONSTATE_MASK (0x3 << 22) |
1141 | 1205 | ||
1142 | /* Used by PM_IVAHD_PWRSTCTRL */ | 1206 | /* Used by PM_IVAHD_PWRSTCTRL */ |
1143 | #define OMAP4430_TCM2_MEM_RETSTATE_SHIFT 11 | 1207 | #define OMAP4430_TCM2_MEM_RETSTATE_SHIFT 11 |
1144 | #define OMAP4430_TCM2_MEM_RETSTATE_MASK BITFIELD(11, 11) | 1208 | #define OMAP4430_TCM2_MEM_RETSTATE_MASK (1 << 11) |
1145 | 1209 | ||
1146 | /* Used by PM_IVAHD_PWRSTST */ | 1210 | /* Used by PM_IVAHD_PWRSTST */ |
1147 | #define OMAP4430_TCM2_MEM_STATEST_SHIFT 10 | 1211 | #define OMAP4430_TCM2_MEM_STATEST_SHIFT 10 |
1148 | #define OMAP4430_TCM2_MEM_STATEST_MASK BITFIELD(10, 11) | 1212 | #define OMAP4430_TCM2_MEM_STATEST_MASK (0x3 << 10) |
1149 | 1213 | ||
1150 | /* Used by RM_TESLA_RSTST */ | 1214 | /* Used by RM_TESLA_RSTST */ |
1151 | #define OMAP4430_TESLASS_EMU_RSTST_SHIFT 2 | 1215 | #define OMAP4430_TESLASS_EMU_RSTST_SHIFT 2 |
1152 | #define OMAP4430_TESLASS_EMU_RSTST_MASK BITFIELD(2, 2) | 1216 | #define OMAP4430_TESLASS_EMU_RSTST_MASK (1 << 2) |
1153 | 1217 | ||
1154 | /* Used by RM_TESLA_RSTST */ | 1218 | /* Used by RM_TESLA_RSTST */ |
1155 | #define OMAP4430_TESLA_DSP_EMU_REQ_RSTST_SHIFT 3 | 1219 | #define OMAP4430_TESLA_DSP_EMU_REQ_RSTST_SHIFT 3 |
1156 | #define OMAP4430_TESLA_DSP_EMU_REQ_RSTST_MASK BITFIELD(3, 3) | 1220 | #define OMAP4430_TESLA_DSP_EMU_REQ_RSTST_MASK (1 << 3) |
1157 | 1221 | ||
1158 | /* Used by PM_TESLA_PWRSTCTRL */ | 1222 | /* Used by PM_TESLA_PWRSTCTRL */ |
1159 | #define OMAP4430_TESLA_EDMA_ONSTATE_SHIFT 20 | 1223 | #define OMAP4430_TESLA_EDMA_ONSTATE_SHIFT 20 |
1160 | #define OMAP4430_TESLA_EDMA_ONSTATE_MASK BITFIELD(20, 21) | 1224 | #define OMAP4430_TESLA_EDMA_ONSTATE_MASK (0x3 << 20) |
1161 | 1225 | ||
1162 | /* Used by PM_TESLA_PWRSTCTRL */ | 1226 | /* Used by PM_TESLA_PWRSTCTRL */ |
1163 | #define OMAP4430_TESLA_EDMA_RETSTATE_SHIFT 10 | 1227 | #define OMAP4430_TESLA_EDMA_RETSTATE_SHIFT 10 |
1164 | #define OMAP4430_TESLA_EDMA_RETSTATE_MASK BITFIELD(10, 10) | 1228 | #define OMAP4430_TESLA_EDMA_RETSTATE_MASK (1 << 10) |
1165 | 1229 | ||
1166 | /* Used by PM_TESLA_PWRSTST */ | 1230 | /* Used by PM_TESLA_PWRSTST */ |
1167 | #define OMAP4430_TESLA_EDMA_STATEST_SHIFT 8 | 1231 | #define OMAP4430_TESLA_EDMA_STATEST_SHIFT 8 |
1168 | #define OMAP4430_TESLA_EDMA_STATEST_MASK BITFIELD(8, 9) | 1232 | #define OMAP4430_TESLA_EDMA_STATEST_MASK (0x3 << 8) |
1169 | 1233 | ||
1170 | /* Used by PM_TESLA_PWRSTCTRL */ | 1234 | /* Used by PM_TESLA_PWRSTCTRL */ |
1171 | #define OMAP4430_TESLA_L1_ONSTATE_SHIFT 16 | 1235 | #define OMAP4430_TESLA_L1_ONSTATE_SHIFT 16 |
1172 | #define OMAP4430_TESLA_L1_ONSTATE_MASK BITFIELD(16, 17) | 1236 | #define OMAP4430_TESLA_L1_ONSTATE_MASK (0x3 << 16) |
1173 | 1237 | ||
1174 | /* Used by PM_TESLA_PWRSTCTRL */ | 1238 | /* Used by PM_TESLA_PWRSTCTRL */ |
1175 | #define OMAP4430_TESLA_L1_RETSTATE_SHIFT 8 | 1239 | #define OMAP4430_TESLA_L1_RETSTATE_SHIFT 8 |
1176 | #define OMAP4430_TESLA_L1_RETSTATE_MASK BITFIELD(8, 8) | 1240 | #define OMAP4430_TESLA_L1_RETSTATE_MASK (1 << 8) |
1177 | 1241 | ||
1178 | /* Used by PM_TESLA_PWRSTST */ | 1242 | /* Used by PM_TESLA_PWRSTST */ |
1179 | #define OMAP4430_TESLA_L1_STATEST_SHIFT 4 | 1243 | #define OMAP4430_TESLA_L1_STATEST_SHIFT 4 |
1180 | #define OMAP4430_TESLA_L1_STATEST_MASK BITFIELD(4, 5) | 1244 | #define OMAP4430_TESLA_L1_STATEST_MASK (0x3 << 4) |
1181 | 1245 | ||
1182 | /* Used by PM_TESLA_PWRSTCTRL */ | 1246 | /* Used by PM_TESLA_PWRSTCTRL */ |
1183 | #define OMAP4430_TESLA_L2_ONSTATE_SHIFT 18 | 1247 | #define OMAP4430_TESLA_L2_ONSTATE_SHIFT 18 |
1184 | #define OMAP4430_TESLA_L2_ONSTATE_MASK BITFIELD(18, 19) | 1248 | #define OMAP4430_TESLA_L2_ONSTATE_MASK (0x3 << 18) |
1185 | 1249 | ||
1186 | /* Used by PM_TESLA_PWRSTCTRL */ | 1250 | /* Used by PM_TESLA_PWRSTCTRL */ |
1187 | #define OMAP4430_TESLA_L2_RETSTATE_SHIFT 9 | 1251 | #define OMAP4430_TESLA_L2_RETSTATE_SHIFT 9 |
1188 | #define OMAP4430_TESLA_L2_RETSTATE_MASK BITFIELD(9, 9) | 1252 | #define OMAP4430_TESLA_L2_RETSTATE_MASK (1 << 9) |
1189 | 1253 | ||
1190 | /* Used by PM_TESLA_PWRSTST */ | 1254 | /* Used by PM_TESLA_PWRSTST */ |
1191 | #define OMAP4430_TESLA_L2_STATEST_SHIFT 6 | 1255 | #define OMAP4430_TESLA_L2_STATEST_SHIFT 6 |
1192 | #define OMAP4430_TESLA_L2_STATEST_MASK BITFIELD(6, 7) | 1256 | #define OMAP4430_TESLA_L2_STATEST_MASK (0x3 << 6) |
1193 | 1257 | ||
1194 | /* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */ | 1258 | /* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */ |
1195 | #define OMAP4430_TIMEOUT_SHIFT 0 | 1259 | #define OMAP4430_TIMEOUT_SHIFT 0 |
1196 | #define OMAP4430_TIMEOUT_MASK BITFIELD(0, 15) | 1260 | #define OMAP4430_TIMEOUT_MASK (0xffff << 0) |
1197 | 1261 | ||
1198 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ | 1262 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ |
1199 | #define OMAP4430_TIMEOUTEN_SHIFT 3 | 1263 | #define OMAP4430_TIMEOUTEN_SHIFT 3 |
1200 | #define OMAP4430_TIMEOUTEN_MASK BITFIELD(3, 3) | 1264 | #define OMAP4430_TIMEOUTEN_MASK (1 << 3) |
1201 | 1265 | ||
1202 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1266 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1203 | #define OMAP4430_TRANSITION_EN_SHIFT 8 | 1267 | #define OMAP4430_TRANSITION_EN_SHIFT 8 |
1204 | #define OMAP4430_TRANSITION_EN_MASK BITFIELD(8, 8) | 1268 | #define OMAP4430_TRANSITION_EN_MASK (1 << 8) |
1205 | 1269 | ||
1206 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1270 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1207 | #define OMAP4430_TRANSITION_ST_SHIFT 8 | 1271 | #define OMAP4430_TRANSITION_ST_SHIFT 8 |
1208 | #define OMAP4430_TRANSITION_ST_MASK BITFIELD(8, 8) | 1272 | #define OMAP4430_TRANSITION_ST_MASK (1 << 8) |
1209 | 1273 | ||
1210 | /* Used by PRM_VC_VAL_BYPASS */ | 1274 | /* Used by PRM_VC_VAL_BYPASS */ |
1211 | #define OMAP4430_VALID_SHIFT 24 | 1275 | #define OMAP4430_VALID_SHIFT 24 |
1212 | #define OMAP4430_VALID_MASK BITFIELD(24, 24) | 1276 | #define OMAP4430_VALID_MASK (1 << 24) |
1213 | 1277 | ||
1214 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1278 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1215 | #define OMAP4430_VC_BYPASSACK_EN_SHIFT 14 | 1279 | #define OMAP4430_VC_BYPASSACK_EN_SHIFT 14 |
1216 | #define OMAP4430_VC_BYPASSACK_EN_MASK BITFIELD(14, 14) | 1280 | #define OMAP4430_VC_BYPASSACK_EN_MASK (1 << 14) |
1217 | 1281 | ||
1218 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1282 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1219 | #define OMAP4430_VC_BYPASSACK_ST_SHIFT 14 | 1283 | #define OMAP4430_VC_BYPASSACK_ST_SHIFT 14 |
1220 | #define OMAP4430_VC_BYPASSACK_ST_MASK BITFIELD(14, 14) | 1284 | #define OMAP4430_VC_BYPASSACK_ST_MASK (1 << 14) |
1285 | |||
1286 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | ||
1287 | #define OMAP4430_VC_CORE_VPACK_EN_SHIFT 22 | ||
1288 | #define OMAP4430_VC_CORE_VPACK_EN_MASK (1 << 22) | ||
1289 | |||
1290 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | ||
1291 | #define OMAP4430_VC_CORE_VPACK_ST_SHIFT 22 | ||
1292 | #define OMAP4430_VC_CORE_VPACK_ST_MASK (1 << 22) | ||
1221 | 1293 | ||
1222 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1294 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1223 | #define OMAP4430_VC_IVA_VPACK_EN_SHIFT 30 | 1295 | #define OMAP4430_VC_IVA_VPACK_EN_SHIFT 30 |
1224 | #define OMAP4430_VC_IVA_VPACK_EN_MASK BITFIELD(30, 30) | 1296 | #define OMAP4430_VC_IVA_VPACK_EN_MASK (1 << 30) |
1225 | 1297 | ||
1226 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1298 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1227 | #define OMAP4430_VC_IVA_VPACK_ST_SHIFT 30 | 1299 | #define OMAP4430_VC_IVA_VPACK_ST_SHIFT 30 |
1228 | #define OMAP4430_VC_IVA_VPACK_ST_MASK BITFIELD(30, 30) | 1300 | #define OMAP4430_VC_IVA_VPACK_ST_MASK (1 << 30) |
1229 | 1301 | ||
1230 | /* Used by PRM_IRQENABLE_MPU_2 */ | 1302 | /* Used by PRM_IRQENABLE_MPU_2 */ |
1231 | #define OMAP4430_VC_MPU_VPACK_EN_SHIFT 6 | 1303 | #define OMAP4430_VC_MPU_VPACK_EN_SHIFT 6 |
1232 | #define OMAP4430_VC_MPU_VPACK_EN_MASK BITFIELD(6, 6) | 1304 | #define OMAP4430_VC_MPU_VPACK_EN_MASK (1 << 6) |
1233 | 1305 | ||
1234 | /* Used by PRM_IRQSTATUS_MPU_2 */ | 1306 | /* Used by PRM_IRQSTATUS_MPU_2 */ |
1235 | #define OMAP4430_VC_MPU_VPACK_ST_SHIFT 6 | 1307 | #define OMAP4430_VC_MPU_VPACK_ST_SHIFT 6 |
1236 | #define OMAP4430_VC_MPU_VPACK_ST_MASK BITFIELD(6, 6) | 1308 | #define OMAP4430_VC_MPU_VPACK_ST_MASK (1 << 6) |
1237 | 1309 | ||
1238 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1310 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1239 | #define OMAP4430_VC_RAERR_EN_SHIFT 12 | 1311 | #define OMAP4430_VC_RAERR_EN_SHIFT 12 |
1240 | #define OMAP4430_VC_RAERR_EN_MASK BITFIELD(12, 12) | 1312 | #define OMAP4430_VC_RAERR_EN_MASK (1 << 12) |
1241 | 1313 | ||
1242 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1314 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1243 | #define OMAP4430_VC_RAERR_ST_SHIFT 12 | 1315 | #define OMAP4430_VC_RAERR_ST_SHIFT 12 |
1244 | #define OMAP4430_VC_RAERR_ST_MASK BITFIELD(12, 12) | 1316 | #define OMAP4430_VC_RAERR_ST_MASK (1 << 12) |
1245 | 1317 | ||
1246 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1318 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1247 | #define OMAP4430_VC_SAERR_EN_SHIFT 11 | 1319 | #define OMAP4430_VC_SAERR_EN_SHIFT 11 |
1248 | #define OMAP4430_VC_SAERR_EN_MASK BITFIELD(11, 11) | 1320 | #define OMAP4430_VC_SAERR_EN_MASK (1 << 11) |
1249 | 1321 | ||
1250 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1322 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1251 | #define OMAP4430_VC_SAERR_ST_SHIFT 11 | 1323 | #define OMAP4430_VC_SAERR_ST_SHIFT 11 |
1252 | #define OMAP4430_VC_SAERR_ST_MASK BITFIELD(11, 11) | 1324 | #define OMAP4430_VC_SAERR_ST_MASK (1 << 11) |
1253 | 1325 | ||
1254 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1326 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1255 | #define OMAP4430_VC_TOERR_EN_SHIFT 13 | 1327 | #define OMAP4430_VC_TOERR_EN_SHIFT 13 |
1256 | #define OMAP4430_VC_TOERR_EN_MASK BITFIELD(13, 13) | 1328 | #define OMAP4430_VC_TOERR_EN_MASK (1 << 13) |
1257 | 1329 | ||
1258 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1330 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1259 | #define OMAP4430_VC_TOERR_ST_SHIFT 13 | 1331 | #define OMAP4430_VC_TOERR_ST_SHIFT 13 |
1260 | #define OMAP4430_VC_TOERR_ST_MASK BITFIELD(13, 13) | 1332 | #define OMAP4430_VC_TOERR_ST_MASK (1 << 13) |
1261 | 1333 | ||
1262 | /* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */ | 1334 | /* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */ |
1263 | #define OMAP4430_VDDMAX_SHIFT 24 | 1335 | #define OMAP4430_VDDMAX_SHIFT 24 |
1264 | #define OMAP4430_VDDMAX_MASK BITFIELD(24, 31) | 1336 | #define OMAP4430_VDDMAX_MASK (0xff << 24) |
1265 | 1337 | ||
1266 | /* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */ | 1338 | /* Used by PRM_VP_CORE_VLIMITTO, PRM_VP_IVA_VLIMITTO, PRM_VP_MPU_VLIMITTO */ |
1267 | #define OMAP4430_VDDMIN_SHIFT 16 | 1339 | #define OMAP4430_VDDMIN_SHIFT 16 |
1268 | #define OMAP4430_VDDMIN_MASK BITFIELD(16, 23) | 1340 | #define OMAP4430_VDDMIN_MASK (0xff << 16) |
1269 | 1341 | ||
1270 | /* Used by PRM_VOLTCTRL */ | 1342 | /* Used by PRM_VOLTCTRL */ |
1271 | #define OMAP4430_VDD_CORE_I2C_DISABLE_SHIFT 12 | 1343 | #define OMAP4430_VDD_CORE_I2C_DISABLE_SHIFT 12 |
1272 | #define OMAP4430_VDD_CORE_I2C_DISABLE_MASK BITFIELD(12, 12) | 1344 | #define OMAP4430_VDD_CORE_I2C_DISABLE_MASK (1 << 12) |
1273 | 1345 | ||
1274 | /* Used by PRM_RSTST */ | 1346 | /* Used by PRM_RSTST */ |
1275 | #define OMAP4430_VDD_CORE_VOLT_MGR_RST_SHIFT 8 | 1347 | #define OMAP4430_VDD_CORE_VOLT_MGR_RST_SHIFT 8 |
1276 | #define OMAP4430_VDD_CORE_VOLT_MGR_RST_MASK BITFIELD(8, 8) | 1348 | #define OMAP4430_VDD_CORE_VOLT_MGR_RST_MASK (1 << 8) |
1277 | 1349 | ||
1278 | /* Used by PRM_VOLTCTRL */ | 1350 | /* Used by PRM_VOLTCTRL */ |
1279 | #define OMAP4430_VDD_IVA_I2C_DISABLE_SHIFT 14 | 1351 | #define OMAP4430_VDD_IVA_I2C_DISABLE_SHIFT 14 |
1280 | #define OMAP4430_VDD_IVA_I2C_DISABLE_MASK BITFIELD(14, 14) | 1352 | #define OMAP4430_VDD_IVA_I2C_DISABLE_MASK (1 << 14) |
1281 | 1353 | ||
1282 | /* Used by PRM_VOLTCTRL */ | 1354 | /* Used by PRM_VOLTCTRL */ |
1283 | #define OMAP4430_VDD_IVA_PRESENCE_SHIFT 9 | 1355 | #define OMAP4430_VDD_IVA_PRESENCE_SHIFT 9 |
1284 | #define OMAP4430_VDD_IVA_PRESENCE_MASK BITFIELD(9, 9) | 1356 | #define OMAP4430_VDD_IVA_PRESENCE_MASK (1 << 9) |
1285 | 1357 | ||
1286 | /* Used by PRM_RSTST */ | 1358 | /* Used by PRM_RSTST */ |
1287 | #define OMAP4430_VDD_IVA_VOLT_MGR_RST_SHIFT 7 | 1359 | #define OMAP4430_VDD_IVA_VOLT_MGR_RST_SHIFT 7 |
1288 | #define OMAP4430_VDD_IVA_VOLT_MGR_RST_MASK BITFIELD(7, 7) | 1360 | #define OMAP4430_VDD_IVA_VOLT_MGR_RST_MASK (1 << 7) |
1289 | 1361 | ||
1290 | /* Used by PRM_VOLTCTRL */ | 1362 | /* Used by PRM_VOLTCTRL */ |
1291 | #define OMAP4430_VDD_MPU_I2C_DISABLE_SHIFT 13 | 1363 | #define OMAP4430_VDD_MPU_I2C_DISABLE_SHIFT 13 |
1292 | #define OMAP4430_VDD_MPU_I2C_DISABLE_MASK BITFIELD(13, 13) | 1364 | #define OMAP4430_VDD_MPU_I2C_DISABLE_MASK (1 << 13) |
1293 | 1365 | ||
1294 | /* Used by PRM_VOLTCTRL */ | 1366 | /* Used by PRM_VOLTCTRL */ |
1295 | #define OMAP4430_VDD_MPU_PRESENCE_SHIFT 8 | 1367 | #define OMAP4430_VDD_MPU_PRESENCE_SHIFT 8 |
1296 | #define OMAP4430_VDD_MPU_PRESENCE_MASK BITFIELD(8, 8) | 1368 | #define OMAP4430_VDD_MPU_PRESENCE_MASK (1 << 8) |
1297 | 1369 | ||
1298 | /* Used by PRM_RSTST */ | 1370 | /* Used by PRM_RSTST */ |
1299 | #define OMAP4430_VDD_MPU_VOLT_MGR_RST_SHIFT 6 | 1371 | #define OMAP4430_VDD_MPU_VOLT_MGR_RST_SHIFT 6 |
1300 | #define OMAP4430_VDD_MPU_VOLT_MGR_RST_MASK BITFIELD(6, 6) | 1372 | #define OMAP4430_VDD_MPU_VOLT_MGR_RST_MASK (1 << 6) |
1373 | |||
1374 | /* Used by PRM_VC_ERRST */ | ||
1375 | #define OMAP4430_VFSM_RA_ERR_CORE_SHIFT 4 | ||
1376 | #define OMAP4430_VFSM_RA_ERR_CORE_MASK (1 << 4) | ||
1377 | |||
1378 | /* Used by PRM_VC_ERRST */ | ||
1379 | #define OMAP4430_VFSM_RA_ERR_IVA_SHIFT 12 | ||
1380 | #define OMAP4430_VFSM_RA_ERR_IVA_MASK (1 << 12) | ||
1381 | |||
1382 | /* Used by PRM_VC_ERRST */ | ||
1383 | #define OMAP4430_VFSM_RA_ERR_MPU_SHIFT 20 | ||
1384 | #define OMAP4430_VFSM_RA_ERR_MPU_MASK (1 << 20) | ||
1385 | |||
1386 | /* Used by PRM_VC_ERRST */ | ||
1387 | #define OMAP4430_VFSM_SA_ERR_CORE_SHIFT 3 | ||
1388 | #define OMAP4430_VFSM_SA_ERR_CORE_MASK (1 << 3) | ||
1389 | |||
1390 | /* Used by PRM_VC_ERRST */ | ||
1391 | #define OMAP4430_VFSM_SA_ERR_IVA_SHIFT 11 | ||
1392 | #define OMAP4430_VFSM_SA_ERR_IVA_MASK (1 << 11) | ||
1393 | |||
1394 | /* Used by PRM_VC_ERRST */ | ||
1395 | #define OMAP4430_VFSM_SA_ERR_MPU_SHIFT 19 | ||
1396 | #define OMAP4430_VFSM_SA_ERR_MPU_MASK (1 << 19) | ||
1397 | |||
1398 | /* Used by PRM_VC_ERRST */ | ||
1399 | #define OMAP4430_VFSM_TIMEOUT_ERR_CORE_SHIFT 5 | ||
1400 | #define OMAP4430_VFSM_TIMEOUT_ERR_CORE_MASK (1 << 5) | ||
1401 | |||
1402 | /* Used by PRM_VC_ERRST */ | ||
1403 | #define OMAP4430_VFSM_TIMEOUT_ERR_IVA_SHIFT 13 | ||
1404 | #define OMAP4430_VFSM_TIMEOUT_ERR_IVA_MASK (1 << 13) | ||
1405 | |||
1406 | /* Used by PRM_VC_ERRST */ | ||
1407 | #define OMAP4430_VFSM_TIMEOUT_ERR_MPU_SHIFT 21 | ||
1408 | #define OMAP4430_VFSM_TIMEOUT_ERR_MPU_MASK (1 << 21) | ||
1301 | 1409 | ||
1302 | /* Used by PRM_VC_VAL_SMPS_RA_VOL */ | 1410 | /* Used by PRM_VC_VAL_SMPS_RA_VOL */ |
1303 | #define OMAP4430_VOLRA_VDD_CORE_L_SHIFT 0 | 1411 | #define OMAP4430_VOLRA_VDD_CORE_L_SHIFT 0 |
1304 | #define OMAP4430_VOLRA_VDD_CORE_L_MASK BITFIELD(0, 7) | 1412 | #define OMAP4430_VOLRA_VDD_CORE_L_MASK (0xff << 0) |
1305 | 1413 | ||
1306 | /* Used by PRM_VC_VAL_SMPS_RA_VOL */ | 1414 | /* Used by PRM_VC_VAL_SMPS_RA_VOL */ |
1307 | #define OMAP4430_VOLRA_VDD_IVA_L_SHIFT 8 | 1415 | #define OMAP4430_VOLRA_VDD_IVA_L_SHIFT 8 |
1308 | #define OMAP4430_VOLRA_VDD_IVA_L_MASK BITFIELD(8, 15) | 1416 | #define OMAP4430_VOLRA_VDD_IVA_L_MASK (0xff << 8) |
1309 | 1417 | ||
1310 | /* Used by PRM_VC_VAL_SMPS_RA_VOL */ | 1418 | /* Used by PRM_VC_VAL_SMPS_RA_VOL */ |
1311 | #define OMAP4430_VOLRA_VDD_MPU_L_SHIFT 16 | 1419 | #define OMAP4430_VOLRA_VDD_MPU_L_SHIFT 16 |
1312 | #define OMAP4430_VOLRA_VDD_MPU_L_MASK BITFIELD(16, 23) | 1420 | #define OMAP4430_VOLRA_VDD_MPU_L_MASK (0xff << 16) |
1313 | 1421 | ||
1314 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ | 1422 | /* Used by PRM_VP_CORE_CONFIG, PRM_VP_IVA_CONFIG, PRM_VP_MPU_CONFIG */ |
1315 | #define OMAP4430_VPENABLE_SHIFT 0 | 1423 | #define OMAP4430_VPENABLE_SHIFT 0 |
1316 | #define OMAP4430_VPENABLE_MASK BITFIELD(0, 0) | 1424 | #define OMAP4430_VPENABLE_MASK (1 << 0) |
1317 | 1425 | ||
1318 | /* Used by PRM_VP_CORE_STATUS, PRM_VP_IVA_STATUS, PRM_VP_MPU_STATUS */ | 1426 | /* Used by PRM_VP_CORE_STATUS, PRM_VP_IVA_STATUS, PRM_VP_MPU_STATUS */ |
1319 | #define OMAP4430_VPINIDLE_SHIFT 0 | 1427 | #define OMAP4430_VPINIDLE_SHIFT 0 |
1320 | #define OMAP4430_VPINIDLE_MASK BITFIELD(0, 0) | 1428 | #define OMAP4430_VPINIDLE_MASK (1 << 0) |
1321 | 1429 | ||
1322 | /* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_IVA_VOLTAGE, PRM_VP_MPU_VOLTAGE */ | 1430 | /* Used by PRM_VP_CORE_VOLTAGE, PRM_VP_IVA_VOLTAGE, PRM_VP_MPU_VOLTAGE */ |
1323 | #define OMAP4430_VPVOLTAGE_SHIFT 0 | 1431 | #define OMAP4430_VPVOLTAGE_SHIFT 0 |
1324 | #define OMAP4430_VPVOLTAGE_MASK BITFIELD(0, 7) | 1432 | #define OMAP4430_VPVOLTAGE_MASK (0xff << 0) |
1325 | 1433 | ||
1326 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1434 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1327 | #define OMAP4430_VP_CORE_EQVALUE_EN_SHIFT 20 | 1435 | #define OMAP4430_VP_CORE_EQVALUE_EN_SHIFT 20 |
1328 | #define OMAP4430_VP_CORE_EQVALUE_EN_MASK BITFIELD(20, 20) | 1436 | #define OMAP4430_VP_CORE_EQVALUE_EN_MASK (1 << 20) |
1329 | 1437 | ||
1330 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1438 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1331 | #define OMAP4430_VP_CORE_EQVALUE_ST_SHIFT 20 | 1439 | #define OMAP4430_VP_CORE_EQVALUE_ST_SHIFT 20 |
1332 | #define OMAP4430_VP_CORE_EQVALUE_ST_MASK BITFIELD(20, 20) | 1440 | #define OMAP4430_VP_CORE_EQVALUE_ST_MASK (1 << 20) |
1333 | 1441 | ||
1334 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1442 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1335 | #define OMAP4430_VP_CORE_MAXVDD_EN_SHIFT 18 | 1443 | #define OMAP4430_VP_CORE_MAXVDD_EN_SHIFT 18 |
1336 | #define OMAP4430_VP_CORE_MAXVDD_EN_MASK BITFIELD(18, 18) | 1444 | #define OMAP4430_VP_CORE_MAXVDD_EN_MASK (1 << 18) |
1337 | 1445 | ||
1338 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1446 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1339 | #define OMAP4430_VP_CORE_MAXVDD_ST_SHIFT 18 | 1447 | #define OMAP4430_VP_CORE_MAXVDD_ST_SHIFT 18 |
1340 | #define OMAP4430_VP_CORE_MAXVDD_ST_MASK BITFIELD(18, 18) | 1448 | #define OMAP4430_VP_CORE_MAXVDD_ST_MASK (1 << 18) |
1341 | 1449 | ||
1342 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1450 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1343 | #define OMAP4430_VP_CORE_MINVDD_EN_SHIFT 17 | 1451 | #define OMAP4430_VP_CORE_MINVDD_EN_SHIFT 17 |
1344 | #define OMAP4430_VP_CORE_MINVDD_EN_MASK BITFIELD(17, 17) | 1452 | #define OMAP4430_VP_CORE_MINVDD_EN_MASK (1 << 17) |
1345 | 1453 | ||
1346 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1454 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1347 | #define OMAP4430_VP_CORE_MINVDD_ST_SHIFT 17 | 1455 | #define OMAP4430_VP_CORE_MINVDD_ST_SHIFT 17 |
1348 | #define OMAP4430_VP_CORE_MINVDD_ST_MASK BITFIELD(17, 17) | 1456 | #define OMAP4430_VP_CORE_MINVDD_ST_MASK (1 << 17) |
1349 | 1457 | ||
1350 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1458 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1351 | #define OMAP4430_VP_CORE_NOSMPSACK_EN_SHIFT 19 | 1459 | #define OMAP4430_VP_CORE_NOSMPSACK_EN_SHIFT 19 |
1352 | #define OMAP4430_VP_CORE_NOSMPSACK_EN_MASK BITFIELD(19, 19) | 1460 | #define OMAP4430_VP_CORE_NOSMPSACK_EN_MASK (1 << 19) |
1353 | 1461 | ||
1354 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1462 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1355 | #define OMAP4430_VP_CORE_NOSMPSACK_ST_SHIFT 19 | 1463 | #define OMAP4430_VP_CORE_NOSMPSACK_ST_SHIFT 19 |
1356 | #define OMAP4430_VP_CORE_NOSMPSACK_ST_MASK BITFIELD(19, 19) | 1464 | #define OMAP4430_VP_CORE_NOSMPSACK_ST_MASK (1 << 19) |
1357 | 1465 | ||
1358 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1466 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1359 | #define OMAP4430_VP_CORE_OPPCHANGEDONE_EN_SHIFT 16 | 1467 | #define OMAP4430_VP_CORE_OPPCHANGEDONE_EN_SHIFT 16 |
1360 | #define OMAP4430_VP_CORE_OPPCHANGEDONE_EN_MASK BITFIELD(16, 16) | 1468 | #define OMAP4430_VP_CORE_OPPCHANGEDONE_EN_MASK (1 << 16) |
1361 | 1469 | ||
1362 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1470 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1363 | #define OMAP4430_VP_CORE_OPPCHANGEDONE_ST_SHIFT 16 | 1471 | #define OMAP4430_VP_CORE_OPPCHANGEDONE_ST_SHIFT 16 |
1364 | #define OMAP4430_VP_CORE_OPPCHANGEDONE_ST_MASK BITFIELD(16, 16) | 1472 | #define OMAP4430_VP_CORE_OPPCHANGEDONE_ST_MASK (1 << 16) |
1365 | 1473 | ||
1366 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1474 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1367 | #define OMAP4430_VP_CORE_TRANXDONE_EN_SHIFT 21 | 1475 | #define OMAP4430_VP_CORE_TRANXDONE_EN_SHIFT 21 |
1368 | #define OMAP4430_VP_CORE_TRANXDONE_EN_MASK BITFIELD(21, 21) | 1476 | #define OMAP4430_VP_CORE_TRANXDONE_EN_MASK (1 << 21) |
1369 | 1477 | ||
1370 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1478 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1371 | #define OMAP4430_VP_CORE_TRANXDONE_ST_SHIFT 21 | 1479 | #define OMAP4430_VP_CORE_TRANXDONE_ST_SHIFT 21 |
1372 | #define OMAP4430_VP_CORE_TRANXDONE_ST_MASK BITFIELD(21, 21) | 1480 | #define OMAP4430_VP_CORE_TRANXDONE_ST_MASK (1 << 21) |
1373 | 1481 | ||
1374 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1482 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1375 | #define OMAP4430_VP_IVA_EQVALUE_EN_SHIFT 28 | 1483 | #define OMAP4430_VP_IVA_EQVALUE_EN_SHIFT 28 |
1376 | #define OMAP4430_VP_IVA_EQVALUE_EN_MASK BITFIELD(28, 28) | 1484 | #define OMAP4430_VP_IVA_EQVALUE_EN_MASK (1 << 28) |
1377 | 1485 | ||
1378 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1486 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1379 | #define OMAP4430_VP_IVA_EQVALUE_ST_SHIFT 28 | 1487 | #define OMAP4430_VP_IVA_EQVALUE_ST_SHIFT 28 |
1380 | #define OMAP4430_VP_IVA_EQVALUE_ST_MASK BITFIELD(28, 28) | 1488 | #define OMAP4430_VP_IVA_EQVALUE_ST_MASK (1 << 28) |
1381 | 1489 | ||
1382 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1490 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1383 | #define OMAP4430_VP_IVA_MAXVDD_EN_SHIFT 26 | 1491 | #define OMAP4430_VP_IVA_MAXVDD_EN_SHIFT 26 |
1384 | #define OMAP4430_VP_IVA_MAXVDD_EN_MASK BITFIELD(26, 26) | 1492 | #define OMAP4430_VP_IVA_MAXVDD_EN_MASK (1 << 26) |
1385 | 1493 | ||
1386 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1494 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1387 | #define OMAP4430_VP_IVA_MAXVDD_ST_SHIFT 26 | 1495 | #define OMAP4430_VP_IVA_MAXVDD_ST_SHIFT 26 |
1388 | #define OMAP4430_VP_IVA_MAXVDD_ST_MASK BITFIELD(26, 26) | 1496 | #define OMAP4430_VP_IVA_MAXVDD_ST_MASK (1 << 26) |
1389 | 1497 | ||
1390 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1498 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1391 | #define OMAP4430_VP_IVA_MINVDD_EN_SHIFT 25 | 1499 | #define OMAP4430_VP_IVA_MINVDD_EN_SHIFT 25 |
1392 | #define OMAP4430_VP_IVA_MINVDD_EN_MASK BITFIELD(25, 25) | 1500 | #define OMAP4430_VP_IVA_MINVDD_EN_MASK (1 << 25) |
1393 | 1501 | ||
1394 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1502 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1395 | #define OMAP4430_VP_IVA_MINVDD_ST_SHIFT 25 | 1503 | #define OMAP4430_VP_IVA_MINVDD_ST_SHIFT 25 |
1396 | #define OMAP4430_VP_IVA_MINVDD_ST_MASK BITFIELD(25, 25) | 1504 | #define OMAP4430_VP_IVA_MINVDD_ST_MASK (1 << 25) |
1397 | 1505 | ||
1398 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1506 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1399 | #define OMAP4430_VP_IVA_NOSMPSACK_EN_SHIFT 27 | 1507 | #define OMAP4430_VP_IVA_NOSMPSACK_EN_SHIFT 27 |
1400 | #define OMAP4430_VP_IVA_NOSMPSACK_EN_MASK BITFIELD(27, 27) | 1508 | #define OMAP4430_VP_IVA_NOSMPSACK_EN_MASK (1 << 27) |
1401 | 1509 | ||
1402 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1510 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1403 | #define OMAP4430_VP_IVA_NOSMPSACK_ST_SHIFT 27 | 1511 | #define OMAP4430_VP_IVA_NOSMPSACK_ST_SHIFT 27 |
1404 | #define OMAP4430_VP_IVA_NOSMPSACK_ST_MASK BITFIELD(27, 27) | 1512 | #define OMAP4430_VP_IVA_NOSMPSACK_ST_MASK (1 << 27) |
1405 | 1513 | ||
1406 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1514 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1407 | #define OMAP4430_VP_IVA_OPPCHANGEDONE_EN_SHIFT 24 | 1515 | #define OMAP4430_VP_IVA_OPPCHANGEDONE_EN_SHIFT 24 |
1408 | #define OMAP4430_VP_IVA_OPPCHANGEDONE_EN_MASK BITFIELD(24, 24) | 1516 | #define OMAP4430_VP_IVA_OPPCHANGEDONE_EN_MASK (1 << 24) |
1409 | 1517 | ||
1410 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1518 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1411 | #define OMAP4430_VP_IVA_OPPCHANGEDONE_ST_SHIFT 24 | 1519 | #define OMAP4430_VP_IVA_OPPCHANGEDONE_ST_SHIFT 24 |
1412 | #define OMAP4430_VP_IVA_OPPCHANGEDONE_ST_MASK BITFIELD(24, 24) | 1520 | #define OMAP4430_VP_IVA_OPPCHANGEDONE_ST_MASK (1 << 24) |
1413 | 1521 | ||
1414 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ | 1522 | /* Used by PRM_IRQENABLE_DUCATI, PRM_IRQENABLE_MPU */ |
1415 | #define OMAP4430_VP_IVA_TRANXDONE_EN_SHIFT 29 | 1523 | #define OMAP4430_VP_IVA_TRANXDONE_EN_SHIFT 29 |
1416 | #define OMAP4430_VP_IVA_TRANXDONE_EN_MASK BITFIELD(29, 29) | 1524 | #define OMAP4430_VP_IVA_TRANXDONE_EN_MASK (1 << 29) |
1417 | 1525 | ||
1418 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ | 1526 | /* Used by PRM_IRQSTATUS_DUCATI, PRM_IRQSTATUS_MPU */ |
1419 | #define OMAP4430_VP_IVA_TRANXDONE_ST_SHIFT 29 | 1527 | #define OMAP4430_VP_IVA_TRANXDONE_ST_SHIFT 29 |
1420 | #define OMAP4430_VP_IVA_TRANXDONE_ST_MASK BITFIELD(29, 29) | 1528 | #define OMAP4430_VP_IVA_TRANXDONE_ST_MASK (1 << 29) |
1421 | 1529 | ||
1422 | /* Used by PRM_IRQENABLE_MPU_2 */ | 1530 | /* Used by PRM_IRQENABLE_MPU_2 */ |
1423 | #define OMAP4430_VP_MPU_EQVALUE_EN_SHIFT 4 | 1531 | #define OMAP4430_VP_MPU_EQVALUE_EN_SHIFT 4 |
1424 | #define OMAP4430_VP_MPU_EQVALUE_EN_MASK BITFIELD(4, 4) | 1532 | #define OMAP4430_VP_MPU_EQVALUE_EN_MASK (1 << 4) |
1425 | 1533 | ||
1426 | /* Used by PRM_IRQSTATUS_MPU_2 */ | 1534 | /* Used by PRM_IRQSTATUS_MPU_2 */ |
1427 | #define OMAP4430_VP_MPU_EQVALUE_ST_SHIFT 4 | 1535 | #define OMAP4430_VP_MPU_EQVALUE_ST_SHIFT 4 |
1428 | #define OMAP4430_VP_MPU_EQVALUE_ST_MASK BITFIELD(4, 4) | 1536 | #define OMAP4430_VP_MPU_EQVALUE_ST_MASK (1 << 4) |
1429 | 1537 | ||
1430 | /* Used by PRM_IRQENABLE_MPU_2 */ | 1538 | /* Used by PRM_IRQENABLE_MPU_2 */ |
1431 | #define OMAP4430_VP_MPU_MAXVDD_EN_SHIFT 2 | 1539 | #define OMAP4430_VP_MPU_MAXVDD_EN_SHIFT 2 |
1432 | #define OMAP4430_VP_MPU_MAXVDD_EN_MASK BITFIELD(2, 2) | 1540 | #define OMAP4430_VP_MPU_MAXVDD_EN_MASK (1 << 2) |
1433 | 1541 | ||
1434 | /* Used by PRM_IRQSTATUS_MPU_2 */ | 1542 | /* Used by PRM_IRQSTATUS_MPU_2 */ |
1435 | #define OMAP4430_VP_MPU_MAXVDD_ST_SHIFT 2 | 1543 | #define OMAP4430_VP_MPU_MAXVDD_ST_SHIFT 2 |
1436 | #define OMAP4430_VP_MPU_MAXVDD_ST_MASK BITFIELD(2, 2) | 1544 | #define OMAP4430_VP_MPU_MAXVDD_ST_MASK (1 << 2) |
1437 | 1545 | ||
1438 | /* Used by PRM_IRQENABLE_MPU_2 */ | 1546 | /* Used by PRM_IRQENABLE_MPU_2 */ |
1439 | #define OMAP4430_VP_MPU_MINVDD_EN_SHIFT 1 | 1547 | #define OMAP4430_VP_MPU_MINVDD_EN_SHIFT 1 |
1440 | #define OMAP4430_VP_MPU_MINVDD_EN_MASK BITFIELD(1, 1) | 1548 | #define OMAP4430_VP_MPU_MINVDD_EN_MASK (1 << 1) |
1441 | 1549 | ||
1442 | /* Used by PRM_IRQSTATUS_MPU_2 */ | 1550 | /* Used by PRM_IRQSTATUS_MPU_2 */ |
1443 | #define OMAP4430_VP_MPU_MINVDD_ST_SHIFT 1 | 1551 | #define OMAP4430_VP_MPU_MINVDD_ST_SHIFT 1 |
1444 | #define OMAP4430_VP_MPU_MINVDD_ST_MASK BITFIELD(1, 1) | 1552 | #define OMAP4430_VP_MPU_MINVDD_ST_MASK (1 << 1) |
1445 | 1553 | ||
1446 | /* Used by PRM_IRQENABLE_MPU_2 */ | 1554 | /* Used by PRM_IRQENABLE_MPU_2 */ |
1447 | #define OMAP4430_VP_MPU_NOSMPSACK_EN_SHIFT 3 | 1555 | #define OMAP4430_VP_MPU_NOSMPSACK_EN_SHIFT 3 |
1448 | #define OMAP4430_VP_MPU_NOSMPSACK_EN_MASK BITFIELD(3, 3) | 1556 | #define OMAP4430_VP_MPU_NOSMPSACK_EN_MASK (1 << 3) |
1449 | 1557 | ||
1450 | /* Used by PRM_IRQSTATUS_MPU_2 */ | 1558 | /* Used by PRM_IRQSTATUS_MPU_2 */ |
1451 | #define OMAP4430_VP_MPU_NOSMPSACK_ST_SHIFT 3 | 1559 | #define OMAP4430_VP_MPU_NOSMPSACK_ST_SHIFT 3 |
1452 | #define OMAP4430_VP_MPU_NOSMPSACK_ST_MASK BITFIELD(3, 3) | 1560 | #define OMAP4430_VP_MPU_NOSMPSACK_ST_MASK (1 << 3) |
1453 | 1561 | ||
1454 | /* Used by PRM_IRQENABLE_MPU_2 */ | 1562 | /* Used by PRM_IRQENABLE_MPU_2 */ |
1455 | #define OMAP4430_VP_MPU_OPPCHANGEDONE_EN_SHIFT 0 | 1563 | #define OMAP4430_VP_MPU_OPPCHANGEDONE_EN_SHIFT 0 |
1456 | #define OMAP4430_VP_MPU_OPPCHANGEDONE_EN_MASK BITFIELD(0, 0) | 1564 | #define OMAP4430_VP_MPU_OPPCHANGEDONE_EN_MASK (1 << 0) |
1457 | 1565 | ||
1458 | /* Used by PRM_IRQSTATUS_MPU_2 */ | 1566 | /* Used by PRM_IRQSTATUS_MPU_2 */ |
1459 | #define OMAP4430_VP_MPU_OPPCHANGEDONE_ST_SHIFT 0 | 1567 | #define OMAP4430_VP_MPU_OPPCHANGEDONE_ST_SHIFT 0 |
1460 | #define OMAP4430_VP_MPU_OPPCHANGEDONE_ST_MASK BITFIELD(0, 0) | 1568 | #define OMAP4430_VP_MPU_OPPCHANGEDONE_ST_MASK (1 << 0) |
1461 | 1569 | ||
1462 | /* Used by PRM_IRQENABLE_MPU_2 */ | 1570 | /* Used by PRM_IRQENABLE_MPU_2 */ |
1463 | #define OMAP4430_VP_MPU_TRANXDONE_EN_SHIFT 5 | 1571 | #define OMAP4430_VP_MPU_TRANXDONE_EN_SHIFT 5 |
1464 | #define OMAP4430_VP_MPU_TRANXDONE_EN_MASK BITFIELD(5, 5) | 1572 | #define OMAP4430_VP_MPU_TRANXDONE_EN_MASK (1 << 5) |
1465 | 1573 | ||
1466 | /* Used by PRM_IRQSTATUS_MPU_2 */ | 1574 | /* Used by PRM_IRQSTATUS_MPU_2 */ |
1467 | #define OMAP4430_VP_MPU_TRANXDONE_ST_SHIFT 5 | 1575 | #define OMAP4430_VP_MPU_TRANXDONE_ST_SHIFT 5 |
1468 | #define OMAP4430_VP_MPU_TRANXDONE_ST_MASK BITFIELD(5, 5) | 1576 | #define OMAP4430_VP_MPU_TRANXDONE_ST_MASK (1 << 5) |
1469 | 1577 | ||
1470 | /* Used by PRM_SRAM_COUNT */ | 1578 | /* Used by PRM_SRAM_COUNT */ |
1471 | #define OMAP4430_VSETUPCNT_VALUE_SHIFT 8 | 1579 | #define OMAP4430_VSETUPCNT_VALUE_SHIFT 8 |
1472 | #define OMAP4430_VSETUPCNT_VALUE_MASK BITFIELD(8, 15) | 1580 | #define OMAP4430_VSETUPCNT_VALUE_MASK (0xff << 8) |
1473 | 1581 | ||
1474 | /* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_IVA_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */ | 1582 | /* Used by PRM_VP_CORE_VSTEPMAX, PRM_VP_IVA_VSTEPMAX, PRM_VP_MPU_VSTEPMAX */ |
1475 | #define OMAP4430_VSTEPMAX_SHIFT 0 | 1583 | #define OMAP4430_VSTEPMAX_SHIFT 0 |
1476 | #define OMAP4430_VSTEPMAX_MASK BITFIELD(0, 7) | 1584 | #define OMAP4430_VSTEPMAX_MASK (0xff << 0) |
1477 | 1585 | ||
1478 | /* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_IVA_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */ | 1586 | /* Used by PRM_VP_CORE_VSTEPMIN, PRM_VP_IVA_VSTEPMIN, PRM_VP_MPU_VSTEPMIN */ |
1479 | #define OMAP4430_VSTEPMIN_SHIFT 0 | 1587 | #define OMAP4430_VSTEPMIN_SHIFT 0 |
1480 | #define OMAP4430_VSTEPMIN_MASK BITFIELD(0, 7) | 1588 | #define OMAP4430_VSTEPMIN_MASK (0xff << 0) |
1481 | 1589 | ||
1482 | /* Used by PRM_MODEM_IF_CTRL */ | 1590 | /* Used by PRM_MODEM_IF_CTRL */ |
1483 | #define OMAP4430_WAKE_MODEM_SHIFT 0 | 1591 | #define OMAP4430_WAKE_MODEM_SHIFT 0 |
1484 | #define OMAP4430_WAKE_MODEM_MASK BITFIELD(0, 0) | 1592 | #define OMAP4430_WAKE_MODEM_MASK (1 << 0) |
1485 | 1593 | ||
1486 | /* Used by PM_DSS_DSS_WKDEP */ | 1594 | /* Used by PM_DSS_DSS_WKDEP */ |
1487 | #define OMAP4430_WKUPDEP_DISPC_DUCATI_SHIFT 1 | 1595 | #define OMAP4430_WKUPDEP_DISPC_DUCATI_SHIFT 1 |
1488 | #define OMAP4430_WKUPDEP_DISPC_DUCATI_MASK BITFIELD(1, 1) | 1596 | #define OMAP4430_WKUPDEP_DISPC_DUCATI_MASK (1 << 1) |
1489 | 1597 | ||
1490 | /* Used by PM_DSS_DSS_WKDEP */ | 1598 | /* Used by PM_DSS_DSS_WKDEP */ |
1491 | #define OMAP4430_WKUPDEP_DISPC_MPU_SHIFT 0 | 1599 | #define OMAP4430_WKUPDEP_DISPC_MPU_SHIFT 0 |
1492 | #define OMAP4430_WKUPDEP_DISPC_MPU_MASK BITFIELD(0, 0) | 1600 | #define OMAP4430_WKUPDEP_DISPC_MPU_MASK (1 << 0) |
1493 | 1601 | ||
1494 | /* Used by PM_DSS_DSS_WKDEP */ | 1602 | /* Used by PM_DSS_DSS_WKDEP */ |
1495 | #define OMAP4430_WKUPDEP_DISPC_SDMA_SHIFT 3 | 1603 | #define OMAP4430_WKUPDEP_DISPC_SDMA_SHIFT 3 |
1496 | #define OMAP4430_WKUPDEP_DISPC_SDMA_MASK BITFIELD(3, 3) | 1604 | #define OMAP4430_WKUPDEP_DISPC_SDMA_MASK (1 << 3) |
1497 | 1605 | ||
1498 | /* Used by PM_DSS_DSS_WKDEP */ | 1606 | /* Used by PM_DSS_DSS_WKDEP */ |
1499 | #define OMAP4430_WKUPDEP_DISPC_TESLA_SHIFT 2 | 1607 | #define OMAP4430_WKUPDEP_DISPC_TESLA_SHIFT 2 |
1500 | #define OMAP4430_WKUPDEP_DISPC_TESLA_MASK BITFIELD(2, 2) | 1608 | #define OMAP4430_WKUPDEP_DISPC_TESLA_MASK (1 << 2) |
1501 | 1609 | ||
1502 | /* Used by PM_ABE_DMIC_WKDEP */ | 1610 | /* Used by PM_ABE_DMIC_WKDEP */ |
1503 | #define OMAP4430_WKUPDEP_DMIC_DMA_SDMA_SHIFT 7 | 1611 | #define OMAP4430_WKUPDEP_DMIC_DMA_SDMA_SHIFT 7 |
1504 | #define OMAP4430_WKUPDEP_DMIC_DMA_SDMA_MASK BITFIELD(7, 7) | 1612 | #define OMAP4430_WKUPDEP_DMIC_DMA_SDMA_MASK (1 << 7) |
1505 | 1613 | ||
1506 | /* Used by PM_ABE_DMIC_WKDEP */ | 1614 | /* Used by PM_ABE_DMIC_WKDEP */ |
1507 | #define OMAP4430_WKUPDEP_DMIC_DMA_TESLA_SHIFT 6 | 1615 | #define OMAP4430_WKUPDEP_DMIC_DMA_TESLA_SHIFT 6 |
1508 | #define OMAP4430_WKUPDEP_DMIC_DMA_TESLA_MASK BITFIELD(6, 6) | 1616 | #define OMAP4430_WKUPDEP_DMIC_DMA_TESLA_MASK (1 << 6) |
1509 | 1617 | ||
1510 | /* Used by PM_ABE_DMIC_WKDEP */ | 1618 | /* Used by PM_ABE_DMIC_WKDEP */ |
1511 | #define OMAP4430_WKUPDEP_DMIC_IRQ_MPU_SHIFT 0 | 1619 | #define OMAP4430_WKUPDEP_DMIC_IRQ_MPU_SHIFT 0 |
1512 | #define OMAP4430_WKUPDEP_DMIC_IRQ_MPU_MASK BITFIELD(0, 0) | 1620 | #define OMAP4430_WKUPDEP_DMIC_IRQ_MPU_MASK (1 << 0) |
1513 | 1621 | ||
1514 | /* Used by PM_ABE_DMIC_WKDEP */ | 1622 | /* Used by PM_ABE_DMIC_WKDEP */ |
1515 | #define OMAP4430_WKUPDEP_DMIC_IRQ_TESLA_SHIFT 2 | 1623 | #define OMAP4430_WKUPDEP_DMIC_IRQ_TESLA_SHIFT 2 |
1516 | #define OMAP4430_WKUPDEP_DMIC_IRQ_TESLA_MASK BITFIELD(2, 2) | 1624 | #define OMAP4430_WKUPDEP_DMIC_IRQ_TESLA_MASK (1 << 2) |
1517 | 1625 | ||
1518 | /* Used by PM_L4PER_DMTIMER10_WKDEP */ | 1626 | /* Used by PM_L4PER_DMTIMER10_WKDEP */ |
1519 | #define OMAP4430_WKUPDEP_DMTIMER10_MPU_SHIFT 0 | 1627 | #define OMAP4430_WKUPDEP_DMTIMER10_MPU_SHIFT 0 |
1520 | #define OMAP4430_WKUPDEP_DMTIMER10_MPU_MASK BITFIELD(0, 0) | 1628 | #define OMAP4430_WKUPDEP_DMTIMER10_MPU_MASK (1 << 0) |
1521 | 1629 | ||
1522 | /* Used by PM_L4PER_DMTIMER11_WKDEP */ | 1630 | /* Used by PM_L4PER_DMTIMER11_WKDEP */ |
1523 | #define OMAP4430_WKUPDEP_DMTIMER11_DUCATI_SHIFT 1 | 1631 | #define OMAP4430_WKUPDEP_DMTIMER11_DUCATI_SHIFT 1 |
1524 | #define OMAP4430_WKUPDEP_DMTIMER11_DUCATI_MASK BITFIELD(1, 1) | 1632 | #define OMAP4430_WKUPDEP_DMTIMER11_DUCATI_MASK (1 << 1) |
1525 | 1633 | ||
1526 | /* Used by PM_L4PER_DMTIMER11_WKDEP */ | 1634 | /* Used by PM_L4PER_DMTIMER11_WKDEP */ |
1527 | #define OMAP4430_WKUPDEP_DMTIMER11_MPU_SHIFT 0 | 1635 | #define OMAP4430_WKUPDEP_DMTIMER11_MPU_SHIFT 0 |
1528 | #define OMAP4430_WKUPDEP_DMTIMER11_MPU_MASK BITFIELD(0, 0) | 1636 | #define OMAP4430_WKUPDEP_DMTIMER11_MPU_MASK (1 << 0) |
1529 | 1637 | ||
1530 | /* Used by PM_L4PER_DMTIMER2_WKDEP */ | 1638 | /* Used by PM_L4PER_DMTIMER2_WKDEP */ |
1531 | #define OMAP4430_WKUPDEP_DMTIMER2_MPU_SHIFT 0 | 1639 | #define OMAP4430_WKUPDEP_DMTIMER2_MPU_SHIFT 0 |
1532 | #define OMAP4430_WKUPDEP_DMTIMER2_MPU_MASK BITFIELD(0, 0) | 1640 | #define OMAP4430_WKUPDEP_DMTIMER2_MPU_MASK (1 << 0) |
1533 | 1641 | ||
1534 | /* Used by PM_L4PER_DMTIMER3_WKDEP */ | 1642 | /* Used by PM_L4PER_DMTIMER3_WKDEP */ |
1535 | #define OMAP4430_WKUPDEP_DMTIMER3_DUCATI_SHIFT 1 | 1643 | #define OMAP4430_WKUPDEP_DMTIMER3_DUCATI_SHIFT 1 |
1536 | #define OMAP4430_WKUPDEP_DMTIMER3_DUCATI_MASK BITFIELD(1, 1) | 1644 | #define OMAP4430_WKUPDEP_DMTIMER3_DUCATI_MASK (1 << 1) |
1537 | 1645 | ||
1538 | /* Used by PM_L4PER_DMTIMER3_WKDEP */ | 1646 | /* Used by PM_L4PER_DMTIMER3_WKDEP */ |
1539 | #define OMAP4430_WKUPDEP_DMTIMER3_MPU_SHIFT 0 | 1647 | #define OMAP4430_WKUPDEP_DMTIMER3_MPU_SHIFT 0 |
1540 | #define OMAP4430_WKUPDEP_DMTIMER3_MPU_MASK BITFIELD(0, 0) | 1648 | #define OMAP4430_WKUPDEP_DMTIMER3_MPU_MASK (1 << 0) |
1541 | 1649 | ||
1542 | /* Used by PM_L4PER_DMTIMER4_WKDEP */ | 1650 | /* Used by PM_L4PER_DMTIMER4_WKDEP */ |
1543 | #define OMAP4430_WKUPDEP_DMTIMER4_DUCATI_SHIFT 1 | 1651 | #define OMAP4430_WKUPDEP_DMTIMER4_DUCATI_SHIFT 1 |
1544 | #define OMAP4430_WKUPDEP_DMTIMER4_DUCATI_MASK BITFIELD(1, 1) | 1652 | #define OMAP4430_WKUPDEP_DMTIMER4_DUCATI_MASK (1 << 1) |
1545 | 1653 | ||
1546 | /* Used by PM_L4PER_DMTIMER4_WKDEP */ | 1654 | /* Used by PM_L4PER_DMTIMER4_WKDEP */ |
1547 | #define OMAP4430_WKUPDEP_DMTIMER4_MPU_SHIFT 0 | 1655 | #define OMAP4430_WKUPDEP_DMTIMER4_MPU_SHIFT 0 |
1548 | #define OMAP4430_WKUPDEP_DMTIMER4_MPU_MASK BITFIELD(0, 0) | 1656 | #define OMAP4430_WKUPDEP_DMTIMER4_MPU_MASK (1 << 0) |
1549 | 1657 | ||
1550 | /* Used by PM_L4PER_DMTIMER9_WKDEP */ | 1658 | /* Used by PM_L4PER_DMTIMER9_WKDEP */ |
1551 | #define OMAP4430_WKUPDEP_DMTIMER9_DUCATI_SHIFT 1 | 1659 | #define OMAP4430_WKUPDEP_DMTIMER9_DUCATI_SHIFT 1 |
1552 | #define OMAP4430_WKUPDEP_DMTIMER9_DUCATI_MASK BITFIELD(1, 1) | 1660 | #define OMAP4430_WKUPDEP_DMTIMER9_DUCATI_MASK (1 << 1) |
1553 | 1661 | ||
1554 | /* Used by PM_L4PER_DMTIMER9_WKDEP */ | 1662 | /* Used by PM_L4PER_DMTIMER9_WKDEP */ |
1555 | #define OMAP4430_WKUPDEP_DMTIMER9_MPU_SHIFT 0 | 1663 | #define OMAP4430_WKUPDEP_DMTIMER9_MPU_SHIFT 0 |
1556 | #define OMAP4430_WKUPDEP_DMTIMER9_MPU_MASK BITFIELD(0, 0) | 1664 | #define OMAP4430_WKUPDEP_DMTIMER9_MPU_MASK (1 << 0) |
1557 | 1665 | ||
1558 | /* Used by PM_DSS_DSS_WKDEP */ | 1666 | /* Used by PM_DSS_DSS_WKDEP */ |
1559 | #define OMAP4430_WKUPDEP_DSI1_DUCATI_SHIFT 5 | 1667 | #define OMAP4430_WKUPDEP_DSI1_DUCATI_SHIFT 5 |
1560 | #define OMAP4430_WKUPDEP_DSI1_DUCATI_MASK BITFIELD(5, 5) | 1668 | #define OMAP4430_WKUPDEP_DSI1_DUCATI_MASK (1 << 5) |
1561 | 1669 | ||
1562 | /* Used by PM_DSS_DSS_WKDEP */ | 1670 | /* Used by PM_DSS_DSS_WKDEP */ |
1563 | #define OMAP4430_WKUPDEP_DSI1_MPU_SHIFT 4 | 1671 | #define OMAP4430_WKUPDEP_DSI1_MPU_SHIFT 4 |
1564 | #define OMAP4430_WKUPDEP_DSI1_MPU_MASK BITFIELD(4, 4) | 1672 | #define OMAP4430_WKUPDEP_DSI1_MPU_MASK (1 << 4) |
1565 | 1673 | ||
1566 | /* Used by PM_DSS_DSS_WKDEP */ | 1674 | /* Used by PM_DSS_DSS_WKDEP */ |
1567 | #define OMAP4430_WKUPDEP_DSI1_SDMA_SHIFT 7 | 1675 | #define OMAP4430_WKUPDEP_DSI1_SDMA_SHIFT 7 |
1568 | #define OMAP4430_WKUPDEP_DSI1_SDMA_MASK BITFIELD(7, 7) | 1676 | #define OMAP4430_WKUPDEP_DSI1_SDMA_MASK (1 << 7) |
1569 | 1677 | ||
1570 | /* Used by PM_DSS_DSS_WKDEP */ | 1678 | /* Used by PM_DSS_DSS_WKDEP */ |
1571 | #define OMAP4430_WKUPDEP_DSI1_TESLA_SHIFT 6 | 1679 | #define OMAP4430_WKUPDEP_DSI1_TESLA_SHIFT 6 |
1572 | #define OMAP4430_WKUPDEP_DSI1_TESLA_MASK BITFIELD(6, 6) | 1680 | #define OMAP4430_WKUPDEP_DSI1_TESLA_MASK (1 << 6) |
1573 | 1681 | ||
1574 | /* Used by PM_DSS_DSS_WKDEP */ | 1682 | /* Used by PM_DSS_DSS_WKDEP */ |
1575 | #define OMAP4430_WKUPDEP_DSI2_DUCATI_SHIFT 9 | 1683 | #define OMAP4430_WKUPDEP_DSI2_DUCATI_SHIFT 9 |
1576 | #define OMAP4430_WKUPDEP_DSI2_DUCATI_MASK BITFIELD(9, 9) | 1684 | #define OMAP4430_WKUPDEP_DSI2_DUCATI_MASK (1 << 9) |
1577 | 1685 | ||
1578 | /* Used by PM_DSS_DSS_WKDEP */ | 1686 | /* Used by PM_DSS_DSS_WKDEP */ |
1579 | #define OMAP4430_WKUPDEP_DSI2_MPU_SHIFT 8 | 1687 | #define OMAP4430_WKUPDEP_DSI2_MPU_SHIFT 8 |
1580 | #define OMAP4430_WKUPDEP_DSI2_MPU_MASK BITFIELD(8, 8) | 1688 | #define OMAP4430_WKUPDEP_DSI2_MPU_MASK (1 << 8) |
1581 | 1689 | ||
1582 | /* Used by PM_DSS_DSS_WKDEP */ | 1690 | /* Used by PM_DSS_DSS_WKDEP */ |
1583 | #define OMAP4430_WKUPDEP_DSI2_SDMA_SHIFT 11 | 1691 | #define OMAP4430_WKUPDEP_DSI2_SDMA_SHIFT 11 |
1584 | #define OMAP4430_WKUPDEP_DSI2_SDMA_MASK BITFIELD(11, 11) | 1692 | #define OMAP4430_WKUPDEP_DSI2_SDMA_MASK (1 << 11) |
1585 | 1693 | ||
1586 | /* Used by PM_DSS_DSS_WKDEP */ | 1694 | /* Used by PM_DSS_DSS_WKDEP */ |
1587 | #define OMAP4430_WKUPDEP_DSI2_TESLA_SHIFT 10 | 1695 | #define OMAP4430_WKUPDEP_DSI2_TESLA_SHIFT 10 |
1588 | #define OMAP4430_WKUPDEP_DSI2_TESLA_MASK BITFIELD(10, 10) | 1696 | #define OMAP4430_WKUPDEP_DSI2_TESLA_MASK (1 << 10) |
1589 | 1697 | ||
1590 | /* Used by PM_WKUP_GPIO1_WKDEP */ | 1698 | /* Used by PM_WKUP_GPIO1_WKDEP */ |
1591 | #define OMAP4430_WKUPDEP_GPIO1_IRQ1_DUCATI_SHIFT 1 | 1699 | #define OMAP4430_WKUPDEP_GPIO1_IRQ1_DUCATI_SHIFT 1 |
1592 | #define OMAP4430_WKUPDEP_GPIO1_IRQ1_DUCATI_MASK BITFIELD(1, 1) | 1700 | #define OMAP4430_WKUPDEP_GPIO1_IRQ1_DUCATI_MASK (1 << 1) |
1593 | 1701 | ||
1594 | /* Used by PM_WKUP_GPIO1_WKDEP */ | 1702 | /* Used by PM_WKUP_GPIO1_WKDEP */ |
1595 | #define OMAP4430_WKUPDEP_GPIO1_IRQ1_MPU_SHIFT 0 | 1703 | #define OMAP4430_WKUPDEP_GPIO1_IRQ1_MPU_SHIFT 0 |
1596 | #define OMAP4430_WKUPDEP_GPIO1_IRQ1_MPU_MASK BITFIELD(0, 0) | 1704 | #define OMAP4430_WKUPDEP_GPIO1_IRQ1_MPU_MASK (1 << 0) |
1597 | 1705 | ||
1598 | /* Used by PM_WKUP_GPIO1_WKDEP */ | 1706 | /* Used by PM_WKUP_GPIO1_WKDEP */ |
1599 | #define OMAP4430_WKUPDEP_GPIO1_IRQ2_TESLA_SHIFT 6 | 1707 | #define OMAP4430_WKUPDEP_GPIO1_IRQ2_TESLA_SHIFT 6 |
1600 | #define OMAP4430_WKUPDEP_GPIO1_IRQ2_TESLA_MASK BITFIELD(6, 6) | 1708 | #define OMAP4430_WKUPDEP_GPIO1_IRQ2_TESLA_MASK (1 << 6) |
1601 | 1709 | ||
1602 | /* Used by PM_L4PER_GPIO2_WKDEP */ | 1710 | /* Used by PM_L4PER_GPIO2_WKDEP */ |
1603 | #define OMAP4430_WKUPDEP_GPIO2_IRQ1_DUCATI_SHIFT 1 | 1711 | #define OMAP4430_WKUPDEP_GPIO2_IRQ1_DUCATI_SHIFT 1 |
1604 | #define OMAP4430_WKUPDEP_GPIO2_IRQ1_DUCATI_MASK BITFIELD(1, 1) | 1712 | #define OMAP4430_WKUPDEP_GPIO2_IRQ1_DUCATI_MASK (1 << 1) |
1605 | 1713 | ||
1606 | /* Used by PM_L4PER_GPIO2_WKDEP */ | 1714 | /* Used by PM_L4PER_GPIO2_WKDEP */ |
1607 | #define OMAP4430_WKUPDEP_GPIO2_IRQ1_MPU_SHIFT 0 | 1715 | #define OMAP4430_WKUPDEP_GPIO2_IRQ1_MPU_SHIFT 0 |
1608 | #define OMAP4430_WKUPDEP_GPIO2_IRQ1_MPU_MASK BITFIELD(0, 0) | 1716 | #define OMAP4430_WKUPDEP_GPIO2_IRQ1_MPU_MASK (1 << 0) |
1609 | 1717 | ||
1610 | /* Used by PM_L4PER_GPIO2_WKDEP */ | 1718 | /* Used by PM_L4PER_GPIO2_WKDEP */ |
1611 | #define OMAP4430_WKUPDEP_GPIO2_IRQ2_TESLA_SHIFT 6 | 1719 | #define OMAP4430_WKUPDEP_GPIO2_IRQ2_TESLA_SHIFT 6 |
1612 | #define OMAP4430_WKUPDEP_GPIO2_IRQ2_TESLA_MASK BITFIELD(6, 6) | 1720 | #define OMAP4430_WKUPDEP_GPIO2_IRQ2_TESLA_MASK (1 << 6) |
1613 | 1721 | ||
1614 | /* Used by PM_L4PER_GPIO3_WKDEP */ | 1722 | /* Used by PM_L4PER_GPIO3_WKDEP */ |
1615 | #define OMAP4430_WKUPDEP_GPIO3_IRQ1_MPU_SHIFT 0 | 1723 | #define OMAP4430_WKUPDEP_GPIO3_IRQ1_MPU_SHIFT 0 |
1616 | #define OMAP4430_WKUPDEP_GPIO3_IRQ1_MPU_MASK BITFIELD(0, 0) | 1724 | #define OMAP4430_WKUPDEP_GPIO3_IRQ1_MPU_MASK (1 << 0) |
1617 | 1725 | ||
1618 | /* Used by PM_L4PER_GPIO3_WKDEP */ | 1726 | /* Used by PM_L4PER_GPIO3_WKDEP */ |
1619 | #define OMAP4430_WKUPDEP_GPIO3_IRQ2_TESLA_SHIFT 6 | 1727 | #define OMAP4430_WKUPDEP_GPIO3_IRQ2_TESLA_SHIFT 6 |
1620 | #define OMAP4430_WKUPDEP_GPIO3_IRQ2_TESLA_MASK BITFIELD(6, 6) | 1728 | #define OMAP4430_WKUPDEP_GPIO3_IRQ2_TESLA_MASK (1 << 6) |
1621 | 1729 | ||
1622 | /* Used by PM_L4PER_GPIO4_WKDEP */ | 1730 | /* Used by PM_L4PER_GPIO4_WKDEP */ |
1623 | #define OMAP4430_WKUPDEP_GPIO4_IRQ1_MPU_SHIFT 0 | 1731 | #define OMAP4430_WKUPDEP_GPIO4_IRQ1_MPU_SHIFT 0 |
1624 | #define OMAP4430_WKUPDEP_GPIO4_IRQ1_MPU_MASK BITFIELD(0, 0) | 1732 | #define OMAP4430_WKUPDEP_GPIO4_IRQ1_MPU_MASK (1 << 0) |
1625 | 1733 | ||
1626 | /* Used by PM_L4PER_GPIO4_WKDEP */ | 1734 | /* Used by PM_L4PER_GPIO4_WKDEP */ |
1627 | #define OMAP4430_WKUPDEP_GPIO4_IRQ2_TESLA_SHIFT 6 | 1735 | #define OMAP4430_WKUPDEP_GPIO4_IRQ2_TESLA_SHIFT 6 |
1628 | #define OMAP4430_WKUPDEP_GPIO4_IRQ2_TESLA_MASK BITFIELD(6, 6) | 1736 | #define OMAP4430_WKUPDEP_GPIO4_IRQ2_TESLA_MASK (1 << 6) |
1629 | 1737 | ||
1630 | /* Used by PM_L4PER_GPIO5_WKDEP */ | 1738 | /* Used by PM_L4PER_GPIO5_WKDEP */ |
1631 | #define OMAP4430_WKUPDEP_GPIO5_IRQ1_MPU_SHIFT 0 | 1739 | #define OMAP4430_WKUPDEP_GPIO5_IRQ1_MPU_SHIFT 0 |
1632 | #define OMAP4430_WKUPDEP_GPIO5_IRQ1_MPU_MASK BITFIELD(0, 0) | 1740 | #define OMAP4430_WKUPDEP_GPIO5_IRQ1_MPU_MASK (1 << 0) |
1633 | 1741 | ||
1634 | /* Used by PM_L4PER_GPIO5_WKDEP */ | 1742 | /* Used by PM_L4PER_GPIO5_WKDEP */ |
1635 | #define OMAP4430_WKUPDEP_GPIO5_IRQ2_TESLA_SHIFT 6 | 1743 | #define OMAP4430_WKUPDEP_GPIO5_IRQ2_TESLA_SHIFT 6 |
1636 | #define OMAP4430_WKUPDEP_GPIO5_IRQ2_TESLA_MASK BITFIELD(6, 6) | 1744 | #define OMAP4430_WKUPDEP_GPIO5_IRQ2_TESLA_MASK (1 << 6) |
1637 | 1745 | ||
1638 | /* Used by PM_L4PER_GPIO6_WKDEP */ | 1746 | /* Used by PM_L4PER_GPIO6_WKDEP */ |
1639 | #define OMAP4430_WKUPDEP_GPIO6_IRQ1_MPU_SHIFT 0 | 1747 | #define OMAP4430_WKUPDEP_GPIO6_IRQ1_MPU_SHIFT 0 |
1640 | #define OMAP4430_WKUPDEP_GPIO6_IRQ1_MPU_MASK BITFIELD(0, 0) | 1748 | #define OMAP4430_WKUPDEP_GPIO6_IRQ1_MPU_MASK (1 << 0) |
1641 | 1749 | ||
1642 | /* Used by PM_L4PER_GPIO6_WKDEP */ | 1750 | /* Used by PM_L4PER_GPIO6_WKDEP */ |
1643 | #define OMAP4430_WKUPDEP_GPIO6_IRQ2_TESLA_SHIFT 6 | 1751 | #define OMAP4430_WKUPDEP_GPIO6_IRQ2_TESLA_SHIFT 6 |
1644 | #define OMAP4430_WKUPDEP_GPIO6_IRQ2_TESLA_MASK BITFIELD(6, 6) | 1752 | #define OMAP4430_WKUPDEP_GPIO6_IRQ2_TESLA_MASK (1 << 6) |
1645 | 1753 | ||
1646 | /* Used by PM_DSS_DSS_WKDEP */ | 1754 | /* Used by PM_DSS_DSS_WKDEP */ |
1647 | #define OMAP4430_WKUPDEP_HDMIDMA_SDMA_SHIFT 19 | 1755 | #define OMAP4430_WKUPDEP_HDMIDMA_SDMA_SHIFT 19 |
1648 | #define OMAP4430_WKUPDEP_HDMIDMA_SDMA_MASK BITFIELD(19, 19) | 1756 | #define OMAP4430_WKUPDEP_HDMIDMA_SDMA_MASK (1 << 19) |
1649 | 1757 | ||
1650 | /* Used by PM_DSS_DSS_WKDEP */ | 1758 | /* Used by PM_DSS_DSS_WKDEP */ |
1651 | #define OMAP4430_WKUPDEP_HDMIIRQ_DUCATI_SHIFT 13 | 1759 | #define OMAP4430_WKUPDEP_HDMIIRQ_DUCATI_SHIFT 13 |
1652 | #define OMAP4430_WKUPDEP_HDMIIRQ_DUCATI_MASK BITFIELD(13, 13) | 1760 | #define OMAP4430_WKUPDEP_HDMIIRQ_DUCATI_MASK (1 << 13) |
1653 | 1761 | ||
1654 | /* Used by PM_DSS_DSS_WKDEP */ | 1762 | /* Used by PM_DSS_DSS_WKDEP */ |
1655 | #define OMAP4430_WKUPDEP_HDMIIRQ_MPU_SHIFT 12 | 1763 | #define OMAP4430_WKUPDEP_HDMIIRQ_MPU_SHIFT 12 |
1656 | #define OMAP4430_WKUPDEP_HDMIIRQ_MPU_MASK BITFIELD(12, 12) | 1764 | #define OMAP4430_WKUPDEP_HDMIIRQ_MPU_MASK (1 << 12) |
1657 | 1765 | ||
1658 | /* Used by PM_DSS_DSS_WKDEP */ | 1766 | /* Used by PM_DSS_DSS_WKDEP */ |
1659 | #define OMAP4430_WKUPDEP_HDMIIRQ_TESLA_SHIFT 14 | 1767 | #define OMAP4430_WKUPDEP_HDMIIRQ_TESLA_SHIFT 14 |
1660 | #define OMAP4430_WKUPDEP_HDMIIRQ_TESLA_MASK BITFIELD(14, 14) | 1768 | #define OMAP4430_WKUPDEP_HDMIIRQ_TESLA_MASK (1 << 14) |
1661 | 1769 | ||
1662 | /* Used by PM_L4PER_HECC1_WKDEP */ | 1770 | /* Used by PM_L4PER_HECC1_WKDEP */ |
1663 | #define OMAP4430_WKUPDEP_HECC1_MPU_SHIFT 0 | 1771 | #define OMAP4430_WKUPDEP_HECC1_MPU_SHIFT 0 |
1664 | #define OMAP4430_WKUPDEP_HECC1_MPU_MASK BITFIELD(0, 0) | 1772 | #define OMAP4430_WKUPDEP_HECC1_MPU_MASK (1 << 0) |
1665 | 1773 | ||
1666 | /* Used by PM_L4PER_HECC2_WKDEP */ | 1774 | /* Used by PM_L4PER_HECC2_WKDEP */ |
1667 | #define OMAP4430_WKUPDEP_HECC2_MPU_SHIFT 0 | 1775 | #define OMAP4430_WKUPDEP_HECC2_MPU_SHIFT 0 |
1668 | #define OMAP4430_WKUPDEP_HECC2_MPU_MASK BITFIELD(0, 0) | 1776 | #define OMAP4430_WKUPDEP_HECC2_MPU_MASK (1 << 0) |
1669 | 1777 | ||
1670 | /* Used by PM_L3INIT_HSI_WKDEP */ | 1778 | /* Used by PM_L3INIT_HSI_WKDEP */ |
1671 | #define OMAP4430_WKUPDEP_HSI_DSP_TESLA_SHIFT 6 | 1779 | #define OMAP4430_WKUPDEP_HSI_DSP_TESLA_SHIFT 6 |
1672 | #define OMAP4430_WKUPDEP_HSI_DSP_TESLA_MASK BITFIELD(6, 6) | 1780 | #define OMAP4430_WKUPDEP_HSI_DSP_TESLA_MASK (1 << 6) |
1673 | 1781 | ||
1674 | /* Used by PM_L3INIT_HSI_WKDEP */ | 1782 | /* Used by PM_L3INIT_HSI_WKDEP */ |
1675 | #define OMAP4430_WKUPDEP_HSI_MCU_DUCATI_SHIFT 1 | 1783 | #define OMAP4430_WKUPDEP_HSI_MCU_DUCATI_SHIFT 1 |
1676 | #define OMAP4430_WKUPDEP_HSI_MCU_DUCATI_MASK BITFIELD(1, 1) | 1784 | #define OMAP4430_WKUPDEP_HSI_MCU_DUCATI_MASK (1 << 1) |
1677 | 1785 | ||
1678 | /* Used by PM_L3INIT_HSI_WKDEP */ | 1786 | /* Used by PM_L3INIT_HSI_WKDEP */ |
1679 | #define OMAP4430_WKUPDEP_HSI_MCU_MPU_SHIFT 0 | 1787 | #define OMAP4430_WKUPDEP_HSI_MCU_MPU_SHIFT 0 |
1680 | #define OMAP4430_WKUPDEP_HSI_MCU_MPU_MASK BITFIELD(0, 0) | 1788 | #define OMAP4430_WKUPDEP_HSI_MCU_MPU_MASK (1 << 0) |
1681 | 1789 | ||
1682 | /* Used by PM_L4PER_I2C1_WKDEP */ | 1790 | /* Used by PM_L4PER_I2C1_WKDEP */ |
1683 | #define OMAP4430_WKUPDEP_I2C1_DMA_SDMA_SHIFT 7 | 1791 | #define OMAP4430_WKUPDEP_I2C1_DMA_SDMA_SHIFT 7 |
1684 | #define OMAP4430_WKUPDEP_I2C1_DMA_SDMA_MASK BITFIELD(7, 7) | 1792 | #define OMAP4430_WKUPDEP_I2C1_DMA_SDMA_MASK (1 << 7) |
1685 | 1793 | ||
1686 | /* Used by PM_L4PER_I2C1_WKDEP */ | 1794 | /* Used by PM_L4PER_I2C1_WKDEP */ |
1687 | #define OMAP4430_WKUPDEP_I2C1_IRQ_DUCATI_SHIFT 1 | 1795 | #define OMAP4430_WKUPDEP_I2C1_IRQ_DUCATI_SHIFT 1 |
1688 | #define OMAP4430_WKUPDEP_I2C1_IRQ_DUCATI_MASK BITFIELD(1, 1) | 1796 | #define OMAP4430_WKUPDEP_I2C1_IRQ_DUCATI_MASK (1 << 1) |
1689 | 1797 | ||
1690 | /* Used by PM_L4PER_I2C1_WKDEP */ | 1798 | /* Used by PM_L4PER_I2C1_WKDEP */ |
1691 | #define OMAP4430_WKUPDEP_I2C1_IRQ_MPU_SHIFT 0 | 1799 | #define OMAP4430_WKUPDEP_I2C1_IRQ_MPU_SHIFT 0 |
1692 | #define OMAP4430_WKUPDEP_I2C1_IRQ_MPU_MASK BITFIELD(0, 0) | 1800 | #define OMAP4430_WKUPDEP_I2C1_IRQ_MPU_MASK (1 << 0) |
1693 | 1801 | ||
1694 | /* Used by PM_L4PER_I2C2_WKDEP */ | 1802 | /* Used by PM_L4PER_I2C2_WKDEP */ |
1695 | #define OMAP4430_WKUPDEP_I2C2_DMA_SDMA_SHIFT 7 | 1803 | #define OMAP4430_WKUPDEP_I2C2_DMA_SDMA_SHIFT 7 |
1696 | #define OMAP4430_WKUPDEP_I2C2_DMA_SDMA_MASK BITFIELD(7, 7) | 1804 | #define OMAP4430_WKUPDEP_I2C2_DMA_SDMA_MASK (1 << 7) |
1697 | 1805 | ||
1698 | /* Used by PM_L4PER_I2C2_WKDEP */ | 1806 | /* Used by PM_L4PER_I2C2_WKDEP */ |
1699 | #define OMAP4430_WKUPDEP_I2C2_IRQ_DUCATI_SHIFT 1 | 1807 | #define OMAP4430_WKUPDEP_I2C2_IRQ_DUCATI_SHIFT 1 |
1700 | #define OMAP4430_WKUPDEP_I2C2_IRQ_DUCATI_MASK BITFIELD(1, 1) | 1808 | #define OMAP4430_WKUPDEP_I2C2_IRQ_DUCATI_MASK (1 << 1) |
1701 | 1809 | ||
1702 | /* Used by PM_L4PER_I2C2_WKDEP */ | 1810 | /* Used by PM_L4PER_I2C2_WKDEP */ |
1703 | #define OMAP4430_WKUPDEP_I2C2_IRQ_MPU_SHIFT 0 | 1811 | #define OMAP4430_WKUPDEP_I2C2_IRQ_MPU_SHIFT 0 |
1704 | #define OMAP4430_WKUPDEP_I2C2_IRQ_MPU_MASK BITFIELD(0, 0) | 1812 | #define OMAP4430_WKUPDEP_I2C2_IRQ_MPU_MASK (1 << 0) |
1705 | 1813 | ||
1706 | /* Used by PM_L4PER_I2C3_WKDEP */ | 1814 | /* Used by PM_L4PER_I2C3_WKDEP */ |
1707 | #define OMAP4430_WKUPDEP_I2C3_DMA_SDMA_SHIFT 7 | 1815 | #define OMAP4430_WKUPDEP_I2C3_DMA_SDMA_SHIFT 7 |
1708 | #define OMAP4430_WKUPDEP_I2C3_DMA_SDMA_MASK BITFIELD(7, 7) | 1816 | #define OMAP4430_WKUPDEP_I2C3_DMA_SDMA_MASK (1 << 7) |
1709 | 1817 | ||
1710 | /* Used by PM_L4PER_I2C3_WKDEP */ | 1818 | /* Used by PM_L4PER_I2C3_WKDEP */ |
1711 | #define OMAP4430_WKUPDEP_I2C3_IRQ_DUCATI_SHIFT 1 | 1819 | #define OMAP4430_WKUPDEP_I2C3_IRQ_DUCATI_SHIFT 1 |
1712 | #define OMAP4430_WKUPDEP_I2C3_IRQ_DUCATI_MASK BITFIELD(1, 1) | 1820 | #define OMAP4430_WKUPDEP_I2C3_IRQ_DUCATI_MASK (1 << 1) |
1713 | 1821 | ||
1714 | /* Used by PM_L4PER_I2C3_WKDEP */ | 1822 | /* Used by PM_L4PER_I2C3_WKDEP */ |
1715 | #define OMAP4430_WKUPDEP_I2C3_IRQ_MPU_SHIFT 0 | 1823 | #define OMAP4430_WKUPDEP_I2C3_IRQ_MPU_SHIFT 0 |
1716 | #define OMAP4430_WKUPDEP_I2C3_IRQ_MPU_MASK BITFIELD(0, 0) | 1824 | #define OMAP4430_WKUPDEP_I2C3_IRQ_MPU_MASK (1 << 0) |
1717 | 1825 | ||
1718 | /* Used by PM_L4PER_I2C4_WKDEP */ | 1826 | /* Used by PM_L4PER_I2C4_WKDEP */ |
1719 | #define OMAP4430_WKUPDEP_I2C4_DMA_SDMA_SHIFT 7 | 1827 | #define OMAP4430_WKUPDEP_I2C4_DMA_SDMA_SHIFT 7 |
1720 | #define OMAP4430_WKUPDEP_I2C4_DMA_SDMA_MASK BITFIELD(7, 7) | 1828 | #define OMAP4430_WKUPDEP_I2C4_DMA_SDMA_MASK (1 << 7) |
1721 | 1829 | ||
1722 | /* Used by PM_L4PER_I2C4_WKDEP */ | 1830 | /* Used by PM_L4PER_I2C4_WKDEP */ |
1723 | #define OMAP4430_WKUPDEP_I2C4_IRQ_DUCATI_SHIFT 1 | 1831 | #define OMAP4430_WKUPDEP_I2C4_IRQ_DUCATI_SHIFT 1 |
1724 | #define OMAP4430_WKUPDEP_I2C4_IRQ_DUCATI_MASK BITFIELD(1, 1) | 1832 | #define OMAP4430_WKUPDEP_I2C4_IRQ_DUCATI_MASK (1 << 1) |
1725 | 1833 | ||
1726 | /* Used by PM_L4PER_I2C4_WKDEP */ | 1834 | /* Used by PM_L4PER_I2C4_WKDEP */ |
1727 | #define OMAP4430_WKUPDEP_I2C4_IRQ_MPU_SHIFT 0 | 1835 | #define OMAP4430_WKUPDEP_I2C4_IRQ_MPU_SHIFT 0 |
1728 | #define OMAP4430_WKUPDEP_I2C4_IRQ_MPU_MASK BITFIELD(0, 0) | 1836 | #define OMAP4430_WKUPDEP_I2C4_IRQ_MPU_MASK (1 << 0) |
1729 | 1837 | ||
1730 | /* Used by PM_L4PER_I2C5_WKDEP */ | 1838 | /* Used by PM_L4PER_I2C5_WKDEP */ |
1731 | #define OMAP4430_WKUPDEP_I2C5_DMA_SDMA_SHIFT 7 | 1839 | #define OMAP4430_WKUPDEP_I2C5_DMA_SDMA_SHIFT 7 |
1732 | #define OMAP4430_WKUPDEP_I2C5_DMA_SDMA_MASK BITFIELD(7, 7) | 1840 | #define OMAP4430_WKUPDEP_I2C5_DMA_SDMA_MASK (1 << 7) |
1733 | 1841 | ||
1734 | /* Used by PM_L4PER_I2C5_WKDEP */ | 1842 | /* Used by PM_L4PER_I2C5_WKDEP */ |
1735 | #define OMAP4430_WKUPDEP_I2C5_IRQ_MPU_SHIFT 0 | 1843 | #define OMAP4430_WKUPDEP_I2C5_IRQ_MPU_SHIFT 0 |
1736 | #define OMAP4430_WKUPDEP_I2C5_IRQ_MPU_MASK BITFIELD(0, 0) | 1844 | #define OMAP4430_WKUPDEP_I2C5_IRQ_MPU_MASK (1 << 0) |
1737 | 1845 | ||
1738 | /* Used by PM_WKUP_KEYBOARD_WKDEP */ | 1846 | /* Used by PM_WKUP_KEYBOARD_WKDEP */ |
1739 | #define OMAP4430_WKUPDEP_KEYBOARD_MPU_SHIFT 0 | 1847 | #define OMAP4430_WKUPDEP_KEYBOARD_MPU_SHIFT 0 |
1740 | #define OMAP4430_WKUPDEP_KEYBOARD_MPU_MASK BITFIELD(0, 0) | 1848 | #define OMAP4430_WKUPDEP_KEYBOARD_MPU_MASK (1 << 0) |
1741 | 1849 | ||
1742 | /* Used by PM_ABE_MCASP_WKDEP */ | 1850 | /* Used by PM_ABE_MCASP_WKDEP */ |
1743 | #define OMAP4430_WKUPDEP_MCASP1_DMA_SDMA_SHIFT 7 | 1851 | #define OMAP4430_WKUPDEP_MCASP1_DMA_SDMA_SHIFT 7 |
1744 | #define OMAP4430_WKUPDEP_MCASP1_DMA_SDMA_MASK BITFIELD(7, 7) | 1852 | #define OMAP4430_WKUPDEP_MCASP1_DMA_SDMA_MASK (1 << 7) |
1745 | 1853 | ||
1746 | /* Used by PM_ABE_MCASP_WKDEP */ | 1854 | /* Used by PM_ABE_MCASP_WKDEP */ |
1747 | #define OMAP4430_WKUPDEP_MCASP1_DMA_TESLA_SHIFT 6 | 1855 | #define OMAP4430_WKUPDEP_MCASP1_DMA_TESLA_SHIFT 6 |
1748 | #define OMAP4430_WKUPDEP_MCASP1_DMA_TESLA_MASK BITFIELD(6, 6) | 1856 | #define OMAP4430_WKUPDEP_MCASP1_DMA_TESLA_MASK (1 << 6) |
1749 | 1857 | ||
1750 | /* Used by PM_ABE_MCASP_WKDEP */ | 1858 | /* Used by PM_ABE_MCASP_WKDEP */ |
1751 | #define OMAP4430_WKUPDEP_MCASP1_IRQ_MPU_SHIFT 0 | 1859 | #define OMAP4430_WKUPDEP_MCASP1_IRQ_MPU_SHIFT 0 |
1752 | #define OMAP4430_WKUPDEP_MCASP1_IRQ_MPU_MASK BITFIELD(0, 0) | 1860 | #define OMAP4430_WKUPDEP_MCASP1_IRQ_MPU_MASK (1 << 0) |
1753 | 1861 | ||
1754 | /* Used by PM_ABE_MCASP_WKDEP */ | 1862 | /* Used by PM_ABE_MCASP_WKDEP */ |
1755 | #define OMAP4430_WKUPDEP_MCASP1_IRQ_TESLA_SHIFT 2 | 1863 | #define OMAP4430_WKUPDEP_MCASP1_IRQ_TESLA_SHIFT 2 |
1756 | #define OMAP4430_WKUPDEP_MCASP1_IRQ_TESLA_MASK BITFIELD(2, 2) | 1864 | #define OMAP4430_WKUPDEP_MCASP1_IRQ_TESLA_MASK (1 << 2) |
1757 | 1865 | ||
1758 | /* Used by PM_L4PER_MCASP2_WKDEP */ | 1866 | /* Used by PM_L4PER_MCASP2_WKDEP */ |
1759 | #define OMAP4430_WKUPDEP_MCASP2_DMA_SDMA_SHIFT 7 | 1867 | #define OMAP4430_WKUPDEP_MCASP2_DMA_SDMA_SHIFT 7 |
1760 | #define OMAP4430_WKUPDEP_MCASP2_DMA_SDMA_MASK BITFIELD(7, 7) | 1868 | #define OMAP4430_WKUPDEP_MCASP2_DMA_SDMA_MASK (1 << 7) |
1761 | 1869 | ||
1762 | /* Used by PM_L4PER_MCASP2_WKDEP */ | 1870 | /* Used by PM_L4PER_MCASP2_WKDEP */ |
1763 | #define OMAP4430_WKUPDEP_MCASP2_DMA_TESLA_SHIFT 6 | 1871 | #define OMAP4430_WKUPDEP_MCASP2_DMA_TESLA_SHIFT 6 |
1764 | #define OMAP4430_WKUPDEP_MCASP2_DMA_TESLA_MASK BITFIELD(6, 6) | 1872 | #define OMAP4430_WKUPDEP_MCASP2_DMA_TESLA_MASK (1 << 6) |
1765 | 1873 | ||
1766 | /* Used by PM_L4PER_MCASP2_WKDEP */ | 1874 | /* Used by PM_L4PER_MCASP2_WKDEP */ |
1767 | #define OMAP4430_WKUPDEP_MCASP2_IRQ_MPU_SHIFT 0 | 1875 | #define OMAP4430_WKUPDEP_MCASP2_IRQ_MPU_SHIFT 0 |
1768 | #define OMAP4430_WKUPDEP_MCASP2_IRQ_MPU_MASK BITFIELD(0, 0) | 1876 | #define OMAP4430_WKUPDEP_MCASP2_IRQ_MPU_MASK (1 << 0) |
1769 | 1877 | ||
1770 | /* Used by PM_L4PER_MCASP2_WKDEP */ | 1878 | /* Used by PM_L4PER_MCASP2_WKDEP */ |
1771 | #define OMAP4430_WKUPDEP_MCASP2_IRQ_TESLA_SHIFT 2 | 1879 | #define OMAP4430_WKUPDEP_MCASP2_IRQ_TESLA_SHIFT 2 |
1772 | #define OMAP4430_WKUPDEP_MCASP2_IRQ_TESLA_MASK BITFIELD(2, 2) | 1880 | #define OMAP4430_WKUPDEP_MCASP2_IRQ_TESLA_MASK (1 << 2) |
1773 | 1881 | ||
1774 | /* Used by PM_L4PER_MCASP3_WKDEP */ | 1882 | /* Used by PM_L4PER_MCASP3_WKDEP */ |
1775 | #define OMAP4430_WKUPDEP_MCASP3_DMA_SDMA_SHIFT 7 | 1883 | #define OMAP4430_WKUPDEP_MCASP3_DMA_SDMA_SHIFT 7 |
1776 | #define OMAP4430_WKUPDEP_MCASP3_DMA_SDMA_MASK BITFIELD(7, 7) | 1884 | #define OMAP4430_WKUPDEP_MCASP3_DMA_SDMA_MASK (1 << 7) |
1777 | 1885 | ||
1778 | /* Used by PM_L4PER_MCASP3_WKDEP */ | 1886 | /* Used by PM_L4PER_MCASP3_WKDEP */ |
1779 | #define OMAP4430_WKUPDEP_MCASP3_DMA_TESLA_SHIFT 6 | 1887 | #define OMAP4430_WKUPDEP_MCASP3_DMA_TESLA_SHIFT 6 |
1780 | #define OMAP4430_WKUPDEP_MCASP3_DMA_TESLA_MASK BITFIELD(6, 6) | 1888 | #define OMAP4430_WKUPDEP_MCASP3_DMA_TESLA_MASK (1 << 6) |
1781 | 1889 | ||
1782 | /* Used by PM_L4PER_MCASP3_WKDEP */ | 1890 | /* Used by PM_L4PER_MCASP3_WKDEP */ |
1783 | #define OMAP4430_WKUPDEP_MCASP3_IRQ_MPU_SHIFT 0 | 1891 | #define OMAP4430_WKUPDEP_MCASP3_IRQ_MPU_SHIFT 0 |
1784 | #define OMAP4430_WKUPDEP_MCASP3_IRQ_MPU_MASK BITFIELD(0, 0) | 1892 | #define OMAP4430_WKUPDEP_MCASP3_IRQ_MPU_MASK (1 << 0) |
1785 | 1893 | ||
1786 | /* Used by PM_L4PER_MCASP3_WKDEP */ | 1894 | /* Used by PM_L4PER_MCASP3_WKDEP */ |
1787 | #define OMAP4430_WKUPDEP_MCASP3_IRQ_TESLA_SHIFT 2 | 1895 | #define OMAP4430_WKUPDEP_MCASP3_IRQ_TESLA_SHIFT 2 |
1788 | #define OMAP4430_WKUPDEP_MCASP3_IRQ_TESLA_MASK BITFIELD(2, 2) | 1896 | #define OMAP4430_WKUPDEP_MCASP3_IRQ_TESLA_MASK (1 << 2) |
1789 | 1897 | ||
1790 | /* Used by PM_ABE_MCBSP1_WKDEP */ | 1898 | /* Used by PM_ABE_MCBSP1_WKDEP */ |
1791 | #define OMAP4430_WKUPDEP_MCBSP1_MPU_SHIFT 0 | 1899 | #define OMAP4430_WKUPDEP_MCBSP1_MPU_SHIFT 0 |
1792 | #define OMAP4430_WKUPDEP_MCBSP1_MPU_MASK BITFIELD(0, 0) | 1900 | #define OMAP4430_WKUPDEP_MCBSP1_MPU_MASK (1 << 0) |
1793 | 1901 | ||
1794 | /* Used by PM_ABE_MCBSP1_WKDEP */ | 1902 | /* Used by PM_ABE_MCBSP1_WKDEP */ |
1795 | #define OMAP4430_WKUPDEP_MCBSP1_SDMA_SHIFT 3 | 1903 | #define OMAP4430_WKUPDEP_MCBSP1_SDMA_SHIFT 3 |
1796 | #define OMAP4430_WKUPDEP_MCBSP1_SDMA_MASK BITFIELD(3, 3) | 1904 | #define OMAP4430_WKUPDEP_MCBSP1_SDMA_MASK (1 << 3) |
1797 | 1905 | ||
1798 | /* Used by PM_ABE_MCBSP1_WKDEP */ | 1906 | /* Used by PM_ABE_MCBSP1_WKDEP */ |
1799 | #define OMAP4430_WKUPDEP_MCBSP1_TESLA_SHIFT 2 | 1907 | #define OMAP4430_WKUPDEP_MCBSP1_TESLA_SHIFT 2 |
1800 | #define OMAP4430_WKUPDEP_MCBSP1_TESLA_MASK BITFIELD(2, 2) | 1908 | #define OMAP4430_WKUPDEP_MCBSP1_TESLA_MASK (1 << 2) |
1801 | 1909 | ||
1802 | /* Used by PM_ABE_MCBSP2_WKDEP */ | 1910 | /* Used by PM_ABE_MCBSP2_WKDEP */ |
1803 | #define OMAP4430_WKUPDEP_MCBSP2_MPU_SHIFT 0 | 1911 | #define OMAP4430_WKUPDEP_MCBSP2_MPU_SHIFT 0 |
1804 | #define OMAP4430_WKUPDEP_MCBSP2_MPU_MASK BITFIELD(0, 0) | 1912 | #define OMAP4430_WKUPDEP_MCBSP2_MPU_MASK (1 << 0) |
1805 | 1913 | ||
1806 | /* Used by PM_ABE_MCBSP2_WKDEP */ | 1914 | /* Used by PM_ABE_MCBSP2_WKDEP */ |
1807 | #define OMAP4430_WKUPDEP_MCBSP2_SDMA_SHIFT 3 | 1915 | #define OMAP4430_WKUPDEP_MCBSP2_SDMA_SHIFT 3 |
1808 | #define OMAP4430_WKUPDEP_MCBSP2_SDMA_MASK BITFIELD(3, 3) | 1916 | #define OMAP4430_WKUPDEP_MCBSP2_SDMA_MASK (1 << 3) |
1809 | 1917 | ||
1810 | /* Used by PM_ABE_MCBSP2_WKDEP */ | 1918 | /* Used by PM_ABE_MCBSP2_WKDEP */ |
1811 | #define OMAP4430_WKUPDEP_MCBSP2_TESLA_SHIFT 2 | 1919 | #define OMAP4430_WKUPDEP_MCBSP2_TESLA_SHIFT 2 |
1812 | #define OMAP4430_WKUPDEP_MCBSP2_TESLA_MASK BITFIELD(2, 2) | 1920 | #define OMAP4430_WKUPDEP_MCBSP2_TESLA_MASK (1 << 2) |
1813 | 1921 | ||
1814 | /* Used by PM_ABE_MCBSP3_WKDEP */ | 1922 | /* Used by PM_ABE_MCBSP3_WKDEP */ |
1815 | #define OMAP4430_WKUPDEP_MCBSP3_MPU_SHIFT 0 | 1923 | #define OMAP4430_WKUPDEP_MCBSP3_MPU_SHIFT 0 |
1816 | #define OMAP4430_WKUPDEP_MCBSP3_MPU_MASK BITFIELD(0, 0) | 1924 | #define OMAP4430_WKUPDEP_MCBSP3_MPU_MASK (1 << 0) |
1817 | 1925 | ||
1818 | /* Used by PM_ABE_MCBSP3_WKDEP */ | 1926 | /* Used by PM_ABE_MCBSP3_WKDEP */ |
1819 | #define OMAP4430_WKUPDEP_MCBSP3_SDMA_SHIFT 3 | 1927 | #define OMAP4430_WKUPDEP_MCBSP3_SDMA_SHIFT 3 |
1820 | #define OMAP4430_WKUPDEP_MCBSP3_SDMA_MASK BITFIELD(3, 3) | 1928 | #define OMAP4430_WKUPDEP_MCBSP3_SDMA_MASK (1 << 3) |
1821 | 1929 | ||
1822 | /* Used by PM_ABE_MCBSP3_WKDEP */ | 1930 | /* Used by PM_ABE_MCBSP3_WKDEP */ |
1823 | #define OMAP4430_WKUPDEP_MCBSP3_TESLA_SHIFT 2 | 1931 | #define OMAP4430_WKUPDEP_MCBSP3_TESLA_SHIFT 2 |
1824 | #define OMAP4430_WKUPDEP_MCBSP3_TESLA_MASK BITFIELD(2, 2) | 1932 | #define OMAP4430_WKUPDEP_MCBSP3_TESLA_MASK (1 << 2) |
1825 | 1933 | ||
1826 | /* Used by PM_L4PER_MCBSP4_WKDEP */ | 1934 | /* Used by PM_L4PER_MCBSP4_WKDEP */ |
1827 | #define OMAP4430_WKUPDEP_MCBSP4_MPU_SHIFT 0 | 1935 | #define OMAP4430_WKUPDEP_MCBSP4_MPU_SHIFT 0 |
1828 | #define OMAP4430_WKUPDEP_MCBSP4_MPU_MASK BITFIELD(0, 0) | 1936 | #define OMAP4430_WKUPDEP_MCBSP4_MPU_MASK (1 << 0) |
1829 | 1937 | ||
1830 | /* Used by PM_L4PER_MCBSP4_WKDEP */ | 1938 | /* Used by PM_L4PER_MCBSP4_WKDEP */ |
1831 | #define OMAP4430_WKUPDEP_MCBSP4_SDMA_SHIFT 3 | 1939 | #define OMAP4430_WKUPDEP_MCBSP4_SDMA_SHIFT 3 |
1832 | #define OMAP4430_WKUPDEP_MCBSP4_SDMA_MASK BITFIELD(3, 3) | 1940 | #define OMAP4430_WKUPDEP_MCBSP4_SDMA_MASK (1 << 3) |
1833 | 1941 | ||
1834 | /* Used by PM_L4PER_MCBSP4_WKDEP */ | 1942 | /* Used by PM_L4PER_MCBSP4_WKDEP */ |
1835 | #define OMAP4430_WKUPDEP_MCBSP4_TESLA_SHIFT 2 | 1943 | #define OMAP4430_WKUPDEP_MCBSP4_TESLA_SHIFT 2 |
1836 | #define OMAP4430_WKUPDEP_MCBSP4_TESLA_MASK BITFIELD(2, 2) | 1944 | #define OMAP4430_WKUPDEP_MCBSP4_TESLA_MASK (1 << 2) |
1837 | 1945 | ||
1838 | /* Used by PM_L4PER_MCSPI1_WKDEP */ | 1946 | /* Used by PM_L4PER_MCSPI1_WKDEP */ |
1839 | #define OMAP4430_WKUPDEP_MCSPI1_DUCATI_SHIFT 1 | 1947 | #define OMAP4430_WKUPDEP_MCSPI1_DUCATI_SHIFT 1 |
1840 | #define OMAP4430_WKUPDEP_MCSPI1_DUCATI_MASK BITFIELD(1, 1) | 1948 | #define OMAP4430_WKUPDEP_MCSPI1_DUCATI_MASK (1 << 1) |
1841 | 1949 | ||
1842 | /* Used by PM_L4PER_MCSPI1_WKDEP */ | 1950 | /* Used by PM_L4PER_MCSPI1_WKDEP */ |
1843 | #define OMAP4430_WKUPDEP_MCSPI1_MPU_SHIFT 0 | 1951 | #define OMAP4430_WKUPDEP_MCSPI1_MPU_SHIFT 0 |
1844 | #define OMAP4430_WKUPDEP_MCSPI1_MPU_MASK BITFIELD(0, 0) | 1952 | #define OMAP4430_WKUPDEP_MCSPI1_MPU_MASK (1 << 0) |
1845 | 1953 | ||
1846 | /* Used by PM_L4PER_MCSPI1_WKDEP */ | 1954 | /* Used by PM_L4PER_MCSPI1_WKDEP */ |
1847 | #define OMAP4430_WKUPDEP_MCSPI1_SDMA_SHIFT 3 | 1955 | #define OMAP4430_WKUPDEP_MCSPI1_SDMA_SHIFT 3 |
1848 | #define OMAP4430_WKUPDEP_MCSPI1_SDMA_MASK BITFIELD(3, 3) | 1956 | #define OMAP4430_WKUPDEP_MCSPI1_SDMA_MASK (1 << 3) |
1849 | 1957 | ||
1850 | /* Used by PM_L4PER_MCSPI1_WKDEP */ | 1958 | /* Used by PM_L4PER_MCSPI1_WKDEP */ |
1851 | #define OMAP4430_WKUPDEP_MCSPI1_TESLA_SHIFT 2 | 1959 | #define OMAP4430_WKUPDEP_MCSPI1_TESLA_SHIFT 2 |
1852 | #define OMAP4430_WKUPDEP_MCSPI1_TESLA_MASK BITFIELD(2, 2) | 1960 | #define OMAP4430_WKUPDEP_MCSPI1_TESLA_MASK (1 << 2) |
1853 | 1961 | ||
1854 | /* Used by PM_L4PER_MCSPI2_WKDEP */ | 1962 | /* Used by PM_L4PER_MCSPI2_WKDEP */ |
1855 | #define OMAP4430_WKUPDEP_MCSPI2_DUCATI_SHIFT 1 | 1963 | #define OMAP4430_WKUPDEP_MCSPI2_DUCATI_SHIFT 1 |
1856 | #define OMAP4430_WKUPDEP_MCSPI2_DUCATI_MASK BITFIELD(1, 1) | 1964 | #define OMAP4430_WKUPDEP_MCSPI2_DUCATI_MASK (1 << 1) |
1857 | 1965 | ||
1858 | /* Used by PM_L4PER_MCSPI2_WKDEP */ | 1966 | /* Used by PM_L4PER_MCSPI2_WKDEP */ |
1859 | #define OMAP4430_WKUPDEP_MCSPI2_MPU_SHIFT 0 | 1967 | #define OMAP4430_WKUPDEP_MCSPI2_MPU_SHIFT 0 |
1860 | #define OMAP4430_WKUPDEP_MCSPI2_MPU_MASK BITFIELD(0, 0) | 1968 | #define OMAP4430_WKUPDEP_MCSPI2_MPU_MASK (1 << 0) |
1861 | 1969 | ||
1862 | /* Used by PM_L4PER_MCSPI2_WKDEP */ | 1970 | /* Used by PM_L4PER_MCSPI2_WKDEP */ |
1863 | #define OMAP4430_WKUPDEP_MCSPI2_SDMA_SHIFT 3 | 1971 | #define OMAP4430_WKUPDEP_MCSPI2_SDMA_SHIFT 3 |
1864 | #define OMAP4430_WKUPDEP_MCSPI2_SDMA_MASK BITFIELD(3, 3) | 1972 | #define OMAP4430_WKUPDEP_MCSPI2_SDMA_MASK (1 << 3) |
1865 | 1973 | ||
1866 | /* Used by PM_L4PER_MCSPI3_WKDEP */ | 1974 | /* Used by PM_L4PER_MCSPI3_WKDEP */ |
1867 | #define OMAP4430_WKUPDEP_MCSPI3_MPU_SHIFT 0 | 1975 | #define OMAP4430_WKUPDEP_MCSPI3_MPU_SHIFT 0 |
1868 | #define OMAP4430_WKUPDEP_MCSPI3_MPU_MASK BITFIELD(0, 0) | 1976 | #define OMAP4430_WKUPDEP_MCSPI3_MPU_MASK (1 << 0) |
1869 | 1977 | ||
1870 | /* Used by PM_L4PER_MCSPI3_WKDEP */ | 1978 | /* Used by PM_L4PER_MCSPI3_WKDEP */ |
1871 | #define OMAP4430_WKUPDEP_MCSPI3_SDMA_SHIFT 3 | 1979 | #define OMAP4430_WKUPDEP_MCSPI3_SDMA_SHIFT 3 |
1872 | #define OMAP4430_WKUPDEP_MCSPI3_SDMA_MASK BITFIELD(3, 3) | 1980 | #define OMAP4430_WKUPDEP_MCSPI3_SDMA_MASK (1 << 3) |
1873 | 1981 | ||
1874 | /* Used by PM_L4PER_MCSPI4_WKDEP */ | 1982 | /* Used by PM_L4PER_MCSPI4_WKDEP */ |
1875 | #define OMAP4430_WKUPDEP_MCSPI4_MPU_SHIFT 0 | 1983 | #define OMAP4430_WKUPDEP_MCSPI4_MPU_SHIFT 0 |
1876 | #define OMAP4430_WKUPDEP_MCSPI4_MPU_MASK BITFIELD(0, 0) | 1984 | #define OMAP4430_WKUPDEP_MCSPI4_MPU_MASK (1 << 0) |
1877 | 1985 | ||
1878 | /* Used by PM_L4PER_MCSPI4_WKDEP */ | 1986 | /* Used by PM_L4PER_MCSPI4_WKDEP */ |
1879 | #define OMAP4430_WKUPDEP_MCSPI4_SDMA_SHIFT 3 | 1987 | #define OMAP4430_WKUPDEP_MCSPI4_SDMA_SHIFT 3 |
1880 | #define OMAP4430_WKUPDEP_MCSPI4_SDMA_MASK BITFIELD(3, 3) | 1988 | #define OMAP4430_WKUPDEP_MCSPI4_SDMA_MASK (1 << 3) |
1881 | 1989 | ||
1882 | /* Used by PM_L3INIT_MMC1_WKDEP */ | 1990 | /* Used by PM_L3INIT_MMC1_WKDEP */ |
1883 | #define OMAP4430_WKUPDEP_MMC1_DUCATI_SHIFT 1 | 1991 | #define OMAP4430_WKUPDEP_MMC1_DUCATI_SHIFT 1 |
1884 | #define OMAP4430_WKUPDEP_MMC1_DUCATI_MASK BITFIELD(1, 1) | 1992 | #define OMAP4430_WKUPDEP_MMC1_DUCATI_MASK (1 << 1) |
1885 | 1993 | ||
1886 | /* Used by PM_L3INIT_MMC1_WKDEP */ | 1994 | /* Used by PM_L3INIT_MMC1_WKDEP */ |
1887 | #define OMAP4430_WKUPDEP_MMC1_MPU_SHIFT 0 | 1995 | #define OMAP4430_WKUPDEP_MMC1_MPU_SHIFT 0 |
1888 | #define OMAP4430_WKUPDEP_MMC1_MPU_MASK BITFIELD(0, 0) | 1996 | #define OMAP4430_WKUPDEP_MMC1_MPU_MASK (1 << 0) |
1889 | 1997 | ||
1890 | /* Used by PM_L3INIT_MMC1_WKDEP */ | 1998 | /* Used by PM_L3INIT_MMC1_WKDEP */ |
1891 | #define OMAP4430_WKUPDEP_MMC1_SDMA_SHIFT 3 | 1999 | #define OMAP4430_WKUPDEP_MMC1_SDMA_SHIFT 3 |
1892 | #define OMAP4430_WKUPDEP_MMC1_SDMA_MASK BITFIELD(3, 3) | 2000 | #define OMAP4430_WKUPDEP_MMC1_SDMA_MASK (1 << 3) |
1893 | 2001 | ||
1894 | /* Used by PM_L3INIT_MMC1_WKDEP */ | 2002 | /* Used by PM_L3INIT_MMC1_WKDEP */ |
1895 | #define OMAP4430_WKUPDEP_MMC1_TESLA_SHIFT 2 | 2003 | #define OMAP4430_WKUPDEP_MMC1_TESLA_SHIFT 2 |
1896 | #define OMAP4430_WKUPDEP_MMC1_TESLA_MASK BITFIELD(2, 2) | 2004 | #define OMAP4430_WKUPDEP_MMC1_TESLA_MASK (1 << 2) |
1897 | 2005 | ||
1898 | /* Used by PM_L3INIT_MMC2_WKDEP */ | 2006 | /* Used by PM_L3INIT_MMC2_WKDEP */ |
1899 | #define OMAP4430_WKUPDEP_MMC2_DUCATI_SHIFT 1 | 2007 | #define OMAP4430_WKUPDEP_MMC2_DUCATI_SHIFT 1 |
1900 | #define OMAP4430_WKUPDEP_MMC2_DUCATI_MASK BITFIELD(1, 1) | 2008 | #define OMAP4430_WKUPDEP_MMC2_DUCATI_MASK (1 << 1) |
1901 | 2009 | ||
1902 | /* Used by PM_L3INIT_MMC2_WKDEP */ | 2010 | /* Used by PM_L3INIT_MMC2_WKDEP */ |
1903 | #define OMAP4430_WKUPDEP_MMC2_MPU_SHIFT 0 | 2011 | #define OMAP4430_WKUPDEP_MMC2_MPU_SHIFT 0 |
1904 | #define OMAP4430_WKUPDEP_MMC2_MPU_MASK BITFIELD(0, 0) | 2012 | #define OMAP4430_WKUPDEP_MMC2_MPU_MASK (1 << 0) |
1905 | 2013 | ||
1906 | /* Used by PM_L3INIT_MMC2_WKDEP */ | 2014 | /* Used by PM_L3INIT_MMC2_WKDEP */ |
1907 | #define OMAP4430_WKUPDEP_MMC2_SDMA_SHIFT 3 | 2015 | #define OMAP4430_WKUPDEP_MMC2_SDMA_SHIFT 3 |
1908 | #define OMAP4430_WKUPDEP_MMC2_SDMA_MASK BITFIELD(3, 3) | 2016 | #define OMAP4430_WKUPDEP_MMC2_SDMA_MASK (1 << 3) |
1909 | 2017 | ||
1910 | /* Used by PM_L3INIT_MMC2_WKDEP */ | 2018 | /* Used by PM_L3INIT_MMC2_WKDEP */ |
1911 | #define OMAP4430_WKUPDEP_MMC2_TESLA_SHIFT 2 | 2019 | #define OMAP4430_WKUPDEP_MMC2_TESLA_SHIFT 2 |
1912 | #define OMAP4430_WKUPDEP_MMC2_TESLA_MASK BITFIELD(2, 2) | 2020 | #define OMAP4430_WKUPDEP_MMC2_TESLA_MASK (1 << 2) |
1913 | 2021 | ||
1914 | /* Used by PM_L3INIT_MMC6_WKDEP */ | 2022 | /* Used by PM_L3INIT_MMC6_WKDEP */ |
1915 | #define OMAP4430_WKUPDEP_MMC6_DUCATI_SHIFT 1 | 2023 | #define OMAP4430_WKUPDEP_MMC6_DUCATI_SHIFT 1 |
1916 | #define OMAP4430_WKUPDEP_MMC6_DUCATI_MASK BITFIELD(1, 1) | 2024 | #define OMAP4430_WKUPDEP_MMC6_DUCATI_MASK (1 << 1) |
1917 | 2025 | ||
1918 | /* Used by PM_L3INIT_MMC6_WKDEP */ | 2026 | /* Used by PM_L3INIT_MMC6_WKDEP */ |
1919 | #define OMAP4430_WKUPDEP_MMC6_MPU_SHIFT 0 | 2027 | #define OMAP4430_WKUPDEP_MMC6_MPU_SHIFT 0 |
1920 | #define OMAP4430_WKUPDEP_MMC6_MPU_MASK BITFIELD(0, 0) | 2028 | #define OMAP4430_WKUPDEP_MMC6_MPU_MASK (1 << 0) |
1921 | 2029 | ||
1922 | /* Used by PM_L3INIT_MMC6_WKDEP */ | 2030 | /* Used by PM_L3INIT_MMC6_WKDEP */ |
1923 | #define OMAP4430_WKUPDEP_MMC6_TESLA_SHIFT 2 | 2031 | #define OMAP4430_WKUPDEP_MMC6_TESLA_SHIFT 2 |
1924 | #define OMAP4430_WKUPDEP_MMC6_TESLA_MASK BITFIELD(2, 2) | 2032 | #define OMAP4430_WKUPDEP_MMC6_TESLA_MASK (1 << 2) |
1925 | 2033 | ||
1926 | /* Used by PM_L4PER_MMCSD3_WKDEP */ | 2034 | /* Used by PM_L4PER_MMCSD3_WKDEP */ |
1927 | #define OMAP4430_WKUPDEP_MMCSD3_DUCATI_SHIFT 1 | 2035 | #define OMAP4430_WKUPDEP_MMCSD3_DUCATI_SHIFT 1 |
1928 | #define OMAP4430_WKUPDEP_MMCSD3_DUCATI_MASK BITFIELD(1, 1) | 2036 | #define OMAP4430_WKUPDEP_MMCSD3_DUCATI_MASK (1 << 1) |
1929 | 2037 | ||
1930 | /* Used by PM_L4PER_MMCSD3_WKDEP */ | 2038 | /* Used by PM_L4PER_MMCSD3_WKDEP */ |
1931 | #define OMAP4430_WKUPDEP_MMCSD3_MPU_SHIFT 0 | 2039 | #define OMAP4430_WKUPDEP_MMCSD3_MPU_SHIFT 0 |
1932 | #define OMAP4430_WKUPDEP_MMCSD3_MPU_MASK BITFIELD(0, 0) | 2040 | #define OMAP4430_WKUPDEP_MMCSD3_MPU_MASK (1 << 0) |
1933 | 2041 | ||
1934 | /* Used by PM_L4PER_MMCSD3_WKDEP */ | 2042 | /* Used by PM_L4PER_MMCSD3_WKDEP */ |
1935 | #define OMAP4430_WKUPDEP_MMCSD3_SDMA_SHIFT 3 | 2043 | #define OMAP4430_WKUPDEP_MMCSD3_SDMA_SHIFT 3 |
1936 | #define OMAP4430_WKUPDEP_MMCSD3_SDMA_MASK BITFIELD(3, 3) | 2044 | #define OMAP4430_WKUPDEP_MMCSD3_SDMA_MASK (1 << 3) |
1937 | 2045 | ||
1938 | /* Used by PM_L4PER_MMCSD4_WKDEP */ | 2046 | /* Used by PM_L4PER_MMCSD4_WKDEP */ |
1939 | #define OMAP4430_WKUPDEP_MMCSD4_DUCATI_SHIFT 1 | 2047 | #define OMAP4430_WKUPDEP_MMCSD4_DUCATI_SHIFT 1 |
1940 | #define OMAP4430_WKUPDEP_MMCSD4_DUCATI_MASK BITFIELD(1, 1) | 2048 | #define OMAP4430_WKUPDEP_MMCSD4_DUCATI_MASK (1 << 1) |
1941 | 2049 | ||
1942 | /* Used by PM_L4PER_MMCSD4_WKDEP */ | 2050 | /* Used by PM_L4PER_MMCSD4_WKDEP */ |
1943 | #define OMAP4430_WKUPDEP_MMCSD4_MPU_SHIFT 0 | 2051 | #define OMAP4430_WKUPDEP_MMCSD4_MPU_SHIFT 0 |
1944 | #define OMAP4430_WKUPDEP_MMCSD4_MPU_MASK BITFIELD(0, 0) | 2052 | #define OMAP4430_WKUPDEP_MMCSD4_MPU_MASK (1 << 0) |
1945 | 2053 | ||
1946 | /* Used by PM_L4PER_MMCSD4_WKDEP */ | 2054 | /* Used by PM_L4PER_MMCSD4_WKDEP */ |
1947 | #define OMAP4430_WKUPDEP_MMCSD4_SDMA_SHIFT 3 | 2055 | #define OMAP4430_WKUPDEP_MMCSD4_SDMA_SHIFT 3 |
1948 | #define OMAP4430_WKUPDEP_MMCSD4_SDMA_MASK BITFIELD(3, 3) | 2056 | #define OMAP4430_WKUPDEP_MMCSD4_SDMA_MASK (1 << 3) |
1949 | 2057 | ||
1950 | /* Used by PM_L4PER_MMCSD5_WKDEP */ | 2058 | /* Used by PM_L4PER_MMCSD5_WKDEP */ |
1951 | #define OMAP4430_WKUPDEP_MMCSD5_DUCATI_SHIFT 1 | 2059 | #define OMAP4430_WKUPDEP_MMCSD5_DUCATI_SHIFT 1 |
1952 | #define OMAP4430_WKUPDEP_MMCSD5_DUCATI_MASK BITFIELD(1, 1) | 2060 | #define OMAP4430_WKUPDEP_MMCSD5_DUCATI_MASK (1 << 1) |
1953 | 2061 | ||
1954 | /* Used by PM_L4PER_MMCSD5_WKDEP */ | 2062 | /* Used by PM_L4PER_MMCSD5_WKDEP */ |
1955 | #define OMAP4430_WKUPDEP_MMCSD5_MPU_SHIFT 0 | 2063 | #define OMAP4430_WKUPDEP_MMCSD5_MPU_SHIFT 0 |
1956 | #define OMAP4430_WKUPDEP_MMCSD5_MPU_MASK BITFIELD(0, 0) | 2064 | #define OMAP4430_WKUPDEP_MMCSD5_MPU_MASK (1 << 0) |
1957 | 2065 | ||
1958 | /* Used by PM_L4PER_MMCSD5_WKDEP */ | 2066 | /* Used by PM_L4PER_MMCSD5_WKDEP */ |
1959 | #define OMAP4430_WKUPDEP_MMCSD5_SDMA_SHIFT 3 | 2067 | #define OMAP4430_WKUPDEP_MMCSD5_SDMA_SHIFT 3 |
1960 | #define OMAP4430_WKUPDEP_MMCSD5_SDMA_MASK BITFIELD(3, 3) | 2068 | #define OMAP4430_WKUPDEP_MMCSD5_SDMA_MASK (1 << 3) |
1961 | 2069 | ||
1962 | /* Used by PM_L3INIT_PCIESS_WKDEP */ | 2070 | /* Used by PM_L3INIT_PCIESS_WKDEP */ |
1963 | #define OMAP4430_WKUPDEP_PCIESS_MPU_SHIFT 0 | 2071 | #define OMAP4430_WKUPDEP_PCIESS_MPU_SHIFT 0 |
1964 | #define OMAP4430_WKUPDEP_PCIESS_MPU_MASK BITFIELD(0, 0) | 2072 | #define OMAP4430_WKUPDEP_PCIESS_MPU_MASK (1 << 0) |
1965 | 2073 | ||
1966 | /* Used by PM_L3INIT_PCIESS_WKDEP */ | 2074 | /* Used by PM_L3INIT_PCIESS_WKDEP */ |
1967 | #define OMAP4430_WKUPDEP_PCIESS_TESLA_SHIFT 2 | 2075 | #define OMAP4430_WKUPDEP_PCIESS_TESLA_SHIFT 2 |
1968 | #define OMAP4430_WKUPDEP_PCIESS_TESLA_MASK BITFIELD(2, 2) | 2076 | #define OMAP4430_WKUPDEP_PCIESS_TESLA_MASK (1 << 2) |
1969 | 2077 | ||
1970 | /* Used by PM_ABE_PDM_WKDEP */ | 2078 | /* Used by PM_ABE_PDM_WKDEP */ |
1971 | #define OMAP4430_WKUPDEP_PDM_DMA_SDMA_SHIFT 7 | 2079 | #define OMAP4430_WKUPDEP_PDM_DMA_SDMA_SHIFT 7 |
1972 | #define OMAP4430_WKUPDEP_PDM_DMA_SDMA_MASK BITFIELD(7, 7) | 2080 | #define OMAP4430_WKUPDEP_PDM_DMA_SDMA_MASK (1 << 7) |
1973 | 2081 | ||
1974 | /* Used by PM_ABE_PDM_WKDEP */ | 2082 | /* Used by PM_ABE_PDM_WKDEP */ |
1975 | #define OMAP4430_WKUPDEP_PDM_DMA_TESLA_SHIFT 6 | 2083 | #define OMAP4430_WKUPDEP_PDM_DMA_TESLA_SHIFT 6 |
1976 | #define OMAP4430_WKUPDEP_PDM_DMA_TESLA_MASK BITFIELD(6, 6) | 2084 | #define OMAP4430_WKUPDEP_PDM_DMA_TESLA_MASK (1 << 6) |
1977 | 2085 | ||
1978 | /* Used by PM_ABE_PDM_WKDEP */ | 2086 | /* Used by PM_ABE_PDM_WKDEP */ |
1979 | #define OMAP4430_WKUPDEP_PDM_IRQ_MPU_SHIFT 0 | 2087 | #define OMAP4430_WKUPDEP_PDM_IRQ_MPU_SHIFT 0 |
1980 | #define OMAP4430_WKUPDEP_PDM_IRQ_MPU_MASK BITFIELD(0, 0) | 2088 | #define OMAP4430_WKUPDEP_PDM_IRQ_MPU_MASK (1 << 0) |
1981 | 2089 | ||
1982 | /* Used by PM_ABE_PDM_WKDEP */ | 2090 | /* Used by PM_ABE_PDM_WKDEP */ |
1983 | #define OMAP4430_WKUPDEP_PDM_IRQ_TESLA_SHIFT 2 | 2091 | #define OMAP4430_WKUPDEP_PDM_IRQ_TESLA_SHIFT 2 |
1984 | #define OMAP4430_WKUPDEP_PDM_IRQ_TESLA_MASK BITFIELD(2, 2) | 2092 | #define OMAP4430_WKUPDEP_PDM_IRQ_TESLA_MASK (1 << 2) |
1985 | 2093 | ||
1986 | /* Used by PM_WKUP_RTC_WKDEP */ | 2094 | /* Used by PM_WKUP_RTC_WKDEP */ |
1987 | #define OMAP4430_WKUPDEP_RTC_MPU_SHIFT 0 | 2095 | #define OMAP4430_WKUPDEP_RTC_MPU_SHIFT 0 |
1988 | #define OMAP4430_WKUPDEP_RTC_MPU_MASK BITFIELD(0, 0) | 2096 | #define OMAP4430_WKUPDEP_RTC_MPU_MASK (1 << 0) |
1989 | 2097 | ||
1990 | /* Used by PM_L3INIT_SATA_WKDEP */ | 2098 | /* Used by PM_L3INIT_SATA_WKDEP */ |
1991 | #define OMAP4430_WKUPDEP_SATA_MPU_SHIFT 0 | 2099 | #define OMAP4430_WKUPDEP_SATA_MPU_SHIFT 0 |
1992 | #define OMAP4430_WKUPDEP_SATA_MPU_MASK BITFIELD(0, 0) | 2100 | #define OMAP4430_WKUPDEP_SATA_MPU_MASK (1 << 0) |
1993 | 2101 | ||
1994 | /* Used by PM_L3INIT_SATA_WKDEP */ | 2102 | /* Used by PM_L3INIT_SATA_WKDEP */ |
1995 | #define OMAP4430_WKUPDEP_SATA_TESLA_SHIFT 2 | 2103 | #define OMAP4430_WKUPDEP_SATA_TESLA_SHIFT 2 |
1996 | #define OMAP4430_WKUPDEP_SATA_TESLA_MASK BITFIELD(2, 2) | 2104 | #define OMAP4430_WKUPDEP_SATA_TESLA_MASK (1 << 2) |
1997 | 2105 | ||
1998 | /* Used by PM_ABE_SLIMBUS_WKDEP */ | 2106 | /* Used by PM_ABE_SLIMBUS_WKDEP */ |
1999 | #define OMAP4430_WKUPDEP_SLIMBUS1_DMA_SDMA_SHIFT 7 | 2107 | #define OMAP4430_WKUPDEP_SLIMBUS1_DMA_SDMA_SHIFT 7 |
2000 | #define OMAP4430_WKUPDEP_SLIMBUS1_DMA_SDMA_MASK BITFIELD(7, 7) | 2108 | #define OMAP4430_WKUPDEP_SLIMBUS1_DMA_SDMA_MASK (1 << 7) |
2001 | 2109 | ||
2002 | /* Used by PM_ABE_SLIMBUS_WKDEP */ | 2110 | /* Used by PM_ABE_SLIMBUS_WKDEP */ |
2003 | #define OMAP4430_WKUPDEP_SLIMBUS1_DMA_TESLA_SHIFT 6 | 2111 | #define OMAP4430_WKUPDEP_SLIMBUS1_DMA_TESLA_SHIFT 6 |
2004 | #define OMAP4430_WKUPDEP_SLIMBUS1_DMA_TESLA_MASK BITFIELD(6, 6) | 2112 | #define OMAP4430_WKUPDEP_SLIMBUS1_DMA_TESLA_MASK (1 << 6) |
2005 | 2113 | ||
2006 | /* Used by PM_ABE_SLIMBUS_WKDEP */ | 2114 | /* Used by PM_ABE_SLIMBUS_WKDEP */ |
2007 | #define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_MPU_SHIFT 0 | 2115 | #define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_MPU_SHIFT 0 |
2008 | #define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_MPU_MASK BITFIELD(0, 0) | 2116 | #define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_MPU_MASK (1 << 0) |
2009 | 2117 | ||
2010 | /* Used by PM_ABE_SLIMBUS_WKDEP */ | 2118 | /* Used by PM_ABE_SLIMBUS_WKDEP */ |
2011 | #define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_TESLA_SHIFT 2 | 2119 | #define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_TESLA_SHIFT 2 |
2012 | #define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_TESLA_MASK BITFIELD(2, 2) | 2120 | #define OMAP4430_WKUPDEP_SLIMBUS1_IRQ_TESLA_MASK (1 << 2) |
2013 | 2121 | ||
2014 | /* Used by PM_L4PER_SLIMBUS2_WKDEP */ | 2122 | /* Used by PM_L4PER_SLIMBUS2_WKDEP */ |
2015 | #define OMAP4430_WKUPDEP_SLIMBUS2_DMA_SDMA_SHIFT 7 | 2123 | #define OMAP4430_WKUPDEP_SLIMBUS2_DMA_SDMA_SHIFT 7 |
2016 | #define OMAP4430_WKUPDEP_SLIMBUS2_DMA_SDMA_MASK BITFIELD(7, 7) | 2124 | #define OMAP4430_WKUPDEP_SLIMBUS2_DMA_SDMA_MASK (1 << 7) |
2017 | 2125 | ||
2018 | /* Used by PM_L4PER_SLIMBUS2_WKDEP */ | 2126 | /* Used by PM_L4PER_SLIMBUS2_WKDEP */ |
2019 | #define OMAP4430_WKUPDEP_SLIMBUS2_DMA_TESLA_SHIFT 6 | 2127 | #define OMAP4430_WKUPDEP_SLIMBUS2_DMA_TESLA_SHIFT 6 |
2020 | #define OMAP4430_WKUPDEP_SLIMBUS2_DMA_TESLA_MASK BITFIELD(6, 6) | 2128 | #define OMAP4430_WKUPDEP_SLIMBUS2_DMA_TESLA_MASK (1 << 6) |
2021 | 2129 | ||
2022 | /* Used by PM_L4PER_SLIMBUS2_WKDEP */ | 2130 | /* Used by PM_L4PER_SLIMBUS2_WKDEP */ |
2023 | #define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_MPU_SHIFT 0 | 2131 | #define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_MPU_SHIFT 0 |
2024 | #define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_MPU_MASK BITFIELD(0, 0) | 2132 | #define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_MPU_MASK (1 << 0) |
2025 | 2133 | ||
2026 | /* Used by PM_L4PER_SLIMBUS2_WKDEP */ | 2134 | /* Used by PM_L4PER_SLIMBUS2_WKDEP */ |
2027 | #define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_TESLA_SHIFT 2 | 2135 | #define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_TESLA_SHIFT 2 |
2028 | #define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_TESLA_MASK BITFIELD(2, 2) | 2136 | #define OMAP4430_WKUPDEP_SLIMBUS2_IRQ_TESLA_MASK (1 << 2) |
2029 | 2137 | ||
2030 | /* Used by PM_ALWON_SR_CORE_WKDEP */ | 2138 | /* Used by PM_ALWON_SR_CORE_WKDEP */ |
2031 | #define OMAP4430_WKUPDEP_SR_CORE_DUCATI_SHIFT 1 | 2139 | #define OMAP4430_WKUPDEP_SR_CORE_DUCATI_SHIFT 1 |
2032 | #define OMAP4430_WKUPDEP_SR_CORE_DUCATI_MASK BITFIELD(1, 1) | 2140 | #define OMAP4430_WKUPDEP_SR_CORE_DUCATI_MASK (1 << 1) |
2033 | 2141 | ||
2034 | /* Used by PM_ALWON_SR_CORE_WKDEP */ | 2142 | /* Used by PM_ALWON_SR_CORE_WKDEP */ |
2035 | #define OMAP4430_WKUPDEP_SR_CORE_MPU_SHIFT 0 | 2143 | #define OMAP4430_WKUPDEP_SR_CORE_MPU_SHIFT 0 |
2036 | #define OMAP4430_WKUPDEP_SR_CORE_MPU_MASK BITFIELD(0, 0) | 2144 | #define OMAP4430_WKUPDEP_SR_CORE_MPU_MASK (1 << 0) |
2037 | 2145 | ||
2038 | /* Used by PM_ALWON_SR_IVA_WKDEP */ | 2146 | /* Used by PM_ALWON_SR_IVA_WKDEP */ |
2039 | #define OMAP4430_WKUPDEP_SR_IVA_DUCATI_SHIFT 1 | 2147 | #define OMAP4430_WKUPDEP_SR_IVA_DUCATI_SHIFT 1 |
2040 | #define OMAP4430_WKUPDEP_SR_IVA_DUCATI_MASK BITFIELD(1, 1) | 2148 | #define OMAP4430_WKUPDEP_SR_IVA_DUCATI_MASK (1 << 1) |
2041 | 2149 | ||
2042 | /* Used by PM_ALWON_SR_IVA_WKDEP */ | 2150 | /* Used by PM_ALWON_SR_IVA_WKDEP */ |
2043 | #define OMAP4430_WKUPDEP_SR_IVA_MPU_SHIFT 0 | 2151 | #define OMAP4430_WKUPDEP_SR_IVA_MPU_SHIFT 0 |
2044 | #define OMAP4430_WKUPDEP_SR_IVA_MPU_MASK BITFIELD(0, 0) | 2152 | #define OMAP4430_WKUPDEP_SR_IVA_MPU_MASK (1 << 0) |
2045 | 2153 | ||
2046 | /* Used by PM_ALWON_SR_MPU_WKDEP */ | 2154 | /* Used by PM_ALWON_SR_MPU_WKDEP */ |
2047 | #define OMAP4430_WKUPDEP_SR_MPU_MPU_SHIFT 0 | 2155 | #define OMAP4430_WKUPDEP_SR_MPU_MPU_SHIFT 0 |
2048 | #define OMAP4430_WKUPDEP_SR_MPU_MPU_MASK BITFIELD(0, 0) | 2156 | #define OMAP4430_WKUPDEP_SR_MPU_MPU_MASK (1 << 0) |
2049 | 2157 | ||
2050 | /* Used by PM_WKUP_TIMER12_WKDEP */ | 2158 | /* Used by PM_WKUP_TIMER12_WKDEP */ |
2051 | #define OMAP4430_WKUPDEP_TIMER12_MPU_SHIFT 0 | 2159 | #define OMAP4430_WKUPDEP_TIMER12_MPU_SHIFT 0 |
2052 | #define OMAP4430_WKUPDEP_TIMER12_MPU_MASK BITFIELD(0, 0) | 2160 | #define OMAP4430_WKUPDEP_TIMER12_MPU_MASK (1 << 0) |
2053 | 2161 | ||
2054 | /* Used by PM_WKUP_TIMER1_WKDEP */ | 2162 | /* Used by PM_WKUP_TIMER1_WKDEP */ |
2055 | #define OMAP4430_WKUPDEP_TIMER1_MPU_SHIFT 0 | 2163 | #define OMAP4430_WKUPDEP_TIMER1_MPU_SHIFT 0 |
2056 | #define OMAP4430_WKUPDEP_TIMER1_MPU_MASK BITFIELD(0, 0) | 2164 | #define OMAP4430_WKUPDEP_TIMER1_MPU_MASK (1 << 0) |
2057 | 2165 | ||
2058 | /* Used by PM_ABE_TIMER5_WKDEP */ | 2166 | /* Used by PM_ABE_TIMER5_WKDEP */ |
2059 | #define OMAP4430_WKUPDEP_TIMER5_MPU_SHIFT 0 | 2167 | #define OMAP4430_WKUPDEP_TIMER5_MPU_SHIFT 0 |
2060 | #define OMAP4430_WKUPDEP_TIMER5_MPU_MASK BITFIELD(0, 0) | 2168 | #define OMAP4430_WKUPDEP_TIMER5_MPU_MASK (1 << 0) |
2061 | 2169 | ||
2062 | /* Used by PM_ABE_TIMER5_WKDEP */ | 2170 | /* Used by PM_ABE_TIMER5_WKDEP */ |
2063 | #define OMAP4430_WKUPDEP_TIMER5_TESLA_SHIFT 2 | 2171 | #define OMAP4430_WKUPDEP_TIMER5_TESLA_SHIFT 2 |
2064 | #define OMAP4430_WKUPDEP_TIMER5_TESLA_MASK BITFIELD(2, 2) | 2172 | #define OMAP4430_WKUPDEP_TIMER5_TESLA_MASK (1 << 2) |
2065 | 2173 | ||
2066 | /* Used by PM_ABE_TIMER6_WKDEP */ | 2174 | /* Used by PM_ABE_TIMER6_WKDEP */ |
2067 | #define OMAP4430_WKUPDEP_TIMER6_MPU_SHIFT 0 | 2175 | #define OMAP4430_WKUPDEP_TIMER6_MPU_SHIFT 0 |
2068 | #define OMAP4430_WKUPDEP_TIMER6_MPU_MASK BITFIELD(0, 0) | 2176 | #define OMAP4430_WKUPDEP_TIMER6_MPU_MASK (1 << 0) |
2069 | 2177 | ||
2070 | /* Used by PM_ABE_TIMER6_WKDEP */ | 2178 | /* Used by PM_ABE_TIMER6_WKDEP */ |
2071 | #define OMAP4430_WKUPDEP_TIMER6_TESLA_SHIFT 2 | 2179 | #define OMAP4430_WKUPDEP_TIMER6_TESLA_SHIFT 2 |
2072 | #define OMAP4430_WKUPDEP_TIMER6_TESLA_MASK BITFIELD(2, 2) | 2180 | #define OMAP4430_WKUPDEP_TIMER6_TESLA_MASK (1 << 2) |
2073 | 2181 | ||
2074 | /* Used by PM_ABE_TIMER7_WKDEP */ | 2182 | /* Used by PM_ABE_TIMER7_WKDEP */ |
2075 | #define OMAP4430_WKUPDEP_TIMER7_MPU_SHIFT 0 | 2183 | #define OMAP4430_WKUPDEP_TIMER7_MPU_SHIFT 0 |
2076 | #define OMAP4430_WKUPDEP_TIMER7_MPU_MASK BITFIELD(0, 0) | 2184 | #define OMAP4430_WKUPDEP_TIMER7_MPU_MASK (1 << 0) |
2077 | 2185 | ||
2078 | /* Used by PM_ABE_TIMER7_WKDEP */ | 2186 | /* Used by PM_ABE_TIMER7_WKDEP */ |
2079 | #define OMAP4430_WKUPDEP_TIMER7_TESLA_SHIFT 2 | 2187 | #define OMAP4430_WKUPDEP_TIMER7_TESLA_SHIFT 2 |
2080 | #define OMAP4430_WKUPDEP_TIMER7_TESLA_MASK BITFIELD(2, 2) | 2188 | #define OMAP4430_WKUPDEP_TIMER7_TESLA_MASK (1 << 2) |
2081 | 2189 | ||
2082 | /* Used by PM_ABE_TIMER8_WKDEP */ | 2190 | /* Used by PM_ABE_TIMER8_WKDEP */ |
2083 | #define OMAP4430_WKUPDEP_TIMER8_MPU_SHIFT 0 | 2191 | #define OMAP4430_WKUPDEP_TIMER8_MPU_SHIFT 0 |
2084 | #define OMAP4430_WKUPDEP_TIMER8_MPU_MASK BITFIELD(0, 0) | 2192 | #define OMAP4430_WKUPDEP_TIMER8_MPU_MASK (1 << 0) |
2085 | 2193 | ||
2086 | /* Used by PM_ABE_TIMER8_WKDEP */ | 2194 | /* Used by PM_ABE_TIMER8_WKDEP */ |
2087 | #define OMAP4430_WKUPDEP_TIMER8_TESLA_SHIFT 2 | 2195 | #define OMAP4430_WKUPDEP_TIMER8_TESLA_SHIFT 2 |
2088 | #define OMAP4430_WKUPDEP_TIMER8_TESLA_MASK BITFIELD(2, 2) | 2196 | #define OMAP4430_WKUPDEP_TIMER8_TESLA_MASK (1 << 2) |
2089 | 2197 | ||
2090 | /* Used by PM_L4PER_UART1_WKDEP */ | 2198 | /* Used by PM_L4PER_UART1_WKDEP */ |
2091 | #define OMAP4430_WKUPDEP_UART1_MPU_SHIFT 0 | 2199 | #define OMAP4430_WKUPDEP_UART1_MPU_SHIFT 0 |
2092 | #define OMAP4430_WKUPDEP_UART1_MPU_MASK BITFIELD(0, 0) | 2200 | #define OMAP4430_WKUPDEP_UART1_MPU_MASK (1 << 0) |
2093 | 2201 | ||
2094 | /* Used by PM_L4PER_UART1_WKDEP */ | 2202 | /* Used by PM_L4PER_UART1_WKDEP */ |
2095 | #define OMAP4430_WKUPDEP_UART1_SDMA_SHIFT 3 | 2203 | #define OMAP4430_WKUPDEP_UART1_SDMA_SHIFT 3 |
2096 | #define OMAP4430_WKUPDEP_UART1_SDMA_MASK BITFIELD(3, 3) | 2204 | #define OMAP4430_WKUPDEP_UART1_SDMA_MASK (1 << 3) |
2097 | 2205 | ||
2098 | /* Used by PM_L4PER_UART2_WKDEP */ | 2206 | /* Used by PM_L4PER_UART2_WKDEP */ |
2099 | #define OMAP4430_WKUPDEP_UART2_MPU_SHIFT 0 | 2207 | #define OMAP4430_WKUPDEP_UART2_MPU_SHIFT 0 |
2100 | #define OMAP4430_WKUPDEP_UART2_MPU_MASK BITFIELD(0, 0) | 2208 | #define OMAP4430_WKUPDEP_UART2_MPU_MASK (1 << 0) |
2101 | 2209 | ||
2102 | /* Used by PM_L4PER_UART2_WKDEP */ | 2210 | /* Used by PM_L4PER_UART2_WKDEP */ |
2103 | #define OMAP4430_WKUPDEP_UART2_SDMA_SHIFT 3 | 2211 | #define OMAP4430_WKUPDEP_UART2_SDMA_SHIFT 3 |
2104 | #define OMAP4430_WKUPDEP_UART2_SDMA_MASK BITFIELD(3, 3) | 2212 | #define OMAP4430_WKUPDEP_UART2_SDMA_MASK (1 << 3) |
2105 | 2213 | ||
2106 | /* Used by PM_L4PER_UART3_WKDEP */ | 2214 | /* Used by PM_L4PER_UART3_WKDEP */ |
2107 | #define OMAP4430_WKUPDEP_UART3_DUCATI_SHIFT 1 | 2215 | #define OMAP4430_WKUPDEP_UART3_DUCATI_SHIFT 1 |
2108 | #define OMAP4430_WKUPDEP_UART3_DUCATI_MASK BITFIELD(1, 1) | 2216 | #define OMAP4430_WKUPDEP_UART3_DUCATI_MASK (1 << 1) |
2109 | 2217 | ||
2110 | /* Used by PM_L4PER_UART3_WKDEP */ | 2218 | /* Used by PM_L4PER_UART3_WKDEP */ |
2111 | #define OMAP4430_WKUPDEP_UART3_MPU_SHIFT 0 | 2219 | #define OMAP4430_WKUPDEP_UART3_MPU_SHIFT 0 |
2112 | #define OMAP4430_WKUPDEP_UART3_MPU_MASK BITFIELD(0, 0) | 2220 | #define OMAP4430_WKUPDEP_UART3_MPU_MASK (1 << 0) |
2113 | 2221 | ||
2114 | /* Used by PM_L4PER_UART3_WKDEP */ | 2222 | /* Used by PM_L4PER_UART3_WKDEP */ |
2115 | #define OMAP4430_WKUPDEP_UART3_SDMA_SHIFT 3 | 2223 | #define OMAP4430_WKUPDEP_UART3_SDMA_SHIFT 3 |
2116 | #define OMAP4430_WKUPDEP_UART3_SDMA_MASK BITFIELD(3, 3) | 2224 | #define OMAP4430_WKUPDEP_UART3_SDMA_MASK (1 << 3) |
2117 | 2225 | ||
2118 | /* Used by PM_L4PER_UART3_WKDEP */ | 2226 | /* Used by PM_L4PER_UART3_WKDEP */ |
2119 | #define OMAP4430_WKUPDEP_UART3_TESLA_SHIFT 2 | 2227 | #define OMAP4430_WKUPDEP_UART3_TESLA_SHIFT 2 |
2120 | #define OMAP4430_WKUPDEP_UART3_TESLA_MASK BITFIELD(2, 2) | 2228 | #define OMAP4430_WKUPDEP_UART3_TESLA_MASK (1 << 2) |
2121 | 2229 | ||
2122 | /* Used by PM_L4PER_UART4_WKDEP */ | 2230 | /* Used by PM_L4PER_UART4_WKDEP */ |
2123 | #define OMAP4430_WKUPDEP_UART4_MPU_SHIFT 0 | 2231 | #define OMAP4430_WKUPDEP_UART4_MPU_SHIFT 0 |
2124 | #define OMAP4430_WKUPDEP_UART4_MPU_MASK BITFIELD(0, 0) | 2232 | #define OMAP4430_WKUPDEP_UART4_MPU_MASK (1 << 0) |
2125 | 2233 | ||
2126 | /* Used by PM_L4PER_UART4_WKDEP */ | 2234 | /* Used by PM_L4PER_UART4_WKDEP */ |
2127 | #define OMAP4430_WKUPDEP_UART4_SDMA_SHIFT 3 | 2235 | #define OMAP4430_WKUPDEP_UART4_SDMA_SHIFT 3 |
2128 | #define OMAP4430_WKUPDEP_UART4_SDMA_MASK BITFIELD(3, 3) | 2236 | #define OMAP4430_WKUPDEP_UART4_SDMA_MASK (1 << 3) |
2129 | 2237 | ||
2130 | /* Used by PM_L3INIT_UNIPRO1_WKDEP */ | 2238 | /* Used by PM_L3INIT_UNIPRO1_WKDEP */ |
2131 | #define OMAP4430_WKUPDEP_UNIPRO1_DUCATI_SHIFT 1 | 2239 | #define OMAP4430_WKUPDEP_UNIPRO1_DUCATI_SHIFT 1 |
2132 | #define OMAP4430_WKUPDEP_UNIPRO1_DUCATI_MASK BITFIELD(1, 1) | 2240 | #define OMAP4430_WKUPDEP_UNIPRO1_DUCATI_MASK (1 << 1) |
2133 | 2241 | ||
2134 | /* Used by PM_L3INIT_UNIPRO1_WKDEP */ | 2242 | /* Used by PM_L3INIT_UNIPRO1_WKDEP */ |
2135 | #define OMAP4430_WKUPDEP_UNIPRO1_MPU_SHIFT 0 | 2243 | #define OMAP4430_WKUPDEP_UNIPRO1_MPU_SHIFT 0 |
2136 | #define OMAP4430_WKUPDEP_UNIPRO1_MPU_MASK BITFIELD(0, 0) | 2244 | #define OMAP4430_WKUPDEP_UNIPRO1_MPU_MASK (1 << 0) |
2137 | 2245 | ||
2138 | /* Used by PM_L3INIT_USB_HOST_WKDEP */ | 2246 | /* Used by PM_L3INIT_USB_HOST_WKDEP */ |
2139 | #define OMAP4430_WKUPDEP_USB_HOST_DUCATI_SHIFT 1 | 2247 | #define OMAP4430_WKUPDEP_USB_HOST_DUCATI_SHIFT 1 |
2140 | #define OMAP4430_WKUPDEP_USB_HOST_DUCATI_MASK BITFIELD(1, 1) | 2248 | #define OMAP4430_WKUPDEP_USB_HOST_DUCATI_MASK (1 << 1) |
2141 | 2249 | ||
2142 | /* Used by PM_L3INIT_USB_HOST_FS_WKDEP */ | 2250 | /* Used by PM_L3INIT_USB_HOST_FS_WKDEP */ |
2143 | #define OMAP4430_WKUPDEP_USB_HOST_FS_DUCATI_SHIFT 1 | 2251 | #define OMAP4430_WKUPDEP_USB_HOST_FS_DUCATI_SHIFT 1 |
2144 | #define OMAP4430_WKUPDEP_USB_HOST_FS_DUCATI_MASK BITFIELD(1, 1) | 2252 | #define OMAP4430_WKUPDEP_USB_HOST_FS_DUCATI_MASK (1 << 1) |
2145 | 2253 | ||
2146 | /* Used by PM_L3INIT_USB_HOST_FS_WKDEP */ | 2254 | /* Used by PM_L3INIT_USB_HOST_FS_WKDEP */ |
2147 | #define OMAP4430_WKUPDEP_USB_HOST_FS_MPU_SHIFT 0 | 2255 | #define OMAP4430_WKUPDEP_USB_HOST_FS_MPU_SHIFT 0 |
2148 | #define OMAP4430_WKUPDEP_USB_HOST_FS_MPU_MASK BITFIELD(0, 0) | 2256 | #define OMAP4430_WKUPDEP_USB_HOST_FS_MPU_MASK (1 << 0) |
2149 | 2257 | ||
2150 | /* Used by PM_L3INIT_USB_HOST_WKDEP */ | 2258 | /* Used by PM_L3INIT_USB_HOST_WKDEP */ |
2151 | #define OMAP4430_WKUPDEP_USB_HOST_MPU_SHIFT 0 | 2259 | #define OMAP4430_WKUPDEP_USB_HOST_MPU_SHIFT 0 |
2152 | #define OMAP4430_WKUPDEP_USB_HOST_MPU_MASK BITFIELD(0, 0) | 2260 | #define OMAP4430_WKUPDEP_USB_HOST_MPU_MASK (1 << 0) |
2153 | 2261 | ||
2154 | /* Used by PM_L3INIT_USB_OTG_WKDEP */ | 2262 | /* Used by PM_L3INIT_USB_OTG_WKDEP */ |
2155 | #define OMAP4430_WKUPDEP_USB_OTG_DUCATI_SHIFT 1 | 2263 | #define OMAP4430_WKUPDEP_USB_OTG_DUCATI_SHIFT 1 |
2156 | #define OMAP4430_WKUPDEP_USB_OTG_DUCATI_MASK BITFIELD(1, 1) | 2264 | #define OMAP4430_WKUPDEP_USB_OTG_DUCATI_MASK (1 << 1) |
2157 | 2265 | ||
2158 | /* Used by PM_L3INIT_USB_OTG_WKDEP */ | 2266 | /* Used by PM_L3INIT_USB_OTG_WKDEP */ |
2159 | #define OMAP4430_WKUPDEP_USB_OTG_MPU_SHIFT 0 | 2267 | #define OMAP4430_WKUPDEP_USB_OTG_MPU_SHIFT 0 |
2160 | #define OMAP4430_WKUPDEP_USB_OTG_MPU_MASK BITFIELD(0, 0) | 2268 | #define OMAP4430_WKUPDEP_USB_OTG_MPU_MASK (1 << 0) |
2161 | 2269 | ||
2162 | /* Used by PM_L3INIT_USB_TLL_WKDEP */ | 2270 | /* Used by PM_L3INIT_USB_TLL_WKDEP */ |
2163 | #define OMAP4430_WKUPDEP_USB_TLL_DUCATI_SHIFT 1 | 2271 | #define OMAP4430_WKUPDEP_USB_TLL_DUCATI_SHIFT 1 |
2164 | #define OMAP4430_WKUPDEP_USB_TLL_DUCATI_MASK BITFIELD(1, 1) | 2272 | #define OMAP4430_WKUPDEP_USB_TLL_DUCATI_MASK (1 << 1) |
2165 | 2273 | ||
2166 | /* Used by PM_L3INIT_USB_TLL_WKDEP */ | 2274 | /* Used by PM_L3INIT_USB_TLL_WKDEP */ |
2167 | #define OMAP4430_WKUPDEP_USB_TLL_MPU_SHIFT 0 | 2275 | #define OMAP4430_WKUPDEP_USB_TLL_MPU_SHIFT 0 |
2168 | #define OMAP4430_WKUPDEP_USB_TLL_MPU_MASK BITFIELD(0, 0) | 2276 | #define OMAP4430_WKUPDEP_USB_TLL_MPU_MASK (1 << 0) |
2169 | 2277 | ||
2170 | /* Used by PM_WKUP_USIM_WKDEP */ | 2278 | /* Used by PM_WKUP_USIM_WKDEP */ |
2171 | #define OMAP4430_WKUPDEP_USIM_MPU_SHIFT 0 | 2279 | #define OMAP4430_WKUPDEP_USIM_MPU_SHIFT 0 |
2172 | #define OMAP4430_WKUPDEP_USIM_MPU_MASK BITFIELD(0, 0) | 2280 | #define OMAP4430_WKUPDEP_USIM_MPU_MASK (1 << 0) |
2173 | 2281 | ||
2174 | /* Used by PM_WKUP_USIM_WKDEP */ | 2282 | /* Used by PM_WKUP_USIM_WKDEP */ |
2175 | #define OMAP4430_WKUPDEP_USIM_SDMA_SHIFT 3 | 2283 | #define OMAP4430_WKUPDEP_USIM_SDMA_SHIFT 3 |
2176 | #define OMAP4430_WKUPDEP_USIM_SDMA_MASK BITFIELD(3, 3) | 2284 | #define OMAP4430_WKUPDEP_USIM_SDMA_MASK (1 << 3) |
2177 | 2285 | ||
2178 | /* Used by PM_WKUP_WDT2_WKDEP */ | 2286 | /* Used by PM_WKUP_WDT2_WKDEP */ |
2179 | #define OMAP4430_WKUPDEP_WDT2_DUCATI_SHIFT 1 | 2287 | #define OMAP4430_WKUPDEP_WDT2_DUCATI_SHIFT 1 |
2180 | #define OMAP4430_WKUPDEP_WDT2_DUCATI_MASK BITFIELD(1, 1) | 2288 | #define OMAP4430_WKUPDEP_WDT2_DUCATI_MASK (1 << 1) |
2181 | 2289 | ||
2182 | /* Used by PM_WKUP_WDT2_WKDEP */ | 2290 | /* Used by PM_WKUP_WDT2_WKDEP */ |
2183 | #define OMAP4430_WKUPDEP_WDT2_MPU_SHIFT 0 | 2291 | #define OMAP4430_WKUPDEP_WDT2_MPU_SHIFT 0 |
2184 | #define OMAP4430_WKUPDEP_WDT2_MPU_MASK BITFIELD(0, 0) | 2292 | #define OMAP4430_WKUPDEP_WDT2_MPU_MASK (1 << 0) |
2185 | 2293 | ||
2186 | /* Used by PM_ABE_WDT3_WKDEP */ | 2294 | /* Used by PM_ABE_WDT3_WKDEP */ |
2187 | #define OMAP4430_WKUPDEP_WDT3_MPU_SHIFT 0 | 2295 | #define OMAP4430_WKUPDEP_WDT3_MPU_SHIFT 0 |
2188 | #define OMAP4430_WKUPDEP_WDT3_MPU_MASK BITFIELD(0, 0) | 2296 | #define OMAP4430_WKUPDEP_WDT3_MPU_MASK (1 << 0) |
2189 | 2297 | ||
2190 | /* Used by PM_L3INIT_HSI_WKDEP */ | 2298 | /* Used by PM_L3INIT_HSI_WKDEP */ |
2191 | #define OMAP4430_WKUPDEP_WGM_HSI_WAKE_MPU_SHIFT 8 | 2299 | #define OMAP4430_WKUPDEP_WGM_HSI_WAKE_MPU_SHIFT 8 |
2192 | #define OMAP4430_WKUPDEP_WGM_HSI_WAKE_MPU_MASK BITFIELD(8, 8) | 2300 | #define OMAP4430_WKUPDEP_WGM_HSI_WAKE_MPU_MASK (1 << 8) |
2193 | 2301 | ||
2194 | /* Used by PM_L3INIT_XHPI_WKDEP */ | 2302 | /* Used by PM_L3INIT_XHPI_WKDEP */ |
2195 | #define OMAP4430_WKUPDEP_XHPI_DUCATI_SHIFT 1 | 2303 | #define OMAP4430_WKUPDEP_XHPI_DUCATI_SHIFT 1 |
2196 | #define OMAP4430_WKUPDEP_XHPI_DUCATI_MASK BITFIELD(1, 1) | 2304 | #define OMAP4430_WKUPDEP_XHPI_DUCATI_MASK (1 << 1) |
2197 | 2305 | ||
2198 | /* Used by PRM_IO_PMCTRL */ | 2306 | /* Used by PRM_IO_PMCTRL */ |
2199 | #define OMAP4430_WUCLK_CTRL_SHIFT 8 | 2307 | #define OMAP4430_WUCLK_CTRL_SHIFT 8 |
2200 | #define OMAP4430_WUCLK_CTRL_MASK BITFIELD(8, 8) | 2308 | #define OMAP4430_WUCLK_CTRL_MASK (1 << 8) |
2201 | 2309 | ||
2202 | /* Used by PRM_IO_PMCTRL */ | 2310 | /* Used by PRM_IO_PMCTRL */ |
2203 | #define OMAP4430_WUCLK_STATUS_SHIFT 9 | 2311 | #define OMAP4430_WUCLK_STATUS_SHIFT 9 |
2204 | #define OMAP4430_WUCLK_STATUS_MASK BITFIELD(9, 9) | 2312 | #define OMAP4430_WUCLK_STATUS_MASK (1 << 9) |
2313 | |||
2314 | /* Used by REVISION_PRM */ | ||
2315 | #define OMAP4430_X_MAJOR_SHIFT 8 | ||
2316 | #define OMAP4430_X_MAJOR_MASK (0x7 << 8) | ||
2317 | |||
2318 | /* Used by REVISION_PRM */ | ||
2319 | #define OMAP4430_Y_MINOR_SHIFT 0 | ||
2320 | #define OMAP4430_Y_MINOR_MASK (0x3f << 0) | ||
2205 | #endif | 2321 | #endif |
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h index 588873b9303a..7be040b2fdab 100644 --- a/arch/arm/mach-omap2/prm.h +++ b/arch/arm/mach-omap2/prm.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * OMAP2/3 Power/Reset Management (PRM) register definitions | 5 | * OMAP2/3 Power/Reset Management (PRM) register definitions |
6 | * | 6 | * |
7 | * Copyright (C) 2007-2009 Texas Instruments, Inc. | 7 | * Copyright (C) 2007-2009 Texas Instruments, Inc. |
8 | * Copyright (C) 2009 Nokia Corporation | 8 | * Copyright (C) 2010 Nokia Corporation |
9 | * | 9 | * |
10 | * Written by Paul Walmsley | 10 | * Written by Paul Walmsley |
11 | * | 11 | * |
@@ -246,6 +246,15 @@ static inline u32 prm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx) | |||
246 | return prm_rmw_mod_reg_bits(bits, 0x0, module, idx); | 246 | return prm_rmw_mod_reg_bits(bits, 0x0, module, idx); |
247 | } | 247 | } |
248 | 248 | ||
249 | /* These omap2_ PRM functions apply to both OMAP2 and 3 */ | ||
250 | int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift); | ||
251 | int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift); | ||
252 | int omap2_prm_deassert_hardreset(s16 prm_mod, u8 shift); | ||
253 | |||
254 | int omap4_prm_is_hardreset_asserted(void __iomem *rstctrl_reg, u8 shift); | ||
255 | int omap4_prm_assert_hardreset(void __iomem *rstctrl_reg, u8 shift); | ||
256 | int omap4_prm_deassert_hardreset(void __iomem *rstctrl_reg, u8 shift); | ||
257 | |||
249 | #endif | 258 | #endif |
250 | 259 | ||
251 | /* | 260 | /* |
@@ -398,4 +407,11 @@ static inline u32 prm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx) | |||
398 | #define OMAP_POWERSTATE_MASK (0x3 << 0) | 407 | #define OMAP_POWERSTATE_MASK (0x3 << 0) |
399 | 408 | ||
400 | 409 | ||
410 | /* | ||
411 | * MAX_MODULE_HARDRESET_WAIT: Maximum microseconds to wait for an OMAP | ||
412 | * submodule to exit hardreset | ||
413 | */ | ||
414 | #define MAX_MODULE_HARDRESET_WAIT 10000 | ||
415 | |||
416 | |||
401 | #endif | 417 | #endif |
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c new file mode 100644 index 000000000000..421771eee450 --- /dev/null +++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c | |||
@@ -0,0 +1,110 @@ | |||
1 | /* | ||
2 | * OMAP2/3 PRM module functions | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments, Inc. | ||
5 | * Copyright (C) 2010 Nokia Corporation | ||
6 | * Benoît Cousson | ||
7 | * Paul Walmsley | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/delay.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/err.h> | ||
18 | |||
19 | #include <plat/common.h> | ||
20 | #include <plat/cpu.h> | ||
21 | #include <plat/prcm.h> | ||
22 | |||
23 | #include "prm.h" | ||
24 | #include "prm-regbits-24xx.h" | ||
25 | #include "prm-regbits-34xx.h" | ||
26 | |||
27 | /** | ||
28 | * omap2_prm_is_hardreset_asserted - read the HW reset line state of | ||
29 | * submodules contained in the hwmod module | ||
30 | * @prm_mod: PRM submodule base (e.g. CORE_MOD) | ||
31 | * @shift: register bit shift corresponding to the reset line to check | ||
32 | * | ||
33 | * Returns 1 if the (sub)module hardreset line is currently asserted, | ||
34 | * 0 if the (sub)module hardreset line is not currently asserted, or | ||
35 | * -EINVAL if called while running on a non-OMAP2/3 chip. | ||
36 | */ | ||
37 | int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift) | ||
38 | { | ||
39 | if (!(cpu_is_omap24xx() || cpu_is_omap34xx())) | ||
40 | return -EINVAL; | ||
41 | |||
42 | return prm_read_mod_bits_shift(prm_mod, OMAP2_RM_RSTCTRL, | ||
43 | (1 << shift)); | ||
44 | } | ||
45 | |||
46 | /** | ||
47 | * omap2_prm_assert_hardreset - assert the HW reset line of a submodule | ||
48 | * @prm_mod: PRM submodule base (e.g. CORE_MOD) | ||
49 | * @shift: register bit shift corresponding to the reset line to assert | ||
50 | * | ||
51 | * Some IPs like dsp or iva contain processors that require an HW | ||
52 | * reset line to be asserted / deasserted in order to fully enable the | ||
53 | * IP. These modules may have multiple hard-reset lines that reset | ||
54 | * different 'submodules' inside the IP block. This function will | ||
55 | * place the submodule into reset. Returns 0 upon success or -EINVAL | ||
56 | * upon an argument error. | ||
57 | */ | ||
58 | int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift) | ||
59 | { | ||
60 | u32 mask; | ||
61 | |||
62 | if (!(cpu_is_omap24xx() || cpu_is_omap34xx())) | ||
63 | return -EINVAL; | ||
64 | |||
65 | mask = 1 << shift; | ||
66 | prm_rmw_mod_reg_bits(mask, mask, prm_mod, OMAP2_RM_RSTCTRL); | ||
67 | |||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | /** | ||
72 | * omap2_prm_deassert_hardreset - deassert a submodule hardreset line and wait | ||
73 | * @prm_mod: PRM submodule base (e.g. CORE_MOD) | ||
74 | * @shift: register bit shift corresponding to the reset line to deassert | ||
75 | * | ||
76 | * Some IPs like dsp or iva contain processors that require an HW | ||
77 | * reset line to be asserted / deasserted in order to fully enable the | ||
78 | * IP. These modules may have multiple hard-reset lines that reset | ||
79 | * different 'submodules' inside the IP block. This function will | ||
80 | * take the submodule out of reset and wait until the PRCM indicates | ||
81 | * that the reset has completed before returning. Returns 0 upon success or | ||
82 | * -EINVAL upon an argument error, -EEXIST if the submodule was already out | ||
83 | * of reset, or -EBUSY if the submodule did not exit reset promptly. | ||
84 | */ | ||
85 | int omap2_prm_deassert_hardreset(s16 prm_mod, u8 shift) | ||
86 | { | ||
87 | u32 mask; | ||
88 | int c; | ||
89 | |||
90 | if (!(cpu_is_omap24xx() || cpu_is_omap34xx())) | ||
91 | return -EINVAL; | ||
92 | |||
93 | mask = 1 << shift; | ||
94 | |||
95 | /* Check the current status to avoid de-asserting the line twice */ | ||
96 | if (prm_read_mod_bits_shift(prm_mod, OMAP2_RM_RSTCTRL, mask) == 0) | ||
97 | return -EEXIST; | ||
98 | |||
99 | /* Clear the reset status by writing 1 to the status bit */ | ||
100 | prm_rmw_mod_reg_bits(0xffffffff, mask, prm_mod, OMAP2_RM_RSTST); | ||
101 | /* de-assert the reset control line */ | ||
102 | prm_rmw_mod_reg_bits(mask, 0, prm_mod, OMAP2_RM_RSTCTRL); | ||
103 | /* wait the status to be set */ | ||
104 | omap_test_timeout(prm_read_mod_bits_shift(prm_mod, OMAP2_RM_RSTST, | ||
105 | mask), | ||
106 | MAX_MODULE_HARDRESET_WAIT, c); | ||
107 | |||
108 | return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0; | ||
109 | } | ||
110 | |||
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c new file mode 100644 index 000000000000..a1ff918d9bed --- /dev/null +++ b/arch/arm/mach-omap2/prm44xx.c | |||
@@ -0,0 +1,116 @@ | |||
1 | /* | ||
2 | * OMAP4 PRM module functions | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments, Inc. | ||
5 | * Copyright (C) 2010 Nokia Corporation | ||
6 | * Benoît Cousson | ||
7 | * Paul Walmsley | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/delay.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/err.h> | ||
18 | |||
19 | #include <plat/common.h> | ||
20 | #include <plat/cpu.h> | ||
21 | #include <plat/prcm.h> | ||
22 | |||
23 | #include "prm.h" | ||
24 | #include "prm-regbits-44xx.h" | ||
25 | |||
26 | /* | ||
27 | * Address offset (in bytes) between the reset control and the reset | ||
28 | * status registers: 4 bytes on OMAP4 | ||
29 | */ | ||
30 | #define OMAP4_RST_CTRL_ST_OFFSET 4 | ||
31 | |||
32 | /** | ||
33 | * omap4_prm_is_hardreset_asserted - read the HW reset line state of | ||
34 | * submodules contained in the hwmod module | ||
35 | * @rstctrl_reg: RM_RSTCTRL register address for this module | ||
36 | * @shift: register bit shift corresponding to the reset line to check | ||
37 | * | ||
38 | * Returns 1 if the (sub)module hardreset line is currently asserted, | ||
39 | * 0 if the (sub)module hardreset line is not currently asserted, or | ||
40 | * -EINVAL upon parameter error. | ||
41 | */ | ||
42 | int omap4_prm_is_hardreset_asserted(void __iomem *rstctrl_reg, u8 shift) | ||
43 | { | ||
44 | if (!cpu_is_omap44xx() || !rstctrl_reg) | ||
45 | return -EINVAL; | ||
46 | |||
47 | return omap4_prm_read_bits_shift(rstctrl_reg, (1 << shift)); | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * omap4_prm_assert_hardreset - assert the HW reset line of a submodule | ||
52 | * @rstctrl_reg: RM_RSTCTRL register address for this module | ||
53 | * @shift: register bit shift corresponding to the reset line to assert | ||
54 | * | ||
55 | * Some IPs like dsp, ipu or iva contain processors that require an HW | ||
56 | * reset line to be asserted / deasserted in order to fully enable the | ||
57 | * IP. These modules may have multiple hard-reset lines that reset | ||
58 | * different 'submodules' inside the IP block. This function will | ||
59 | * place the submodule into reset. Returns 0 upon success or -EINVAL | ||
60 | * upon an argument error. | ||
61 | */ | ||
62 | int omap4_prm_assert_hardreset(void __iomem *rstctrl_reg, u8 shift) | ||
63 | { | ||
64 | u32 mask; | ||
65 | |||
66 | if (!cpu_is_omap44xx() || !rstctrl_reg) | ||
67 | return -EINVAL; | ||
68 | |||
69 | mask = 1 << shift; | ||
70 | omap4_prm_rmw_reg_bits(mask, mask, rstctrl_reg); | ||
71 | |||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * omap4_prm_deassert_hardreset - deassert a submodule hardreset line and wait | ||
77 | * @rstctrl_reg: RM_RSTCTRL register address for this module | ||
78 | * @shift: register bit shift corresponding to the reset line to deassert | ||
79 | * | ||
80 | * Some IPs like dsp, ipu or iva contain processors that require an HW | ||
81 | * reset line to be asserted / deasserted in order to fully enable the | ||
82 | * IP. These modules may have multiple hard-reset lines that reset | ||
83 | * different 'submodules' inside the IP block. This function will | ||
84 | * take the submodule out of reset and wait until the PRCM indicates | ||
85 | * that the reset has completed before returning. Returns 0 upon success or | ||
86 | * -EINVAL upon an argument error, -EEXIST if the submodule was already out | ||
87 | * of reset, or -EBUSY if the submodule did not exit reset promptly. | ||
88 | */ | ||
89 | int omap4_prm_deassert_hardreset(void __iomem *rstctrl_reg, u8 shift) | ||
90 | { | ||
91 | u32 mask; | ||
92 | void __iomem *rstst_reg; | ||
93 | int c; | ||
94 | |||
95 | if (!cpu_is_omap44xx() || !rstctrl_reg) | ||
96 | return -EINVAL; | ||
97 | |||
98 | rstst_reg = rstctrl_reg + OMAP4_RST_CTRL_ST_OFFSET; | ||
99 | |||
100 | mask = 1 << shift; | ||
101 | |||
102 | /* Check the current status to avoid de-asserting the line twice */ | ||
103 | if (omap4_prm_read_bits_shift(rstctrl_reg, mask) == 0) | ||
104 | return -EEXIST; | ||
105 | |||
106 | /* Clear the reset status by writing 1 to the status bit */ | ||
107 | omap4_prm_rmw_reg_bits(0xffffffff, mask, rstst_reg); | ||
108 | /* de-assert the reset control line */ | ||
109 | omap4_prm_rmw_reg_bits(mask, 0, rstctrl_reg); | ||
110 | /* wait the status to be set */ | ||
111 | omap_test_timeout(omap4_prm_read_bits_shift(rstst_reg, mask), | ||
112 | MAX_MODULE_HARDRESET_WAIT, c); | ||
113 | |||
114 | return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0; | ||
115 | } | ||
116 | |||
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h index fe8ef26431e5..59839dbabd84 100644 --- a/arch/arm/mach-omap2/prm44xx.h +++ b/arch/arm/mach-omap2/prm44xx.h | |||
@@ -44,14 +44,12 @@ | |||
44 | #define OMAP4430_PRM_IRQSTATUS_TESLA OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0030) | 44 | #define OMAP4430_PRM_IRQSTATUS_TESLA OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0030) |
45 | #define OMAP4_PRM_IRQENABLE_TESLA_OFFSET 0x0038 | 45 | #define OMAP4_PRM_IRQENABLE_TESLA_OFFSET 0x0038 |
46 | #define OMAP4430_PRM_IRQENABLE_TESLA OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0038) | 46 | #define OMAP4430_PRM_IRQENABLE_TESLA OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0038) |
47 | #define OMAP4_PRM_PRM_PROFILING_CLKCTRL_OFFSET 0x0040 | 47 | #define OMAP4_CM_PRM_PROFILING_CLKCTRL_OFFSET 0x0040 |
48 | #define OMAP4430_PRM_PRM_PROFILING_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0040) | 48 | #define OMAP4430_CM_PRM_PROFILING_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_OCP_SOCKET_MOD, 0x0040) |
49 | 49 | ||
50 | /* PRM.CKGEN_PRM register offsets */ | 50 | /* PRM.CKGEN_PRM register offsets */ |
51 | #define OMAP4_CM_ABE_DSS_SYS_CLKSEL_OFFSET 0x0000 | 51 | #define OMAP4_CM_ABE_DSS_SYS_CLKSEL_OFFSET 0x0000 |
52 | #define OMAP4430_CM_ABE_DSS_SYS_CLKSEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CKGEN_MOD, 0x0000) | 52 | #define OMAP4430_CM_ABE_DSS_SYS_CLKSEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CKGEN_MOD, 0x0000) |
53 | #define OMAP4_CM_DPLL_SYS_REF_CLKSEL_OFFSET 0x0004 | ||
54 | #define OMAP4430_CM_DPLL_SYS_REF_CLKSEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CKGEN_MOD, 0x0004) | ||
55 | #define OMAP4_CM_L4_WKUP_CLKSEL_OFFSET 0x0008 | 53 | #define OMAP4_CM_L4_WKUP_CLKSEL_OFFSET 0x0008 |
56 | #define OMAP4430_CM_L4_WKUP_CLKSEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CKGEN_MOD, 0x0008) | 54 | #define OMAP4430_CM_L4_WKUP_CLKSEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CKGEN_MOD, 0x0008) |
57 | #define OMAP4_CM_ABE_PLL_REF_CLKSEL_OFFSET 0x000c | 55 | #define OMAP4_CM_ABE_PLL_REF_CLKSEL_OFFSET 0x000c |
@@ -686,8 +684,8 @@ | |||
686 | #define OMAP4430_PRM_LDO_ABB_IVA_SETUP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00d8) | 684 | #define OMAP4430_PRM_LDO_ABB_IVA_SETUP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00d8) |
687 | #define OMAP4_PRM_LDO_ABB_IVA_CTRL_OFFSET 0x00dc | 685 | #define OMAP4_PRM_LDO_ABB_IVA_CTRL_OFFSET 0x00dc |
688 | #define OMAP4430_PRM_LDO_ABB_IVA_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00dc) | 686 | #define OMAP4430_PRM_LDO_ABB_IVA_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00dc) |
689 | #define OMAP4_PRM_LDO_BANDGAP_CTRL_OFFSET 0x00e0 | 687 | #define OMAP4_PRM_LDO_BANDGAP_SETUP_OFFSET 0x00e0 |
690 | #define OMAP4430_PRM_LDO_BANDGAP_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00e0) | 688 | #define OMAP4430_PRM_LDO_BANDGAP_SETUP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00e0) |
691 | #define OMAP4_PRM_DEVICE_OFF_CTRL_OFFSET 0x00e4 | 689 | #define OMAP4_PRM_DEVICE_OFF_CTRL_OFFSET 0x00e4 |
692 | #define OMAP4430_PRM_DEVICE_OFF_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00e4) | 690 | #define OMAP4430_PRM_DEVICE_OFF_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00e4) |
693 | #define OMAP4_PRM_PHASE1_CNDP_OFFSET 0x00e8 | 691 | #define OMAP4_PRM_PHASE1_CNDP_OFFSET 0x00e8 |
@@ -698,6 +696,8 @@ | |||
698 | #define OMAP4430_PRM_PHASE2B_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00f0) | 696 | #define OMAP4430_PRM_PHASE2B_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00f0) |
699 | #define OMAP4_PRM_MODEM_IF_CTRL_OFFSET 0x00f4 | 697 | #define OMAP4_PRM_MODEM_IF_CTRL_OFFSET 0x00f4 |
700 | #define OMAP4430_PRM_MODEM_IF_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00f4) | 698 | #define OMAP4430_PRM_MODEM_IF_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00f4) |
699 | #define OMAP4_PRM_VC_ERRST_OFFSET 0x00f8 | ||
700 | #define OMAP4430_PRM_VC_ERRST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00f8) | ||
701 | 701 | ||
702 | /* | 702 | /* |
703 | * PRCM_MPU | 703 | * PRCM_MPU |
@@ -715,6 +715,8 @@ | |||
715 | /* PRCM_MPU.DEVICE_PRM register offsets */ | 715 | /* PRCM_MPU.DEVICE_PRM register offsets */ |
716 | #define OMAP4_PRCM_MPU_PRM_RSTST_OFFSET 0x0000 | 716 | #define OMAP4_PRCM_MPU_PRM_RSTST_OFFSET 0x0000 |
717 | #define OMAP4430_PRCM_MPU_PRM_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_MOD, 0x0000) | 717 | #define OMAP4430_PRCM_MPU_PRM_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_MOD, 0x0000) |
718 | #define OMAP4_PRCM_MPU_PRM_PSCON_COUNT_OFFSET 0x0004 | ||
719 | #define OMAP4430_PRCM_MPU_PRM_PSCON_COUNT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_MOD, 0x0004) | ||
718 | 720 | ||
719 | /* PRCM_MPU.CPU0 register offsets */ | 721 | /* PRCM_MPU.CPU0 register offsets */ |
720 | #define OMAP4_PM_CPU0_PWRSTCTRL_OFFSET 0x0000 | 722 | #define OMAP4_PM_CPU0_PWRSTCTRL_OFFSET 0x0000 |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 566e991ede81..becf0e38ef7e 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -19,20 +19,31 @@ | |||
19 | */ | 19 | */ |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/serial_8250.h> | ||
23 | #include <linux/serial_reg.h> | 22 | #include <linux/serial_reg.h> |
24 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
25 | #include <linux/io.h> | 24 | #include <linux/io.h> |
26 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/platform_device.h> | ||
27 | #include <linux/slab.h> | ||
28 | #include <linux/serial_8250.h> | ||
29 | #include <linux/pm_runtime.h> | ||
30 | |||
31 | #ifdef CONFIG_SERIAL_OMAP | ||
32 | #include <plat/omap-serial.h> | ||
33 | #endif | ||
27 | 34 | ||
28 | #include <plat/common.h> | 35 | #include <plat/common.h> |
29 | #include <plat/board.h> | 36 | #include <plat/board.h> |
30 | #include <plat/clock.h> | 37 | #include <plat/clock.h> |
31 | #include <plat/control.h> | 38 | #include <plat/dma.h> |
39 | #include <plat/omap_hwmod.h> | ||
40 | #include <plat/omap_device.h> | ||
32 | 41 | ||
33 | #include "prm.h" | 42 | #include "prm.h" |
34 | #include "pm.h" | 43 | #include "pm.h" |
44 | #include "cm.h" | ||
35 | #include "prm-regbits-34xx.h" | 45 | #include "prm-regbits-34xx.h" |
46 | #include "control.h" | ||
36 | 47 | ||
37 | #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 | 48 | #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 |
38 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ | 49 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ |
@@ -48,6 +59,8 @@ | |||
48 | */ | 59 | */ |
49 | #define DEFAULT_TIMEOUT 0 | 60 | #define DEFAULT_TIMEOUT 0 |
50 | 61 | ||
62 | #define MAX_UART_HWMOD_NAME_LEN 16 | ||
63 | |||
51 | struct omap_uart_state { | 64 | struct omap_uart_state { |
52 | int num; | 65 | int num; |
53 | int can_sleep; | 66 | int can_sleep; |
@@ -58,14 +71,21 @@ struct omap_uart_state { | |||
58 | void __iomem *wk_en; | 71 | void __iomem *wk_en; |
59 | u32 wk_mask; | 72 | u32 wk_mask; |
60 | u32 padconf; | 73 | u32 padconf; |
74 | u32 dma_enabled; | ||
61 | 75 | ||
62 | struct clk *ick; | 76 | struct clk *ick; |
63 | struct clk *fck; | 77 | struct clk *fck; |
64 | int clocked; | 78 | int clocked; |
65 | 79 | ||
66 | struct plat_serial8250_port *p; | 80 | int irq; |
81 | int regshift; | ||
82 | int irqflags; | ||
83 | void __iomem *membase; | ||
84 | resource_size_t mapbase; | ||
85 | |||
67 | struct list_head node; | 86 | struct list_head node; |
68 | struct platform_device pdev; | 87 | struct omap_hwmod *oh; |
88 | struct platform_device *pdev; | ||
69 | 89 | ||
70 | u32 errata; | 90 | u32 errata; |
71 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) | 91 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) |
@@ -83,75 +103,47 @@ struct omap_uart_state { | |||
83 | }; | 103 | }; |
84 | 104 | ||
85 | static LIST_HEAD(uart_list); | 105 | static LIST_HEAD(uart_list); |
106 | static u8 num_uarts; | ||
86 | 107 | ||
87 | static struct plat_serial8250_port serial_platform_data0[] = { | 108 | /* |
88 | { | 109 | * Since these idle/enable hooks are used in the idle path itself |
89 | .irq = 72, | 110 | * which has interrupts disabled, use the non-locking versions of |
90 | .flags = UPF_BOOT_AUTOCONF, | 111 | * the hwmod enable/disable functions. |
91 | .iotype = UPIO_MEM, | 112 | */ |
92 | .regshift = 2, | 113 | static int uart_idle_hwmod(struct omap_device *od) |
93 | .uartclk = OMAP24XX_BASE_BAUD * 16, | 114 | { |
94 | }, { | 115 | _omap_hwmod_idle(od->hwmods[0]); |
95 | .flags = 0 | ||
96 | } | ||
97 | }; | ||
98 | 116 | ||
99 | static struct plat_serial8250_port serial_platform_data1[] = { | 117 | return 0; |
100 | { | 118 | } |
101 | .irq = 73, | ||
102 | .flags = UPF_BOOT_AUTOCONF, | ||
103 | .iotype = UPIO_MEM, | ||
104 | .regshift = 2, | ||
105 | .uartclk = OMAP24XX_BASE_BAUD * 16, | ||
106 | }, { | ||
107 | .flags = 0 | ||
108 | } | ||
109 | }; | ||
110 | 119 | ||
111 | static struct plat_serial8250_port serial_platform_data2[] = { | 120 | static int uart_enable_hwmod(struct omap_device *od) |
112 | { | 121 | { |
113 | .irq = 74, | 122 | _omap_hwmod_enable(od->hwmods[0]); |
114 | .flags = UPF_BOOT_AUTOCONF, | ||
115 | .iotype = UPIO_MEM, | ||
116 | .regshift = 2, | ||
117 | .uartclk = OMAP24XX_BASE_BAUD * 16, | ||
118 | }, { | ||
119 | .flags = 0 | ||
120 | } | ||
121 | }; | ||
122 | 123 | ||
123 | static struct plat_serial8250_port serial_platform_data3[] = { | 124 | return 0; |
125 | } | ||
126 | |||
127 | static struct omap_device_pm_latency omap_uart_latency[] = { | ||
124 | { | 128 | { |
125 | .irq = 70, | 129 | .deactivate_func = uart_idle_hwmod, |
126 | .flags = UPF_BOOT_AUTOCONF, | 130 | .activate_func = uart_enable_hwmod, |
127 | .iotype = UPIO_MEM, | 131 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, |
128 | .regshift = 2, | 132 | }, |
129 | .uartclk = OMAP24XX_BASE_BAUD * 16, | ||
130 | }, { | ||
131 | .flags = 0 | ||
132 | } | ||
133 | }; | 133 | }; |
134 | 134 | ||
135 | void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) | ||
136 | { | ||
137 | serial_platform_data0[0].mapbase = omap2_globals->uart1_phys; | ||
138 | serial_platform_data1[0].mapbase = omap2_globals->uart2_phys; | ||
139 | serial_platform_data2[0].mapbase = omap2_globals->uart3_phys; | ||
140 | serial_platform_data3[0].mapbase = omap2_globals->uart4_phys; | ||
141 | } | ||
142 | |||
143 | static inline unsigned int __serial_read_reg(struct uart_port *up, | 135 | static inline unsigned int __serial_read_reg(struct uart_port *up, |
144 | int offset) | 136 | int offset) |
145 | { | 137 | { |
146 | offset <<= up->regshift; | 138 | offset <<= up->regshift; |
147 | return (unsigned int)__raw_readb(up->membase + offset); | 139 | return (unsigned int)__raw_readb(up->membase + offset); |
148 | } | 140 | } |
149 | 141 | ||
150 | static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, | 142 | static inline unsigned int serial_read_reg(struct omap_uart_state *uart, |
151 | int offset) | 143 | int offset) |
152 | { | 144 | { |
153 | offset <<= up->regshift; | 145 | offset <<= uart->regshift; |
154 | return (unsigned int)__raw_readb(up->membase + offset); | 146 | return (unsigned int)__raw_readb(uart->membase + offset); |
155 | } | 147 | } |
156 | 148 | ||
157 | static inline void __serial_write_reg(struct uart_port *up, int offset, | 149 | static inline void __serial_write_reg(struct uart_port *up, int offset, |
@@ -161,11 +153,11 @@ static inline void __serial_write_reg(struct uart_port *up, int offset, | |||
161 | __raw_writeb(value, up->membase + offset); | 153 | __raw_writeb(value, up->membase + offset); |
162 | } | 154 | } |
163 | 155 | ||
164 | static inline void serial_write_reg(struct plat_serial8250_port *p, int offset, | 156 | static inline void serial_write_reg(struct omap_uart_state *uart, int offset, |
165 | int value) | 157 | int value) |
166 | { | 158 | { |
167 | offset <<= p->regshift; | 159 | offset <<= uart->regshift; |
168 | __raw_writeb(value, p->membase + offset); | 160 | __raw_writeb(value, uart->membase + offset); |
169 | } | 161 | } |
170 | 162 | ||
171 | /* | 163 | /* |
@@ -173,14 +165,12 @@ static inline void serial_write_reg(struct plat_serial8250_port *p, int offset, | |||
173 | * properly. Note that the TX watermark initialization may not be needed | 165 | * properly. Note that the TX watermark initialization may not be needed |
174 | * once the 8250.c watermark handling code is merged. | 166 | * once the 8250.c watermark handling code is merged. |
175 | */ | 167 | */ |
168 | |||
176 | static inline void __init omap_uart_reset(struct omap_uart_state *uart) | 169 | static inline void __init omap_uart_reset(struct omap_uart_state *uart) |
177 | { | 170 | { |
178 | struct plat_serial8250_port *p = uart->p; | 171 | serial_write_reg(uart, UART_OMAP_MDR1, 0x07); |
179 | 172 | serial_write_reg(uart, UART_OMAP_SCR, 0x08); | |
180 | serial_write_reg(p, UART_OMAP_MDR1, 0x07); | 173 | serial_write_reg(uart, UART_OMAP_MDR1, 0x00); |
181 | serial_write_reg(p, UART_OMAP_SCR, 0x08); | ||
182 | serial_write_reg(p, UART_OMAP_MDR1, 0x00); | ||
183 | serial_write_reg(p, UART_OMAP_SYSC, (0x02 << 3) | (1 << 2) | (1 << 0)); | ||
184 | } | 174 | } |
185 | 175 | ||
186 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) | 176 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) |
@@ -197,24 +187,23 @@ static inline void __init omap_uart_reset(struct omap_uart_state *uart) | |||
197 | static void omap_uart_mdr1_errataset(struct omap_uart_state *uart, u8 mdr1_val, | 187 | static void omap_uart_mdr1_errataset(struct omap_uart_state *uart, u8 mdr1_val, |
198 | u8 fcr_val) | 188 | u8 fcr_val) |
199 | { | 189 | { |
200 | struct plat_serial8250_port *p = uart->p; | ||
201 | u8 timeout = 255; | 190 | u8 timeout = 255; |
202 | 191 | ||
203 | serial_write_reg(p, UART_OMAP_MDR1, mdr1_val); | 192 | serial_write_reg(uart, UART_OMAP_MDR1, mdr1_val); |
204 | udelay(2); | 193 | udelay(2); |
205 | serial_write_reg(p, UART_FCR, fcr_val | UART_FCR_CLEAR_XMIT | | 194 | serial_write_reg(uart, UART_FCR, fcr_val | UART_FCR_CLEAR_XMIT | |
206 | UART_FCR_CLEAR_RCVR); | 195 | UART_FCR_CLEAR_RCVR); |
207 | /* | 196 | /* |
208 | * Wait for FIFO to empty: when empty, RX_FIFO_E bit is 0 and | 197 | * Wait for FIFO to empty: when empty, RX_FIFO_E bit is 0 and |
209 | * TX_FIFO_E bit is 1. | 198 | * TX_FIFO_E bit is 1. |
210 | */ | 199 | */ |
211 | while (UART_LSR_THRE != (serial_read_reg(p, UART_LSR) & | 200 | while (UART_LSR_THRE != (serial_read_reg(uart, UART_LSR) & |
212 | (UART_LSR_THRE | UART_LSR_DR))) { | 201 | (UART_LSR_THRE | UART_LSR_DR))) { |
213 | timeout--; | 202 | timeout--; |
214 | if (!timeout) { | 203 | if (!timeout) { |
215 | /* Should *never* happen. we warn and carry on */ | 204 | /* Should *never* happen. we warn and carry on */ |
216 | dev_crit(&uart->pdev.dev, "Errata i202: timedout %x\n", | 205 | dev_crit(&uart->pdev->dev, "Errata i202: timedout %x\n", |
217 | serial_read_reg(p, UART_LSR)); | 206 | serial_read_reg(uart, UART_LSR)); |
218 | break; | 207 | break; |
219 | } | 208 | } |
220 | udelay(1); | 209 | udelay(1); |
@@ -224,23 +213,22 @@ static void omap_uart_mdr1_errataset(struct omap_uart_state *uart, u8 mdr1_val, | |||
224 | static void omap_uart_save_context(struct omap_uart_state *uart) | 213 | static void omap_uart_save_context(struct omap_uart_state *uart) |
225 | { | 214 | { |
226 | u16 lcr = 0; | 215 | u16 lcr = 0; |
227 | struct plat_serial8250_port *p = uart->p; | ||
228 | 216 | ||
229 | if (!enable_off_mode) | 217 | if (!enable_off_mode) |
230 | return; | 218 | return; |
231 | 219 | ||
232 | lcr = serial_read_reg(p, UART_LCR); | 220 | lcr = serial_read_reg(uart, UART_LCR); |
233 | serial_write_reg(p, UART_LCR, 0xBF); | 221 | serial_write_reg(uart, UART_LCR, 0xBF); |
234 | uart->dll = serial_read_reg(p, UART_DLL); | 222 | uart->dll = serial_read_reg(uart, UART_DLL); |
235 | uart->dlh = serial_read_reg(p, UART_DLM); | 223 | uart->dlh = serial_read_reg(uart, UART_DLM); |
236 | serial_write_reg(p, UART_LCR, lcr); | 224 | serial_write_reg(uart, UART_LCR, lcr); |
237 | uart->ier = serial_read_reg(p, UART_IER); | 225 | uart->ier = serial_read_reg(uart, UART_IER); |
238 | uart->sysc = serial_read_reg(p, UART_OMAP_SYSC); | 226 | uart->sysc = serial_read_reg(uart, UART_OMAP_SYSC); |
239 | uart->scr = serial_read_reg(p, UART_OMAP_SCR); | 227 | uart->scr = serial_read_reg(uart, UART_OMAP_SCR); |
240 | uart->wer = serial_read_reg(p, UART_OMAP_WER); | 228 | uart->wer = serial_read_reg(uart, UART_OMAP_WER); |
241 | serial_write_reg(p, UART_LCR, 0x80); | 229 | serial_write_reg(uart, UART_LCR, 0x80); |
242 | uart->mcr = serial_read_reg(p, UART_MCR); | 230 | uart->mcr = serial_read_reg(uart, UART_MCR); |
243 | serial_write_reg(p, UART_LCR, lcr); | 231 | serial_write_reg(uart, UART_LCR, lcr); |
244 | 232 | ||
245 | uart->context_valid = 1; | 233 | uart->context_valid = 1; |
246 | } | 234 | } |
@@ -248,7 +236,6 @@ static void omap_uart_save_context(struct omap_uart_state *uart) | |||
248 | static void omap_uart_restore_context(struct omap_uart_state *uart) | 236 | static void omap_uart_restore_context(struct omap_uart_state *uart) |
249 | { | 237 | { |
250 | u16 efr = 0; | 238 | u16 efr = 0; |
251 | struct plat_serial8250_port *p = uart->p; | ||
252 | 239 | ||
253 | if (!enable_off_mode) | 240 | if (!enable_off_mode) |
254 | return; | 241 | return; |
@@ -261,29 +248,30 @@ static void omap_uart_restore_context(struct omap_uart_state *uart) | |||
261 | if (uart->errata & UART_ERRATA_i202_MDR1_ACCESS) | 248 | if (uart->errata & UART_ERRATA_i202_MDR1_ACCESS) |
262 | omap_uart_mdr1_errataset(uart, 0x07, 0xA0); | 249 | omap_uart_mdr1_errataset(uart, 0x07, 0xA0); |
263 | else | 250 | else |
264 | serial_write_reg(p, UART_OMAP_MDR1, 0x7); | 251 | serial_write_reg(uart, UART_OMAP_MDR1, 0x7); |
265 | serial_write_reg(p, UART_LCR, 0xBF); /* Config B mode */ | 252 | serial_write_reg(uart, UART_LCR, 0xBF); /* Config B mode */ |
266 | efr = serial_read_reg(p, UART_EFR); | 253 | efr = serial_read_reg(uart, UART_EFR); |
267 | serial_write_reg(p, UART_EFR, UART_EFR_ECB); | 254 | serial_write_reg(uart, UART_EFR, UART_EFR_ECB); |
268 | serial_write_reg(p, UART_LCR, 0x0); /* Operational mode */ | 255 | serial_write_reg(uart, UART_LCR, 0x0); /* Operational mode */ |
269 | serial_write_reg(p, UART_IER, 0x0); | 256 | serial_write_reg(uart, UART_IER, 0x0); |
270 | serial_write_reg(p, UART_LCR, 0xBF); /* Config B mode */ | 257 | serial_write_reg(uart, UART_LCR, 0xBF); /* Config B mode */ |
271 | serial_write_reg(p, UART_DLL, uart->dll); | 258 | serial_write_reg(uart, UART_DLL, uart->dll); |
272 | serial_write_reg(p, UART_DLM, uart->dlh); | 259 | serial_write_reg(uart, UART_DLM, uart->dlh); |
273 | serial_write_reg(p, UART_LCR, 0x0); /* Operational mode */ | 260 | serial_write_reg(uart, UART_LCR, 0x0); /* Operational mode */ |
274 | serial_write_reg(p, UART_IER, uart->ier); | 261 | serial_write_reg(uart, UART_IER, uart->ier); |
275 | serial_write_reg(p, UART_LCR, 0x80); | 262 | serial_write_reg(uart, UART_LCR, 0x80); |
276 | serial_write_reg(p, UART_MCR, uart->mcr); | 263 | serial_write_reg(uart, UART_MCR, uart->mcr); |
277 | serial_write_reg(p, UART_LCR, 0xBF); /* Config B mode */ | 264 | serial_write_reg(uart, UART_LCR, 0xBF); /* Config B mode */ |
278 | serial_write_reg(p, UART_EFR, efr); | 265 | serial_write_reg(uart, UART_EFR, efr); |
279 | serial_write_reg(p, UART_LCR, UART_LCR_WLEN8); | 266 | serial_write_reg(uart, UART_LCR, UART_LCR_WLEN8); |
280 | serial_write_reg(p, UART_OMAP_SCR, uart->scr); | 267 | serial_write_reg(uart, UART_OMAP_SCR, uart->scr); |
281 | serial_write_reg(p, UART_OMAP_WER, uart->wer); | 268 | serial_write_reg(uart, UART_OMAP_WER, uart->wer); |
282 | serial_write_reg(p, UART_OMAP_SYSC, uart->sysc); | 269 | serial_write_reg(uart, UART_OMAP_SYSC, uart->sysc); |
283 | if (uart->errata & UART_ERRATA_i202_MDR1_ACCESS) | 270 | if (uart->errata & UART_ERRATA_i202_MDR1_ACCESS) |
284 | omap_uart_mdr1_errataset(uart, 0x00, 0xA1); | 271 | omap_uart_mdr1_errataset(uart, 0x00, 0xA1); |
285 | else | 272 | else |
286 | serial_write_reg(p, UART_OMAP_MDR1, 0x00); /* UART 16x mode */ | 273 | /* UART 16x mode */ |
274 | serial_write_reg(uart, UART_OMAP_MDR1, 0x00); | ||
287 | } | 275 | } |
288 | #else | 276 | #else |
289 | static inline void omap_uart_save_context(struct omap_uart_state *uart) {} | 277 | static inline void omap_uart_save_context(struct omap_uart_state *uart) {} |
@@ -295,8 +283,7 @@ static inline void omap_uart_enable_clocks(struct omap_uart_state *uart) | |||
295 | if (uart->clocked) | 283 | if (uart->clocked) |
296 | return; | 284 | return; |
297 | 285 | ||
298 | clk_enable(uart->ick); | 286 | omap_device_enable(uart->pdev); |
299 | clk_enable(uart->fck); | ||
300 | uart->clocked = 1; | 287 | uart->clocked = 1; |
301 | omap_uart_restore_context(uart); | 288 | omap_uart_restore_context(uart); |
302 | } | 289 | } |
@@ -310,8 +297,7 @@ static inline void omap_uart_disable_clocks(struct omap_uart_state *uart) | |||
310 | 297 | ||
311 | omap_uart_save_context(uart); | 298 | omap_uart_save_context(uart); |
312 | uart->clocked = 0; | 299 | uart->clocked = 0; |
313 | clk_disable(uart->ick); | 300 | omap_device_idle(uart->pdev); |
314 | clk_disable(uart->fck); | ||
315 | } | 301 | } |
316 | 302 | ||
317 | static void omap_uart_enable_wakeup(struct omap_uart_state *uart) | 303 | static void omap_uart_enable_wakeup(struct omap_uart_state *uart) |
@@ -349,18 +335,24 @@ static void omap_uart_disable_wakeup(struct omap_uart_state *uart) | |||
349 | } | 335 | } |
350 | 336 | ||
351 | static void omap_uart_smart_idle_enable(struct omap_uart_state *uart, | 337 | static void omap_uart_smart_idle_enable(struct omap_uart_state *uart, |
352 | int enable) | 338 | int enable) |
353 | { | 339 | { |
354 | struct plat_serial8250_port *p = uart->p; | 340 | u8 idlemode; |
355 | u16 sysc; | ||
356 | 341 | ||
357 | sysc = serial_read_reg(p, UART_OMAP_SYSC) & 0x7; | 342 | if (enable) { |
358 | if (enable) | 343 | /** |
359 | sysc |= 0x2 << 3; | 344 | * Errata 2.15: [UART]:Cannot Acknowledge Idle Requests |
360 | else | 345 | * in Smartidle Mode When Configured for DMA Operations. |
361 | sysc |= 0x1 << 3; | 346 | */ |
347 | if (uart->dma_enabled) | ||
348 | idlemode = HWMOD_IDLEMODE_FORCE; | ||
349 | else | ||
350 | idlemode = HWMOD_IDLEMODE_SMART; | ||
351 | } else { | ||
352 | idlemode = HWMOD_IDLEMODE_NO; | ||
353 | } | ||
362 | 354 | ||
363 | serial_write_reg(p, UART_OMAP_SYSC, sysc); | 355 | omap_hwmod_set_slave_idlemode(uart->oh, idlemode); |
364 | } | 356 | } |
365 | 357 | ||
366 | static void omap_uart_block_sleep(struct omap_uart_state *uart) | 358 | static void omap_uart_block_sleep(struct omap_uart_state *uart) |
@@ -377,7 +369,7 @@ static void omap_uart_block_sleep(struct omap_uart_state *uart) | |||
377 | 369 | ||
378 | static void omap_uart_allow_sleep(struct omap_uart_state *uart) | 370 | static void omap_uart_allow_sleep(struct omap_uart_state *uart) |
379 | { | 371 | { |
380 | if (device_may_wakeup(&uart->pdev.dev)) | 372 | if (device_may_wakeup(&uart->pdev->dev)) |
381 | omap_uart_enable_wakeup(uart); | 373 | omap_uart_enable_wakeup(uart); |
382 | else | 374 | else |
383 | omap_uart_disable_wakeup(uart); | 375 | omap_uart_disable_wakeup(uart); |
@@ -472,6 +464,7 @@ int omap_uart_can_sleep(void) | |||
472 | * UART will not idle or sleep for its timeout period. | 464 | * UART will not idle or sleep for its timeout period. |
473 | * | 465 | * |
474 | **/ | 466 | **/ |
467 | /* static int first_interrupt; */ | ||
475 | static irqreturn_t omap_uart_interrupt(int irq, void *dev_id) | 468 | static irqreturn_t omap_uart_interrupt(int irq, void *dev_id) |
476 | { | 469 | { |
477 | struct omap_uart_state *uart = dev_id; | 470 | struct omap_uart_state *uart = dev_id; |
@@ -483,7 +476,6 @@ static irqreturn_t omap_uart_interrupt(int irq, void *dev_id) | |||
483 | 476 | ||
484 | static void omap_uart_idle_init(struct omap_uart_state *uart) | 477 | static void omap_uart_idle_init(struct omap_uart_state *uart) |
485 | { | 478 | { |
486 | struct plat_serial8250_port *p = uart->p; | ||
487 | int ret; | 479 | int ret; |
488 | 480 | ||
489 | uart->can_sleep = 0; | 481 | uart->can_sleep = 0; |
@@ -495,7 +487,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) | |||
495 | omap_uart_smart_idle_enable(uart, 0); | 487 | omap_uart_smart_idle_enable(uart, 0); |
496 | 488 | ||
497 | if (cpu_is_omap34xx()) { | 489 | if (cpu_is_omap34xx()) { |
498 | u32 mod = (uart->num == 2) ? OMAP3430_PER_MOD : CORE_MOD; | 490 | u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD; |
499 | u32 wk_mask = 0; | 491 | u32 wk_mask = 0; |
500 | u32 padconf = 0; | 492 | u32 padconf = 0; |
501 | 493 | ||
@@ -514,19 +506,17 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) | |||
514 | wk_mask = OMAP3430_ST_UART3_MASK; | 506 | wk_mask = OMAP3430_ST_UART3_MASK; |
515 | padconf = 0x19e; | 507 | padconf = 0x19e; |
516 | break; | 508 | break; |
509 | case 3: | ||
510 | wk_mask = OMAP3630_ST_UART4_MASK; | ||
511 | padconf = 0x0d2; | ||
512 | break; | ||
517 | } | 513 | } |
518 | uart->wk_mask = wk_mask; | 514 | uart->wk_mask = wk_mask; |
519 | uart->padconf = padconf; | 515 | uart->padconf = padconf; |
520 | } else if (cpu_is_omap24xx()) { | 516 | } else if (cpu_is_omap24xx()) { |
521 | u32 wk_mask = 0; | 517 | u32 wk_mask = 0; |
518 | u32 wk_en = PM_WKEN1, wk_st = PM_WKST1; | ||
522 | 519 | ||
523 | if (cpu_is_omap2430()) { | ||
524 | uart->wk_en = OMAP2430_PRM_REGADDR(CORE_MOD, PM_WKEN1); | ||
525 | uart->wk_st = OMAP2430_PRM_REGADDR(CORE_MOD, PM_WKST1); | ||
526 | } else if (cpu_is_omap2420()) { | ||
527 | uart->wk_en = OMAP2420_PRM_REGADDR(CORE_MOD, PM_WKEN1); | ||
528 | uart->wk_st = OMAP2420_PRM_REGADDR(CORE_MOD, PM_WKST1); | ||
529 | } | ||
530 | switch (uart->num) { | 520 | switch (uart->num) { |
531 | case 0: | 521 | case 0: |
532 | wk_mask = OMAP24XX_ST_UART1_MASK; | 522 | wk_mask = OMAP24XX_ST_UART1_MASK; |
@@ -535,10 +525,19 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) | |||
535 | wk_mask = OMAP24XX_ST_UART2_MASK; | 525 | wk_mask = OMAP24XX_ST_UART2_MASK; |
536 | break; | 526 | break; |
537 | case 2: | 527 | case 2: |
528 | wk_en = OMAP24XX_PM_WKEN2; | ||
529 | wk_st = OMAP24XX_PM_WKST2; | ||
538 | wk_mask = OMAP24XX_ST_UART3_MASK; | 530 | wk_mask = OMAP24XX_ST_UART3_MASK; |
539 | break; | 531 | break; |
540 | } | 532 | } |
541 | uart->wk_mask = wk_mask; | 533 | uart->wk_mask = wk_mask; |
534 | if (cpu_is_omap2430()) { | ||
535 | uart->wk_en = OMAP2430_PRM_REGADDR(CORE_MOD, wk_en); | ||
536 | uart->wk_st = OMAP2430_PRM_REGADDR(CORE_MOD, wk_st); | ||
537 | } else if (cpu_is_omap2420()) { | ||
538 | uart->wk_en = OMAP2420_PRM_REGADDR(CORE_MOD, wk_en); | ||
539 | uart->wk_st = OMAP2420_PRM_REGADDR(CORE_MOD, wk_st); | ||
540 | } | ||
542 | } else { | 541 | } else { |
543 | uart->wk_en = NULL; | 542 | uart->wk_en = NULL; |
544 | uart->wk_st = NULL; | 543 | uart->wk_st = NULL; |
@@ -546,9 +545,9 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) | |||
546 | uart->padconf = 0; | 545 | uart->padconf = 0; |
547 | } | 546 | } |
548 | 547 | ||
549 | p->irqflags |= IRQF_SHARED; | 548 | uart->irqflags |= IRQF_SHARED; |
550 | ret = request_irq(p->irq, omap_uart_interrupt, IRQF_SHARED, | 549 | ret = request_threaded_irq(uart->irq, NULL, omap_uart_interrupt, |
551 | "serial idle", (void *)uart); | 550 | IRQF_SHARED, "serial idle", (void *)uart); |
552 | WARN_ON(ret); | 551 | WARN_ON(ret); |
553 | } | 552 | } |
554 | 553 | ||
@@ -558,11 +557,17 @@ void omap_uart_enable_irqs(int enable) | |||
558 | struct omap_uart_state *uart; | 557 | struct omap_uart_state *uart; |
559 | 558 | ||
560 | list_for_each_entry(uart, &uart_list, node) { | 559 | list_for_each_entry(uart, &uart_list, node) { |
561 | if (enable) | 560 | if (enable) { |
562 | ret = request_irq(uart->p->irq, omap_uart_interrupt, | 561 | pm_runtime_put_sync(&uart->pdev->dev); |
563 | IRQF_SHARED, "serial idle", (void *)uart); | 562 | ret = request_threaded_irq(uart->irq, NULL, |
564 | else | 563 | omap_uart_interrupt, |
565 | free_irq(uart->p->irq, (void *)uart); | 564 | IRQF_SHARED, |
565 | "serial idle", | ||
566 | (void *)uart); | ||
567 | } else { | ||
568 | pm_runtime_get_noresume(&uart->pdev->dev); | ||
569 | free_irq(uart->irq, (void *)uart); | ||
570 | } | ||
566 | } | 571 | } |
567 | } | 572 | } |
568 | 573 | ||
@@ -570,10 +575,9 @@ static ssize_t sleep_timeout_show(struct device *dev, | |||
570 | struct device_attribute *attr, | 575 | struct device_attribute *attr, |
571 | char *buf) | 576 | char *buf) |
572 | { | 577 | { |
573 | struct platform_device *pdev = container_of(dev, | 578 | struct platform_device *pdev = to_platform_device(dev); |
574 | struct platform_device, dev); | 579 | struct omap_device *odev = to_omap_device(pdev); |
575 | struct omap_uart_state *uart = container_of(pdev, | 580 | struct omap_uart_state *uart = odev->hwmods[0]->dev_attr; |
576 | struct omap_uart_state, pdev); | ||
577 | 581 | ||
578 | return sprintf(buf, "%u\n", uart->timeout / HZ); | 582 | return sprintf(buf, "%u\n", uart->timeout / HZ); |
579 | } | 583 | } |
@@ -582,10 +586,9 @@ static ssize_t sleep_timeout_store(struct device *dev, | |||
582 | struct device_attribute *attr, | 586 | struct device_attribute *attr, |
583 | const char *buf, size_t n) | 587 | const char *buf, size_t n) |
584 | { | 588 | { |
585 | struct platform_device *pdev = container_of(dev, | 589 | struct platform_device *pdev = to_platform_device(dev); |
586 | struct platform_device, dev); | 590 | struct omap_device *odev = to_omap_device(pdev); |
587 | struct omap_uart_state *uart = container_of(pdev, | 591 | struct omap_uart_state *uart = odev->hwmods[0]->dev_attr; |
588 | struct omap_uart_state, pdev); | ||
589 | unsigned int value; | 592 | unsigned int value; |
590 | 593 | ||
591 | if (sscanf(buf, "%u", &value) != 1) { | 594 | if (sscanf(buf, "%u", &value) != 1) { |
@@ -608,48 +611,15 @@ static DEVICE_ATTR(sleep_timeout, 0644, sleep_timeout_show, | |||
608 | #define DEV_CREATE_FILE(dev, attr) WARN_ON(device_create_file(dev, attr)) | 611 | #define DEV_CREATE_FILE(dev, attr) WARN_ON(device_create_file(dev, attr)) |
609 | #else | 612 | #else |
610 | static inline void omap_uart_idle_init(struct omap_uart_state *uart) {} | 613 | static inline void omap_uart_idle_init(struct omap_uart_state *uart) {} |
614 | static void omap_uart_block_sleep(struct omap_uart_state *uart) | ||
615 | { | ||
616 | /* Needed to enable UART clocks when built without CONFIG_PM */ | ||
617 | omap_uart_enable_clocks(uart); | ||
618 | } | ||
611 | #define DEV_CREATE_FILE(dev, attr) | 619 | #define DEV_CREATE_FILE(dev, attr) |
612 | #endif /* CONFIG_PM */ | 620 | #endif /* CONFIG_PM */ |
613 | 621 | ||
614 | static struct omap_uart_state omap_uart[] = { | 622 | #ifndef CONFIG_SERIAL_OMAP |
615 | { | ||
616 | .pdev = { | ||
617 | .name = "serial8250", | ||
618 | .id = PLAT8250_DEV_PLATFORM, | ||
619 | .dev = { | ||
620 | .platform_data = serial_platform_data0, | ||
621 | }, | ||
622 | }, | ||
623 | }, { | ||
624 | .pdev = { | ||
625 | .name = "serial8250", | ||
626 | .id = PLAT8250_DEV_PLATFORM1, | ||
627 | .dev = { | ||
628 | .platform_data = serial_platform_data1, | ||
629 | }, | ||
630 | }, | ||
631 | }, { | ||
632 | .pdev = { | ||
633 | .name = "serial8250", | ||
634 | .id = PLAT8250_DEV_PLATFORM2, | ||
635 | .dev = { | ||
636 | .platform_data = serial_platform_data2, | ||
637 | }, | ||
638 | }, | ||
639 | }, | ||
640 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | ||
641 | { | ||
642 | .pdev = { | ||
643 | .name = "serial8250", | ||
644 | .id = 3, | ||
645 | .dev = { | ||
646 | .platform_data = serial_platform_data3, | ||
647 | }, | ||
648 | }, | ||
649 | }, | ||
650 | #endif | ||
651 | }; | ||
652 | |||
653 | /* | 623 | /* |
654 | * Override the default 8250 read handler: mem_serial_in() | 624 | * Override the default 8250 read handler: mem_serial_in() |
655 | * Empty RX fifo read causes an abort on omap3630 and omap4 | 625 | * Empty RX fifo read causes an abort on omap3630 and omap4 |
@@ -682,71 +652,44 @@ static void serial_out_override(struct uart_port *up, int offset, int value) | |||
682 | } | 652 | } |
683 | __serial_write_reg(up, offset, value); | 653 | __serial_write_reg(up, offset, value); |
684 | } | 654 | } |
655 | #endif | ||
656 | |||
685 | void __init omap_serial_early_init(void) | 657 | void __init omap_serial_early_init(void) |
686 | { | 658 | { |
687 | int i, nr_ports; | 659 | int i = 0; |
688 | char name[16]; | ||
689 | 660 | ||
690 | if (!(cpu_is_omap3630() || cpu_is_omap4430())) | 661 | do { |
691 | nr_ports = 3; | 662 | char oh_name[MAX_UART_HWMOD_NAME_LEN]; |
692 | else | 663 | struct omap_hwmod *oh; |
693 | nr_ports = ARRAY_SIZE(omap_uart); | 664 | struct omap_uart_state *uart; |
694 | 665 | ||
695 | /* | 666 | snprintf(oh_name, MAX_UART_HWMOD_NAME_LEN, |
696 | * Make sure the serial ports are muxed on at this point. | 667 | "uart%d", i + 1); |
697 | * You have to mux them off in device drivers later on | 668 | oh = omap_hwmod_lookup(oh_name); |
698 | * if not needed. | 669 | if (!oh) |
699 | */ | 670 | break; |
700 | 671 | ||
701 | for (i = 0; i < nr_ports; i++) { | 672 | uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL); |
702 | struct omap_uart_state *uart = &omap_uart[i]; | 673 | if (WARN_ON(!uart)) |
703 | struct platform_device *pdev = &uart->pdev; | 674 | return; |
704 | struct device *dev = &pdev->dev; | 675 | |
705 | struct plat_serial8250_port *p = dev->platform_data; | 676 | uart->oh = oh; |
677 | uart->num = i++; | ||
678 | list_add_tail(&uart->node, &uart_list); | ||
679 | num_uarts++; | ||
706 | 680 | ||
707 | /* Don't map zero-based physical address */ | ||
708 | if (p->mapbase == 0) { | ||
709 | dev_warn(dev, "no physical address for uart#%d," | ||
710 | " so skipping early_init...\n", i); | ||
711 | continue; | ||
712 | } | ||
713 | /* | 681 | /* |
714 | * Module 4KB + L4 interconnect 4KB | 682 | * NOTE: omap_hwmod_init() has not yet been called, |
715 | * Static mapping, never released | 683 | * so no hwmod functions will work yet. |
716 | */ | 684 | */ |
717 | p->membase = ioremap(p->mapbase, SZ_8K); | ||
718 | if (!p->membase) { | ||
719 | dev_err(dev, "ioremap failed for uart%i\n", i + 1); | ||
720 | continue; | ||
721 | } | ||
722 | |||
723 | sprintf(name, "uart%d_ick", i + 1); | ||
724 | uart->ick = clk_get(NULL, name); | ||
725 | if (IS_ERR(uart->ick)) { | ||
726 | dev_err(dev, "Could not get uart%d_ick\n", i + 1); | ||
727 | uart->ick = NULL; | ||
728 | } | ||
729 | 685 | ||
730 | sprintf(name, "uart%d_fck", i+1); | 686 | /* |
731 | uart->fck = clk_get(NULL, name); | 687 | * During UART early init, device need to be probed |
732 | if (IS_ERR(uart->fck)) { | 688 | * to determine SoC specific init before omap_device |
733 | dev_err(dev, "Could not get uart%d_fck\n", i + 1); | 689 | * is ready. Therefore, don't allow idle here |
734 | uart->fck = NULL; | 690 | */ |
735 | } | 691 | uart->oh->flags |= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET; |
736 | 692 | } while (1); | |
737 | /* FIXME: Remove this once the clkdev is ready */ | ||
738 | if (!cpu_is_omap44xx()) { | ||
739 | if (!uart->ick || !uart->fck) | ||
740 | continue; | ||
741 | } | ||
742 | |||
743 | uart->num = i; | ||
744 | p->private_data = uart; | ||
745 | uart->p = p; | ||
746 | |||
747 | if (cpu_is_omap44xx()) | ||
748 | p->irq += 32; | ||
749 | } | ||
750 | } | 693 | } |
751 | 694 | ||
752 | /** | 695 | /** |
@@ -763,53 +706,135 @@ void __init omap_serial_early_init(void) | |||
763 | void __init omap_serial_init_port(int port) | 706 | void __init omap_serial_init_port(int port) |
764 | { | 707 | { |
765 | struct omap_uart_state *uart; | 708 | struct omap_uart_state *uart; |
766 | struct platform_device *pdev; | 709 | struct omap_hwmod *oh; |
767 | struct device *dev; | 710 | struct omap_device *od; |
768 | 711 | void *pdata = NULL; | |
769 | BUG_ON(port < 0); | 712 | u32 pdata_size = 0; |
770 | BUG_ON(port >= ARRAY_SIZE(omap_uart)); | 713 | char *name; |
771 | 714 | #ifndef CONFIG_SERIAL_OMAP | |
772 | uart = &omap_uart[port]; | 715 | struct plat_serial8250_port ports[2] = { |
773 | pdev = &uart->pdev; | 716 | {}, |
774 | dev = &pdev->dev; | 717 | {.flags = 0}, |
718 | }; | ||
719 | struct plat_serial8250_port *p = &ports[0]; | ||
720 | #else | ||
721 | struct omap_uart_port_info omap_up; | ||
722 | #endif | ||
775 | 723 | ||
776 | /* Don't proceed if there's no clocks available */ | 724 | if (WARN_ON(port < 0)) |
777 | if (unlikely(!uart->ick || !uart->fck)) { | 725 | return; |
778 | WARN(1, "%s: can't init uart%d, no clocks available\n", | 726 | if (WARN_ON(port >= num_uarts)) |
779 | kobject_name(&dev->kobj), port); | ||
780 | return; | 727 | return; |
781 | } | ||
782 | |||
783 | omap_uart_enable_clocks(uart); | ||
784 | |||
785 | omap_uart_reset(uart); | ||
786 | omap_uart_idle_init(uart); | ||
787 | 728 | ||
788 | list_add_tail(&uart->node, &uart_list); | 729 | list_for_each_entry(uart, &uart_list, node) |
730 | if (port == uart->num) | ||
731 | break; | ||
789 | 732 | ||
790 | if (WARN_ON(platform_device_register(pdev))) | 733 | oh = uart->oh; |
791 | return; | 734 | uart->dma_enabled = 0; |
735 | #ifndef CONFIG_SERIAL_OMAP | ||
736 | name = "serial8250"; | ||
792 | 737 | ||
793 | if ((cpu_is_omap34xx() && uart->padconf) || | 738 | /* |
794 | (uart->wk_en && uart->wk_mask)) { | 739 | * !! 8250 driver does not use standard IORESOURCE* It |
795 | device_init_wakeup(dev, true); | 740 | * has it's own custom pdata that can be taken from |
796 | DEV_CREATE_FILE(dev, &dev_attr_sleep_timeout); | 741 | * the hwmod resource data. But, this needs to be |
797 | } | 742 | * done after the build. |
743 | * | ||
744 | * ?? does it have to be done before the register ?? | ||
745 | * YES, because platform_device_data_add() copies | ||
746 | * pdata, it does not use a pointer. | ||
747 | */ | ||
748 | p->flags = UPF_BOOT_AUTOCONF; | ||
749 | p->iotype = UPIO_MEM; | ||
750 | p->regshift = 2; | ||
751 | p->uartclk = OMAP24XX_BASE_BAUD * 16; | ||
752 | p->irq = oh->mpu_irqs[0].irq; | ||
753 | p->mapbase = oh->slaves[0]->addr->pa_start; | ||
754 | p->membase = omap_hwmod_get_mpu_rt_va(oh); | ||
755 | p->irqflags = IRQF_SHARED; | ||
756 | p->private_data = uart; | ||
798 | 757 | ||
799 | /* | 758 | /* |
800 | * omap44xx: Never read empty UART fifo | 759 | * omap44xx: Never read empty UART fifo |
801 | * omap3xxx: Never read empty UART fifo on UARTs | 760 | * omap3xxx: Never read empty UART fifo on UARTs |
802 | * with IP rev >=0x52 | 761 | * with IP rev >=0x52 |
803 | */ | 762 | */ |
763 | uart->regshift = p->regshift; | ||
764 | uart->membase = p->membase; | ||
804 | if (cpu_is_omap44xx()) | 765 | if (cpu_is_omap44xx()) |
805 | uart->errata |= UART_ERRATA_FIFO_FULL_ABORT; | 766 | uart->errata |= UART_ERRATA_FIFO_FULL_ABORT; |
806 | else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF) | 767 | else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF) |
807 | >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV) | 768 | >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV) |
808 | uart->errata |= UART_ERRATA_FIFO_FULL_ABORT; | 769 | uart->errata |= UART_ERRATA_FIFO_FULL_ABORT; |
809 | 770 | ||
810 | if (uart->errata & UART_ERRATA_FIFO_FULL_ABORT) { | 771 | if (uart->errata & UART_ERRATA_FIFO_FULL_ABORT) { |
811 | uart->p->serial_in = serial_in_override; | 772 | p->serial_in = serial_in_override; |
812 | uart->p->serial_out = serial_out_override; | 773 | p->serial_out = serial_out_override; |
774 | } | ||
775 | |||
776 | pdata = &ports[0]; | ||
777 | pdata_size = 2 * sizeof(struct plat_serial8250_port); | ||
778 | #else | ||
779 | |||
780 | name = DRIVER_NAME; | ||
781 | |||
782 | omap_up.dma_enabled = uart->dma_enabled; | ||
783 | omap_up.uartclk = OMAP24XX_BASE_BAUD * 16; | ||
784 | omap_up.mapbase = oh->slaves[0]->addr->pa_start; | ||
785 | omap_up.membase = omap_hwmod_get_mpu_rt_va(oh); | ||
786 | omap_up.irqflags = IRQF_SHARED; | ||
787 | omap_up.flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ; | ||
788 | |||
789 | pdata = &omap_up; | ||
790 | pdata_size = sizeof(struct omap_uart_port_info); | ||
791 | #endif | ||
792 | |||
793 | if (WARN_ON(!oh)) | ||
794 | return; | ||
795 | |||
796 | od = omap_device_build(name, uart->num, oh, pdata, pdata_size, | ||
797 | omap_uart_latency, | ||
798 | ARRAY_SIZE(omap_uart_latency), false); | ||
799 | WARN(IS_ERR(od), "Could not build omap_device for %s: %s.\n", | ||
800 | name, oh->name); | ||
801 | |||
802 | uart->irq = oh->mpu_irqs[0].irq; | ||
803 | uart->regshift = 2; | ||
804 | uart->mapbase = oh->slaves[0]->addr->pa_start; | ||
805 | uart->membase = omap_hwmod_get_mpu_rt_va(oh); | ||
806 | uart->pdev = &od->pdev; | ||
807 | |||
808 | oh->dev_attr = uart; | ||
809 | |||
810 | /* | ||
811 | * Because of early UART probing, UART did not get idled | ||
812 | * on init. Now that omap_device is ready, ensure full idle | ||
813 | * before doing omap_device_enable(). | ||
814 | */ | ||
815 | omap_hwmod_idle(uart->oh); | ||
816 | |||
817 | omap_device_enable(uart->pdev); | ||
818 | omap_uart_idle_init(uart); | ||
819 | omap_uart_reset(uart); | ||
820 | omap_hwmod_enable_wakeup(uart->oh); | ||
821 | omap_device_idle(uart->pdev); | ||
822 | |||
823 | /* | ||
824 | * Need to block sleep long enough for interrupt driven | ||
825 | * driver to start. Console driver is in polling mode | ||
826 | * so device needs to be kept enabled while polling driver | ||
827 | * is in use. | ||
828 | */ | ||
829 | if (uart->timeout) | ||
830 | uart->timeout = (30 * HZ); | ||
831 | omap_uart_block_sleep(uart); | ||
832 | uart->timeout = DEFAULT_TIMEOUT; | ||
833 | |||
834 | if ((cpu_is_omap34xx() && uart->padconf) || | ||
835 | (uart->wk_en && uart->wk_mask)) { | ||
836 | device_init_wakeup(&od->pdev.dev, true); | ||
837 | DEV_CREATE_FILE(&od->pdev.dev, &dev_attr_sleep_timeout); | ||
813 | } | 838 | } |
814 | 839 | ||
815 | /* Enable the MDR1 errata for OMAP3 */ | 840 | /* Enable the MDR1 errata for OMAP3 */ |
@@ -826,13 +851,8 @@ void __init omap_serial_init_port(int port) | |||
826 | */ | 851 | */ |
827 | void __init omap_serial_init(void) | 852 | void __init omap_serial_init(void) |
828 | { | 853 | { |
829 | int i, nr_ports; | 854 | struct omap_uart_state *uart; |
830 | |||
831 | if (!(cpu_is_omap3630() || cpu_is_omap4430())) | ||
832 | nr_ports = 3; | ||
833 | else | ||
834 | nr_ports = ARRAY_SIZE(omap_uart); | ||
835 | 855 | ||
836 | for (i = 0; i < nr_ports; i++) | 856 | list_for_each_entry(uart, &uart_list, node) |
837 | omap_serial_init_port(i); | 857 | omap_serial_init_port(uart->num); |
838 | } | 858 | } |
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S index ba53191ae4c5..2fb205a7f285 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S | |||
@@ -27,11 +27,11 @@ | |||
27 | #include <linux/linkage.h> | 27 | #include <linux/linkage.h> |
28 | #include <asm/assembler.h> | 28 | #include <asm/assembler.h> |
29 | #include <mach/io.h> | 29 | #include <mach/io.h> |
30 | #include <plat/control.h> | ||
31 | 30 | ||
32 | #include "cm.h" | 31 | #include "cm.h" |
33 | #include "prm.h" | 32 | #include "prm.h" |
34 | #include "sdrc.h" | 33 | #include "sdrc.h" |
34 | #include "control.h" | ||
35 | 35 | ||
36 | #define SDRC_SCRATCHPAD_SEM_V 0xfa00291c | 36 | #define SDRC_SCRATCHPAD_SEM_V 0xfa00291c |
37 | 37 | ||
diff --git a/arch/arm/mach-omap2/sram34xx.S b/arch/arm/mach-omap2/sram34xx.S index de99ba2a57ab..3637274af5be 100644 --- a/arch/arm/mach-omap2/sram34xx.S +++ b/arch/arm/mach-omap2/sram34xx.S | |||
@@ -129,8 +129,11 @@ ENTRY(omap3_sram_configure_core_dpll) | |||
129 | ldr r4, [sp, #80] | 129 | ldr r4, [sp, #80] |
130 | str r4, omap_sdrc_mr_1_val | 130 | str r4, omap_sdrc_mr_1_val |
131 | skip_cs1_params: | 131 | skip_cs1_params: |
132 | mrc p15, 0, r8, c1, c0, 0 @ read ctrl register | ||
133 | bic r10, r8, #0x800 @ clear Z-bit, disable branch prediction | ||
134 | mcr p15, 0, r10, c1, c0, 0 @ write ctrl register | ||
132 | dsb @ flush buffered writes to interconnect | 135 | dsb @ flush buffered writes to interconnect |
133 | 136 | isb @ prevent speculative exec past here | |
134 | cmp r3, #1 @ if increasing SDRC clk rate, | 137 | cmp r3, #1 @ if increasing SDRC clk rate, |
135 | bleq configure_sdrc @ program the SDRC regs early (for RFR) | 138 | bleq configure_sdrc @ program the SDRC regs early (for RFR) |
136 | cmp r1, #SDRC_UNLOCK_DLL @ set the intended DLL state | 139 | cmp r1, #SDRC_UNLOCK_DLL @ set the intended DLL state |
@@ -148,6 +151,7 @@ skip_cs1_params: | |||
148 | beq return_to_sdram @ return to SDRAM code, otherwise, | 151 | beq return_to_sdram @ return to SDRAM code, otherwise, |
149 | bl configure_sdrc @ reprogram SDRC regs now | 152 | bl configure_sdrc @ reprogram SDRC regs now |
150 | return_to_sdram: | 153 | return_to_sdram: |
154 | mcr p15, 0, r8, c1, c0, 0 @ restore ctrl register | ||
151 | isb @ prevent speculative exec past here | 155 | isb @ prevent speculative exec past here |
152 | mov r0, #0 @ return value | 156 | mov r0, #0 @ return value |
153 | ldmfd sp!, {r1-r12, pc} @ restore regs and return | 157 | ldmfd sp!, {r1-r12, pc} @ restore regs and return |
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 74fbed8491f2..e13c29eecf2b 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -40,6 +40,8 @@ | |||
40 | #include <plat/dmtimer.h> | 40 | #include <plat/dmtimer.h> |
41 | #include <asm/localtimer.h> | 41 | #include <asm/localtimer.h> |
42 | 42 | ||
43 | #include "timer-gp.h" | ||
44 | |||
43 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ | 45 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ |
44 | #define MAX_GPTIMER_ID 12 | 46 | #define MAX_GPTIMER_ID 12 |
45 | 47 | ||
@@ -228,8 +230,10 @@ static void __init omap2_gp_clocksource_init(void) | |||
228 | static void __init omap2_gp_timer_init(void) | 230 | static void __init omap2_gp_timer_init(void) |
229 | { | 231 | { |
230 | #ifdef CONFIG_LOCAL_TIMERS | 232 | #ifdef CONFIG_LOCAL_TIMERS |
231 | twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256); | 233 | if (cpu_is_omap44xx()) { |
232 | BUG_ON(!twd_base); | 234 | twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256); |
235 | BUG_ON(!twd_base); | ||
236 | } | ||
233 | #endif | 237 | #endif |
234 | omap_dm_timer_init(); | 238 | omap_dm_timer_init(); |
235 | 239 | ||
diff --git a/arch/arm/plat-omap/include/plat/timer-gp.h b/arch/arm/mach-omap2/timer-gp.h index c88d346b59d9..5c1072c6783b 100644 --- a/arch/arm/plat-omap/include/plat/timer-gp.h +++ b/arch/arm/mach-omap2/timer-gp.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H | 11 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H |
12 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H | 12 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H |
13 | 13 | ||
14 | int __init omap2_gp_clockevent_set_gptimer(u8 id); | 14 | extern int __init omap2_gp_clockevent_set_gptimer(u8 id); |
15 | 15 | ||
16 | #endif | 16 | #endif |
17 | |||
diff --git a/arch/arm/mach-omap2/usb-fs.c b/arch/arm/mach-omap2/usb-fs.c index a216d88b04b5..1481078763b8 100644 --- a/arch/arm/mach-omap2/usb-fs.c +++ b/arch/arm/mach-omap2/usb-fs.c | |||
@@ -29,18 +29,18 @@ | |||
29 | 29 | ||
30 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
31 | 31 | ||
32 | #include <plat/control.h> | ||
33 | #include <plat/usb.h> | 32 | #include <plat/usb.h> |
34 | #include <plat/board.h> | 33 | #include <plat/board.h> |
35 | 34 | ||
35 | #include "control.h" | ||
36 | #include "mux.h" | ||
37 | |||
36 | #define INT_USB_IRQ_GEN INT_24XX_USB_IRQ_GEN | 38 | #define INT_USB_IRQ_GEN INT_24XX_USB_IRQ_GEN |
37 | #define INT_USB_IRQ_NISO INT_24XX_USB_IRQ_NISO | 39 | #define INT_USB_IRQ_NISO INT_24XX_USB_IRQ_NISO |
38 | #define INT_USB_IRQ_ISO INT_24XX_USB_IRQ_ISO | 40 | #define INT_USB_IRQ_ISO INT_24XX_USB_IRQ_ISO |
39 | #define INT_USB_IRQ_HGEN INT_24XX_USB_IRQ_HGEN | 41 | #define INT_USB_IRQ_HGEN INT_24XX_USB_IRQ_HGEN |
40 | #define INT_USB_IRQ_OTG INT_24XX_USB_IRQ_OTG | 42 | #define INT_USB_IRQ_OTG INT_24XX_USB_IRQ_OTG |
41 | 43 | ||
42 | #include "mux.h" | ||
43 | |||
44 | #if defined(CONFIG_ARCH_OMAP2) | 44 | #if defined(CONFIG_ARCH_OMAP2) |
45 | 45 | ||
46 | #ifdef CONFIG_USB_GADGET_OMAP | 46 | #ifdef CONFIG_USB_GADGET_OMAP |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index a92cb499313f..92c5bb7909f5 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -19,7 +19,7 @@ config ARCH_OMAP2PLUS | |||
19 | bool "TI OMAP2/3/4" | 19 | bool "TI OMAP2/3/4" |
20 | select COMMON_CLKDEV | 20 | select COMMON_CLKDEV |
21 | help | 21 | help |
22 | "Systems based on omap24xx, omap34xx or omap44xx" | 22 | "Systems based on OMAP2, OMAP3 or OMAP4" |
23 | 23 | ||
24 | endchoice | 24 | endchoice |
25 | 25 | ||
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index 9405831b746a..a4a12859fdd5 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \ | 6 | obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \ |
7 | usb.o fb.o io.o | 7 | usb.o fb.o io.o counter_32k.o |
8 | obj-m := | 8 | obj-m := |
9 | obj-n := | 9 | obj-n := |
10 | obj- := | 10 | obj- := |
@@ -31,4 +31,4 @@ obj-y += $(i2c-omap-m) $(i2c-omap-y) | |||
31 | # OMAP mailbox framework | 31 | # OMAP mailbox framework |
32 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o | 32 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o |
33 | 33 | ||
34 | obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o \ No newline at end of file | 34 | obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o |
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 7190cbd92620..fc62fb5fc20b 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -60,7 +60,7 @@ void clk_disable(struct clk *clk) | |||
60 | 60 | ||
61 | spin_lock_irqsave(&clockfw_lock, flags); | 61 | spin_lock_irqsave(&clockfw_lock, flags); |
62 | if (clk->usecount == 0) { | 62 | if (clk->usecount == 0) { |
63 | printk(KERN_ERR "Trying disable clock %s with 0 usecount\n", | 63 | pr_err("Trying disable clock %s with 0 usecount\n", |
64 | clk->name); | 64 | clk->name); |
65 | WARN_ON(1); | 65 | WARN_ON(1); |
66 | goto out; | 66 | goto out; |
@@ -397,6 +397,7 @@ static int __init clk_disable_unused(void) | |||
397 | struct clk *ck; | 397 | struct clk *ck; |
398 | unsigned long flags; | 398 | unsigned long flags; |
399 | 399 | ||
400 | pr_info("clock: disabling unused clocks to save power\n"); | ||
400 | list_for_each_entry(ck, &clocks, node) { | 401 | list_for_each_entry(ck, &clocks, node) { |
401 | if (ck->ops == &clkops_null) | 402 | if (ck->ops == &clkops_null) |
402 | continue; | 403 | continue; |
@@ -418,7 +419,7 @@ late_initcall(clk_disable_unused); | |||
418 | int __init clk_init(struct clk_functions * custom_clocks) | 419 | int __init clk_init(struct clk_functions * custom_clocks) |
419 | { | 420 | { |
420 | if (!custom_clocks) { | 421 | if (!custom_clocks) { |
421 | printk(KERN_ERR "No custom clock functions registered\n"); | 422 | pr_err("No custom clock functions registered\n"); |
422 | BUG(); | 423 | BUG(); |
423 | } | 424 | } |
424 | 425 | ||
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index 3008e7104487..221a675ebbae 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -11,38 +11,15 @@ | |||
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | #include <linux/module.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/delay.h> | ||
18 | #include <linux/console.h> | ||
19 | #include <linux/serial.h> | ||
20 | #include <linux/tty.h> | ||
21 | #include <linux/serial_8250.h> | ||
22 | #include <linux/serial_reg.h> | ||
23 | #include <linux/clk.h> | ||
24 | #include <linux/io.h> | 16 | #include <linux/io.h> |
25 | #include <linux/omapfb.h> | 17 | #include <linux/omapfb.h> |
26 | 18 | ||
27 | #include <mach/hardware.h> | ||
28 | #include <asm/system.h> | ||
29 | #include <asm/pgtable.h> | ||
30 | #include <asm/mach/map.h> | ||
31 | #include <asm/setup.h> | ||
32 | |||
33 | #include <plat/common.h> | 19 | #include <plat/common.h> |
34 | #include <plat/board.h> | 20 | #include <plat/board.h> |
35 | #include <plat/control.h> | ||
36 | #include <plat/mux.h> | ||
37 | #include <plat/fpga.h> | ||
38 | #include <plat/serial.h> | ||
39 | #include <plat/vram.h> | 21 | #include <plat/vram.h> |
40 | 22 | ||
41 | #include <plat/clock.h> | ||
42 | |||
43 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | ||
44 | # include "../mach-omap2/sdrc.h" | ||
45 | #endif | ||
46 | 23 | ||
47 | #define NO_LENGTH_CHECK 0xffffffff | 24 | #define NO_LENGTH_CHECK 0xffffffff |
48 | 25 | ||
@@ -88,270 +65,3 @@ void __init omap_reserve(void) | |||
88 | omapfb_reserve_sdram_memblock(); | 65 | omapfb_reserve_sdram_memblock(); |
89 | omap_vram_reserve_sdram_memblock(); | 66 | omap_vram_reserve_sdram_memblock(); |
90 | } | 67 | } |
91 | |||
92 | /* | ||
93 | * 32KHz clocksource ... always available, on pretty most chips except | ||
94 | * OMAP 730 and 1510. Other timers could be used as clocksources, with | ||
95 | * higher resolution in free-running counter modes (e.g. 12 MHz xtal), | ||
96 | * but systems won't necessarily want to spend resources that way. | ||
97 | */ | ||
98 | |||
99 | #define OMAP16XX_TIMER_32K_SYNCHRONIZED 0xfffbc410 | ||
100 | |||
101 | #if !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX)) | ||
102 | |||
103 | #include <linux/clocksource.h> | ||
104 | |||
105 | /* | ||
106 | * offset_32k holds the init time counter value. It is then subtracted | ||
107 | * from every counter read to achieve a counter that counts time from the | ||
108 | * kernel boot (needed for sched_clock()). | ||
109 | */ | ||
110 | static u32 offset_32k __read_mostly; | ||
111 | |||
112 | #ifdef CONFIG_ARCH_OMAP16XX | ||
113 | static cycle_t omap16xx_32k_read(struct clocksource *cs) | ||
114 | { | ||
115 | return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED) - offset_32k; | ||
116 | } | ||
117 | #else | ||
118 | #define omap16xx_32k_read NULL | ||
119 | #endif | ||
120 | |||
121 | #ifdef CONFIG_ARCH_OMAP2420 | ||
122 | static cycle_t omap2420_32k_read(struct clocksource *cs) | ||
123 | { | ||
124 | return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10) - offset_32k; | ||
125 | } | ||
126 | #else | ||
127 | #define omap2420_32k_read NULL | ||
128 | #endif | ||
129 | |||
130 | #ifdef CONFIG_ARCH_OMAP2430 | ||
131 | static cycle_t omap2430_32k_read(struct clocksource *cs) | ||
132 | { | ||
133 | return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10) - offset_32k; | ||
134 | } | ||
135 | #else | ||
136 | #define omap2430_32k_read NULL | ||
137 | #endif | ||
138 | |||
139 | #ifdef CONFIG_ARCH_OMAP3 | ||
140 | static cycle_t omap34xx_32k_read(struct clocksource *cs) | ||
141 | { | ||
142 | return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10) - offset_32k; | ||
143 | } | ||
144 | #else | ||
145 | #define omap34xx_32k_read NULL | ||
146 | #endif | ||
147 | |||
148 | #ifdef CONFIG_ARCH_OMAP4 | ||
149 | static cycle_t omap44xx_32k_read(struct clocksource *cs) | ||
150 | { | ||
151 | return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10) - offset_32k; | ||
152 | } | ||
153 | #else | ||
154 | #define omap44xx_32k_read NULL | ||
155 | #endif | ||
156 | |||
157 | /* | ||
158 | * Kernel assumes that sched_clock can be called early but may not have | ||
159 | * things ready yet. | ||
160 | */ | ||
161 | static cycle_t omap_32k_read_dummy(struct clocksource *cs) | ||
162 | { | ||
163 | return 0; | ||
164 | } | ||
165 | |||
166 | static struct clocksource clocksource_32k = { | ||
167 | .name = "32k_counter", | ||
168 | .rating = 250, | ||
169 | .read = omap_32k_read_dummy, | ||
170 | .mask = CLOCKSOURCE_MASK(32), | ||
171 | .shift = 10, | ||
172 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
173 | }; | ||
174 | |||
175 | /* | ||
176 | * Returns current time from boot in nsecs. It's OK for this to wrap | ||
177 | * around for now, as it's just a relative time stamp. | ||
178 | */ | ||
179 | unsigned long long sched_clock(void) | ||
180 | { | ||
181 | return clocksource_cyc2ns(clocksource_32k.read(&clocksource_32k), | ||
182 | clocksource_32k.mult, clocksource_32k.shift); | ||
183 | } | ||
184 | |||
185 | /** | ||
186 | * read_persistent_clock - Return time from a persistent clock. | ||
187 | * | ||
188 | * Reads the time from a source which isn't disabled during PM, the | ||
189 | * 32k sync timer. Convert the cycles elapsed since last read into | ||
190 | * nsecs and adds to a monotonically increasing timespec. | ||
191 | */ | ||
192 | static struct timespec persistent_ts; | ||
193 | static cycles_t cycles, last_cycles; | ||
194 | void read_persistent_clock(struct timespec *ts) | ||
195 | { | ||
196 | unsigned long long nsecs; | ||
197 | cycles_t delta; | ||
198 | struct timespec *tsp = &persistent_ts; | ||
199 | |||
200 | last_cycles = cycles; | ||
201 | cycles = clocksource_32k.read(&clocksource_32k); | ||
202 | delta = cycles - last_cycles; | ||
203 | |||
204 | nsecs = clocksource_cyc2ns(delta, | ||
205 | clocksource_32k.mult, clocksource_32k.shift); | ||
206 | |||
207 | timespec_add_ns(tsp, nsecs); | ||
208 | *ts = *tsp; | ||
209 | } | ||
210 | |||
211 | static int __init omap_init_clocksource_32k(void) | ||
212 | { | ||
213 | static char err[] __initdata = KERN_ERR | ||
214 | "%s: can't register clocksource!\n"; | ||
215 | |||
216 | if (cpu_is_omap16xx() || cpu_class_is_omap2()) { | ||
217 | struct clk *sync_32k_ick; | ||
218 | |||
219 | if (cpu_is_omap16xx()) | ||
220 | clocksource_32k.read = omap16xx_32k_read; | ||
221 | else if (cpu_is_omap2420()) | ||
222 | clocksource_32k.read = omap2420_32k_read; | ||
223 | else if (cpu_is_omap2430()) | ||
224 | clocksource_32k.read = omap2430_32k_read; | ||
225 | else if (cpu_is_omap34xx()) | ||
226 | clocksource_32k.read = omap34xx_32k_read; | ||
227 | else if (cpu_is_omap44xx()) | ||
228 | clocksource_32k.read = omap44xx_32k_read; | ||
229 | else | ||
230 | return -ENODEV; | ||
231 | |||
232 | sync_32k_ick = clk_get(NULL, "omap_32ksync_ick"); | ||
233 | if (sync_32k_ick) | ||
234 | clk_enable(sync_32k_ick); | ||
235 | |||
236 | clocksource_32k.mult = clocksource_hz2mult(32768, | ||
237 | clocksource_32k.shift); | ||
238 | |||
239 | offset_32k = clocksource_32k.read(&clocksource_32k); | ||
240 | |||
241 | if (clocksource_register(&clocksource_32k)) | ||
242 | printk(err, clocksource_32k.name); | ||
243 | } | ||
244 | return 0; | ||
245 | } | ||
246 | arch_initcall(omap_init_clocksource_32k); | ||
247 | |||
248 | #endif /* !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX)) */ | ||
249 | |||
250 | /* Global address base setup code */ | ||
251 | |||
252 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | ||
253 | |||
254 | static void __init __omap2_set_globals(struct omap_globals *omap2_globals) | ||
255 | { | ||
256 | omap2_set_globals_tap(omap2_globals); | ||
257 | omap2_set_globals_sdrc(omap2_globals); | ||
258 | omap2_set_globals_control(omap2_globals); | ||
259 | omap2_set_globals_prcm(omap2_globals); | ||
260 | omap2_set_globals_uart(omap2_globals); | ||
261 | } | ||
262 | |||
263 | #endif | ||
264 | |||
265 | #if defined(CONFIG_ARCH_OMAP2420) | ||
266 | |||
267 | static struct omap_globals omap242x_globals = { | ||
268 | .class = OMAP242X_CLASS, | ||
269 | .tap = OMAP2_L4_IO_ADDRESS(0x48014000), | ||
270 | .sdrc = OMAP2420_SDRC_BASE, | ||
271 | .sms = OMAP2420_SMS_BASE, | ||
272 | .ctrl = OMAP2420_CTRL_BASE, | ||
273 | .prm = OMAP2420_PRM_BASE, | ||
274 | .cm = OMAP2420_CM_BASE, | ||
275 | .uart1_phys = OMAP2_UART1_BASE, | ||
276 | .uart2_phys = OMAP2_UART2_BASE, | ||
277 | .uart3_phys = OMAP2_UART3_BASE, | ||
278 | }; | ||
279 | |||
280 | void __init omap2_set_globals_242x(void) | ||
281 | { | ||
282 | __omap2_set_globals(&omap242x_globals); | ||
283 | } | ||
284 | #endif | ||
285 | |||
286 | #if defined(CONFIG_ARCH_OMAP2430) | ||
287 | |||
288 | static struct omap_globals omap243x_globals = { | ||
289 | .class = OMAP243X_CLASS, | ||
290 | .tap = OMAP2_L4_IO_ADDRESS(0x4900a000), | ||
291 | .sdrc = OMAP243X_SDRC_BASE, | ||
292 | .sms = OMAP243X_SMS_BASE, | ||
293 | .ctrl = OMAP243X_CTRL_BASE, | ||
294 | .prm = OMAP2430_PRM_BASE, | ||
295 | .cm = OMAP2430_CM_BASE, | ||
296 | .uart1_phys = OMAP2_UART1_BASE, | ||
297 | .uart2_phys = OMAP2_UART2_BASE, | ||
298 | .uart3_phys = OMAP2_UART3_BASE, | ||
299 | }; | ||
300 | |||
301 | void __init omap2_set_globals_243x(void) | ||
302 | { | ||
303 | __omap2_set_globals(&omap243x_globals); | ||
304 | } | ||
305 | #endif | ||
306 | |||
307 | #if defined(CONFIG_ARCH_OMAP3) | ||
308 | |||
309 | static struct omap_globals omap3_globals = { | ||
310 | .class = OMAP343X_CLASS, | ||
311 | .tap = OMAP2_L4_IO_ADDRESS(0x4830A000), | ||
312 | .sdrc = OMAP343X_SDRC_BASE, | ||
313 | .sms = OMAP343X_SMS_BASE, | ||
314 | .ctrl = OMAP343X_CTRL_BASE, | ||
315 | .prm = OMAP3430_PRM_BASE, | ||
316 | .cm = OMAP3430_CM_BASE, | ||
317 | .uart1_phys = OMAP3_UART1_BASE, | ||
318 | .uart2_phys = OMAP3_UART2_BASE, | ||
319 | .uart3_phys = OMAP3_UART3_BASE, | ||
320 | .uart4_phys = OMAP3_UART4_BASE, /* Only on 3630 */ | ||
321 | }; | ||
322 | |||
323 | void __init omap2_set_globals_3xxx(void) | ||
324 | { | ||
325 | __omap2_set_globals(&omap3_globals); | ||
326 | } | ||
327 | |||
328 | void __init omap3_map_io(void) | ||
329 | { | ||
330 | omap2_set_globals_3xxx(); | ||
331 | omap34xx_map_common_io(); | ||
332 | } | ||
333 | #endif | ||
334 | |||
335 | #if defined(CONFIG_ARCH_OMAP4) | ||
336 | static struct omap_globals omap4_globals = { | ||
337 | .class = OMAP443X_CLASS, | ||
338 | .tap = OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE), | ||
339 | .ctrl = OMAP443X_CTRL_BASE, | ||
340 | .prm = OMAP4430_PRM_BASE, | ||
341 | .cm = OMAP4430_CM_BASE, | ||
342 | .cm2 = OMAP4430_CM2_BASE, | ||
343 | .uart1_phys = OMAP4_UART1_BASE, | ||
344 | .uart2_phys = OMAP4_UART2_BASE, | ||
345 | .uart3_phys = OMAP4_UART3_BASE, | ||
346 | .uart4_phys = OMAP4_UART4_BASE, | ||
347 | }; | ||
348 | |||
349 | void __init omap2_set_globals_443x(void) | ||
350 | { | ||
351 | omap2_set_globals_tap(&omap4_globals); | ||
352 | omap2_set_globals_control(&omap4_globals); | ||
353 | omap2_set_globals_prcm(&omap4_globals); | ||
354 | omap2_set_globals_uart(&omap4_globals); | ||
355 | } | ||
356 | #endif | ||
357 | |||
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c new file mode 100644 index 000000000000..155fe43a672b --- /dev/null +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -0,0 +1,183 @@ | |||
1 | /* | ||
2 | * OMAP 32ksynctimer/counter_32k-related code | ||
3 | * | ||
4 | * Copyright (C) 2009 Texas Instruments | ||
5 | * Copyright (C) 2010 Nokia Corporation | ||
6 | * Tony Lindgren <tony@atomide.com> | ||
7 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * NOTE: This timer is not the same timer as the old OMAP1 MPU timer. | ||
14 | */ | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/clk.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
20 | #include <plat/common.h> | ||
21 | #include <plat/board.h> | ||
22 | |||
23 | #include <plat/clock.h> | ||
24 | |||
25 | |||
26 | /* | ||
27 | * 32KHz clocksource ... always available, on pretty most chips except | ||
28 | * OMAP 730 and 1510. Other timers could be used as clocksources, with | ||
29 | * higher resolution in free-running counter modes (e.g. 12 MHz xtal), | ||
30 | * but systems won't necessarily want to spend resources that way. | ||
31 | */ | ||
32 | |||
33 | #define OMAP16XX_TIMER_32K_SYNCHRONIZED 0xfffbc410 | ||
34 | |||
35 | #if !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX)) | ||
36 | |||
37 | #include <linux/clocksource.h> | ||
38 | |||
39 | /* | ||
40 | * offset_32k holds the init time counter value. It is then subtracted | ||
41 | * from every counter read to achieve a counter that counts time from the | ||
42 | * kernel boot (needed for sched_clock()). | ||
43 | */ | ||
44 | static u32 offset_32k __read_mostly; | ||
45 | |||
46 | #ifdef CONFIG_ARCH_OMAP16XX | ||
47 | static cycle_t omap16xx_32k_read(struct clocksource *cs) | ||
48 | { | ||
49 | return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED) - offset_32k; | ||
50 | } | ||
51 | #else | ||
52 | #define omap16xx_32k_read NULL | ||
53 | #endif | ||
54 | |||
55 | #ifdef CONFIG_ARCH_OMAP2420 | ||
56 | static cycle_t omap2420_32k_read(struct clocksource *cs) | ||
57 | { | ||
58 | return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10) - offset_32k; | ||
59 | } | ||
60 | #else | ||
61 | #define omap2420_32k_read NULL | ||
62 | #endif | ||
63 | |||
64 | #ifdef CONFIG_ARCH_OMAP2430 | ||
65 | static cycle_t omap2430_32k_read(struct clocksource *cs) | ||
66 | { | ||
67 | return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10) - offset_32k; | ||
68 | } | ||
69 | #else | ||
70 | #define omap2430_32k_read NULL | ||
71 | #endif | ||
72 | |||
73 | #ifdef CONFIG_ARCH_OMAP3 | ||
74 | static cycle_t omap34xx_32k_read(struct clocksource *cs) | ||
75 | { | ||
76 | return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10) - offset_32k; | ||
77 | } | ||
78 | #else | ||
79 | #define omap34xx_32k_read NULL | ||
80 | #endif | ||
81 | |||
82 | #ifdef CONFIG_ARCH_OMAP4 | ||
83 | static cycle_t omap44xx_32k_read(struct clocksource *cs) | ||
84 | { | ||
85 | return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10) - offset_32k; | ||
86 | } | ||
87 | #else | ||
88 | #define omap44xx_32k_read NULL | ||
89 | #endif | ||
90 | |||
91 | /* | ||
92 | * Kernel assumes that sched_clock can be called early but may not have | ||
93 | * things ready yet. | ||
94 | */ | ||
95 | static cycle_t omap_32k_read_dummy(struct clocksource *cs) | ||
96 | { | ||
97 | return 0; | ||
98 | } | ||
99 | |||
100 | static struct clocksource clocksource_32k = { | ||
101 | .name = "32k_counter", | ||
102 | .rating = 250, | ||
103 | .read = omap_32k_read_dummy, | ||
104 | .mask = CLOCKSOURCE_MASK(32), | ||
105 | .shift = 10, | ||
106 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
107 | }; | ||
108 | |||
109 | /* | ||
110 | * Returns current time from boot in nsecs. It's OK for this to wrap | ||
111 | * around for now, as it's just a relative time stamp. | ||
112 | */ | ||
113 | unsigned long long sched_clock(void) | ||
114 | { | ||
115 | return clocksource_cyc2ns(clocksource_32k.read(&clocksource_32k), | ||
116 | clocksource_32k.mult, clocksource_32k.shift); | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * read_persistent_clock - Return time from a persistent clock. | ||
121 | * | ||
122 | * Reads the time from a source which isn't disabled during PM, the | ||
123 | * 32k sync timer. Convert the cycles elapsed since last read into | ||
124 | * nsecs and adds to a monotonically increasing timespec. | ||
125 | */ | ||
126 | static struct timespec persistent_ts; | ||
127 | static cycles_t cycles, last_cycles; | ||
128 | void read_persistent_clock(struct timespec *ts) | ||
129 | { | ||
130 | unsigned long long nsecs; | ||
131 | cycles_t delta; | ||
132 | struct timespec *tsp = &persistent_ts; | ||
133 | |||
134 | last_cycles = cycles; | ||
135 | cycles = clocksource_32k.read(&clocksource_32k); | ||
136 | delta = cycles - last_cycles; | ||
137 | |||
138 | nsecs = clocksource_cyc2ns(delta, | ||
139 | clocksource_32k.mult, clocksource_32k.shift); | ||
140 | |||
141 | timespec_add_ns(tsp, nsecs); | ||
142 | *ts = *tsp; | ||
143 | } | ||
144 | |||
145 | static int __init omap_init_clocksource_32k(void) | ||
146 | { | ||
147 | static char err[] __initdata = KERN_ERR | ||
148 | "%s: can't register clocksource!\n"; | ||
149 | |||
150 | if (cpu_is_omap16xx() || cpu_class_is_omap2()) { | ||
151 | struct clk *sync_32k_ick; | ||
152 | |||
153 | if (cpu_is_omap16xx()) | ||
154 | clocksource_32k.read = omap16xx_32k_read; | ||
155 | else if (cpu_is_omap2420()) | ||
156 | clocksource_32k.read = omap2420_32k_read; | ||
157 | else if (cpu_is_omap2430()) | ||
158 | clocksource_32k.read = omap2430_32k_read; | ||
159 | else if (cpu_is_omap34xx()) | ||
160 | clocksource_32k.read = omap34xx_32k_read; | ||
161 | else if (cpu_is_omap44xx()) | ||
162 | clocksource_32k.read = omap44xx_32k_read; | ||
163 | else | ||
164 | return -ENODEV; | ||
165 | |||
166 | sync_32k_ick = clk_get(NULL, "omap_32ksync_ick"); | ||
167 | if (sync_32k_ick) | ||
168 | clk_enable(sync_32k_ick); | ||
169 | |||
170 | clocksource_32k.mult = clocksource_hz2mult(32768, | ||
171 | clocksource_32k.shift); | ||
172 | |||
173 | offset_32k = clocksource_32k.read(&clocksource_32k); | ||
174 | |||
175 | if (clocksource_register(&clocksource_32k)) | ||
176 | printk(err, clocksource_32k.name); | ||
177 | } | ||
178 | return 0; | ||
179 | } | ||
180 | arch_initcall(omap_init_clocksource_32k); | ||
181 | |||
182 | #endif /* !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX)) */ | ||
183 | |||
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index 6d3d33360056..11c54ec8d47f 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c | |||
@@ -40,7 +40,7 @@ static struct clk *mpu_clk; | |||
40 | 40 | ||
41 | /* TODO: Add support for SDRAM timing changes */ | 41 | /* TODO: Add support for SDRAM timing changes */ |
42 | 42 | ||
43 | int omap_verify_speed(struct cpufreq_policy *policy) | 43 | static int omap_verify_speed(struct cpufreq_policy *policy) |
44 | { | 44 | { |
45 | if (freq_table) | 45 | if (freq_table) |
46 | return cpufreq_frequency_table_verify(policy, freq_table); | 46 | return cpufreq_frequency_table_verify(policy, freq_table); |
@@ -58,7 +58,7 @@ int omap_verify_speed(struct cpufreq_policy *policy) | |||
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
61 | unsigned int omap_getspeed(unsigned int cpu) | 61 | static unsigned int omap_getspeed(unsigned int cpu) |
62 | { | 62 | { |
63 | unsigned long rate; | 63 | unsigned long rate; |
64 | 64 | ||
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index d1920be7833b..1e2383eae638 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <asm/mach/map.h> | 21 | #include <asm/mach/map.h> |
22 | 22 | ||
23 | #include <plat/tc.h> | 23 | #include <plat/tc.h> |
24 | #include <plat/control.h> | ||
25 | #include <plat/board.h> | 24 | #include <plat/board.h> |
26 | #include <plat/mmc.h> | 25 | #include <plat/mmc.h> |
27 | #include <mach/gpio.h> | 26 | #include <mach/gpio.h> |
@@ -232,46 +231,6 @@ static void omap_init_uwire(void) | |||
232 | static inline void omap_init_uwire(void) {} | 231 | static inline void omap_init_uwire(void) {} |
233 | #endif | 232 | #endif |
234 | 233 | ||
235 | /*-------------------------------------------------------------------------*/ | ||
236 | |||
237 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) | ||
238 | |||
239 | static struct resource wdt_resources[] = { | ||
240 | { | ||
241 | .flags = IORESOURCE_MEM, | ||
242 | }, | ||
243 | }; | ||
244 | |||
245 | static struct platform_device omap_wdt_device = { | ||
246 | .name = "omap_wdt", | ||
247 | .id = -1, | ||
248 | .num_resources = ARRAY_SIZE(wdt_resources), | ||
249 | .resource = wdt_resources, | ||
250 | }; | ||
251 | |||
252 | static void omap_init_wdt(void) | ||
253 | { | ||
254 | if (cpu_is_omap16xx()) | ||
255 | wdt_resources[0].start = 0xfffeb000; | ||
256 | else if (cpu_is_omap2420()) | ||
257 | wdt_resources[0].start = 0x48022000; /* WDT2 */ | ||
258 | else if (cpu_is_omap2430()) | ||
259 | wdt_resources[0].start = 0x49016000; /* WDT2 */ | ||
260 | else if (cpu_is_omap343x()) | ||
261 | wdt_resources[0].start = 0x48314000; /* WDT2 */ | ||
262 | else if (cpu_is_omap44xx()) | ||
263 | wdt_resources[0].start = 0x4a314000; | ||
264 | else | ||
265 | return; | ||
266 | |||
267 | wdt_resources[0].end = wdt_resources[0].start + 0x4f; | ||
268 | |||
269 | (void) platform_device_register(&omap_wdt_device); | ||
270 | } | ||
271 | #else | ||
272 | static inline void omap_init_wdt(void) {} | ||
273 | #endif | ||
274 | |||
275 | /* | 234 | /* |
276 | * This gets called after board-specific INIT_MACHINE, and initializes most | 235 | * This gets called after board-specific INIT_MACHINE, and initializes most |
277 | * on-chip peripherals accessible on this board (except for few like USB): | 236 | * on-chip peripherals accessible on this board (except for few like USB): |
@@ -300,7 +259,6 @@ static int __init omap_init_devices(void) | |||
300 | omap_init_rng(); | 259 | omap_init_rng(); |
301 | omap_init_mcpdm(); | 260 | omap_init_mcpdm(); |
302 | omap_init_uwire(); | 261 | omap_init_uwire(); |
303 | omap_init_wdt(); | ||
304 | return 0; | 262 | return 0; |
305 | } | 263 | } |
306 | arch_initcall(omap_init_devices); | 264 | arch_initcall(omap_init_devices); |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index ec7eddf9e525..f5c5b8da9a87 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/irq.h> | 30 | #include <linux/irq.h> |
31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/delay.h> | ||
33 | 34 | ||
34 | #include <asm/system.h> | 35 | #include <asm/system.h> |
35 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
@@ -996,11 +997,17 @@ void omap_start_dma(int lch) | |||
996 | l = dma_read(CCR(lch)); | 997 | l = dma_read(CCR(lch)); |
997 | 998 | ||
998 | /* | 999 | /* |
999 | * Errata: On ES2.0 BUFFERING disable must be set. | 1000 | * Errata: Inter Frame DMA buffering issue (All OMAP2420 and |
1000 | * This will always fail on ES1.0 | 1001 | * OMAP2430ES1.0): DMA will wrongly buffer elements if packing and |
1002 | * bursting is enabled. This might result in data gets stalled in | ||
1003 | * FIFO at the end of the block. | ||
1004 | * Workaround: DMA channels must have BUFFERING_DISABLED bit set to | ||
1005 | * guarantee no data will stay in the DMA FIFO in case inter frame | ||
1006 | * buffering occurs. | ||
1001 | */ | 1007 | */ |
1002 | if (cpu_is_omap24xx()) | 1008 | if (cpu_is_omap2420() || |
1003 | l |= OMAP_DMA_CCR_EN; | 1009 | (cpu_is_omap2430() && (omap_type() == OMAP2430_REV_ES1_0))) |
1010 | l |= OMAP_DMA_CCR_BUFFERING_DISABLE; | ||
1004 | 1011 | ||
1005 | l |= OMAP_DMA_CCR_EN; | 1012 | l |= OMAP_DMA_CCR_EN; |
1006 | dma_write(l, CCR(lch)); | 1013 | dma_write(l, CCR(lch)); |
@@ -1018,8 +1025,39 @@ void omap_stop_dma(int lch) | |||
1018 | dma_write(0, CICR(lch)); | 1025 | dma_write(0, CICR(lch)); |
1019 | 1026 | ||
1020 | l = dma_read(CCR(lch)); | 1027 | l = dma_read(CCR(lch)); |
1021 | l &= ~OMAP_DMA_CCR_EN; | 1028 | /* OMAP3 Errata i541: sDMA FIFO draining does not finish */ |
1022 | dma_write(l, CCR(lch)); | 1029 | if (cpu_is_omap34xx() && (l & OMAP_DMA_CCR_SEL_SRC_DST_SYNC)) { |
1030 | int i = 0; | ||
1031 | u32 sys_cf; | ||
1032 | |||
1033 | /* Configure No-Standby */ | ||
1034 | l = dma_read(OCP_SYSCONFIG); | ||
1035 | sys_cf = l; | ||
1036 | l &= ~DMA_SYSCONFIG_MIDLEMODE_MASK; | ||
1037 | l |= DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_NO_IDLE); | ||
1038 | dma_write(l , OCP_SYSCONFIG); | ||
1039 | |||
1040 | l = dma_read(CCR(lch)); | ||
1041 | l &= ~OMAP_DMA_CCR_EN; | ||
1042 | dma_write(l, CCR(lch)); | ||
1043 | |||
1044 | /* Wait for sDMA FIFO drain */ | ||
1045 | l = dma_read(CCR(lch)); | ||
1046 | while (i < 100 && (l & (OMAP_DMA_CCR_RD_ACTIVE | | ||
1047 | OMAP_DMA_CCR_WR_ACTIVE))) { | ||
1048 | udelay(5); | ||
1049 | i++; | ||
1050 | l = dma_read(CCR(lch)); | ||
1051 | } | ||
1052 | if (i >= 100) | ||
1053 | printk(KERN_ERR "DMA drain did not complete on " | ||
1054 | "lch %d\n", lch); | ||
1055 | /* Restore OCP_SYSCONFIG */ | ||
1056 | dma_write(sys_cf, OCP_SYSCONFIG); | ||
1057 | } else { | ||
1058 | l &= ~OMAP_DMA_CCR_EN; | ||
1059 | dma_write(l, CCR(lch)); | ||
1060 | } | ||
1023 | 1061 | ||
1024 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { | 1062 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { |
1025 | int next_lch, cur_lch = lch; | 1063 | int next_lch, cur_lch = lch; |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 44bafdab2dce..1d706cf63ca0 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -581,7 +581,7 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) | |||
581 | * When the functional clock disappears, too quick writes seem | 581 | * When the functional clock disappears, too quick writes seem |
582 | * to cause an abort. XXX Is this still necessary? | 582 | * to cause an abort. XXX Is this still necessary? |
583 | */ | 583 | */ |
584 | __delay(150000); | 584 | __delay(300000); |
585 | 585 | ||
586 | return ret; | 586 | return ret; |
587 | } | 587 | } |
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index 71934817e172..bb78c1532fae 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/plat-omap/fb.c | |||
@@ -36,6 +36,8 @@ | |||
36 | #include <plat/board.h> | 36 | #include <plat/board.h> |
37 | #include <plat/sram.h> | 37 | #include <plat/sram.h> |
38 | 38 | ||
39 | #include "fb.h" | ||
40 | |||
39 | #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) | 41 | #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) |
40 | 42 | ||
41 | static struct omapfb_platform_data omapfb_config; | 43 | static struct omapfb_platform_data omapfb_config; |
diff --git a/arch/arm/plat-omap/fb.h b/arch/arm/plat-omap/fb.h new file mode 100644 index 000000000000..d765d0bd8520 --- /dev/null +++ b/arch/arm/plat-omap/fb.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef __PLAT_OMAP_FB_H__ | ||
2 | #define __PLAT_OMAP_FB_H__ | ||
3 | |||
4 | extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart, | ||
5 | unsigned long sram_vstart, | ||
6 | unsigned long sram_size, | ||
7 | unsigned long pstart_avail, | ||
8 | unsigned long size_avail); | ||
9 | |||
10 | #endif /* __PLAT_OMAP_FB_H__ */ | ||
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 7951eefe1a0e..c05c653d1674 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -2084,9 +2084,10 @@ void omap2_gpio_prepare_for_idle(int power_state) | |||
2084 | 2084 | ||
2085 | for (i = min; i < gpio_bank_count; i++) { | 2085 | for (i = min; i < gpio_bank_count; i++) { |
2086 | struct gpio_bank *bank = &gpio_bank[i]; | 2086 | struct gpio_bank *bank = &gpio_bank[i]; |
2087 | u32 l1, l2; | 2087 | u32 l1 = 0, l2 = 0; |
2088 | int j; | ||
2088 | 2089 | ||
2089 | if (bank->dbck_enable_mask) | 2090 | for (j = 0; j < hweight_long(bank->dbck_enable_mask); j++) |
2090 | clk_disable(bank->dbck); | 2091 | clk_disable(bank->dbck); |
2091 | 2092 | ||
2092 | if (power_state > PWRDM_POWER_OFF) | 2093 | if (power_state > PWRDM_POWER_OFF) |
@@ -2151,9 +2152,10 @@ void omap2_gpio_resume_after_idle(void) | |||
2151 | min = 1; | 2152 | min = 1; |
2152 | for (i = min; i < gpio_bank_count; i++) { | 2153 | for (i = min; i < gpio_bank_count; i++) { |
2153 | struct gpio_bank *bank = &gpio_bank[i]; | 2154 | struct gpio_bank *bank = &gpio_bank[i]; |
2154 | u32 l, gen, gen0, gen1; | 2155 | u32 l = 0, gen, gen0, gen1; |
2156 | int j; | ||
2155 | 2157 | ||
2156 | if (bank->dbck_enable_mask) | 2158 | for (j = 0; j < hweight_long(bank->dbck_enable_mask); j++) |
2157 | clk_enable(bank->dbck); | 2159 | clk_enable(bank->dbck); |
2158 | 2160 | ||
2159 | if (!workaround_enabled) | 2161 | if (!workaround_enabled) |
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h index 9776b41ad76f..a9d69a09920d 100644 --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h | |||
@@ -47,6 +47,7 @@ struct omap_globals { | |||
47 | unsigned long sdrc; /* SDRAM Controller */ | 47 | unsigned long sdrc; /* SDRAM Controller */ |
48 | unsigned long sms; /* SDRAM Memory Scheduler */ | 48 | unsigned long sms; /* SDRAM Memory Scheduler */ |
49 | unsigned long ctrl; /* System Control Module */ | 49 | unsigned long ctrl; /* System Control Module */ |
50 | unsigned long ctrl_pad; /* PAD Control Module */ | ||
50 | unsigned long prm; /* Power and Reset Management */ | 51 | unsigned long prm; /* Power and Reset Management */ |
51 | unsigned long cm; /* Clock Management */ | 52 | unsigned long cm; /* Clock Management */ |
52 | unsigned long cm2; | 53 | unsigned long cm2; |
@@ -66,7 +67,6 @@ void omap2_set_globals_tap(struct omap_globals *); | |||
66 | void omap2_set_globals_sdrc(struct omap_globals *); | 67 | void omap2_set_globals_sdrc(struct omap_globals *); |
67 | void omap2_set_globals_control(struct omap_globals *); | 68 | void omap2_set_globals_control(struct omap_globals *); |
68 | void omap2_set_globals_prcm(struct omap_globals *); | 69 | void omap2_set_globals_prcm(struct omap_globals *); |
69 | void omap2_set_globals_uart(struct omap_globals *); | ||
70 | 70 | ||
71 | void omap3_map_io(void); | 71 | void omap3_map_io(void); |
72 | 72 | ||
@@ -91,7 +91,8 @@ void omap3_map_io(void); | |||
91 | }) | 91 | }) |
92 | 92 | ||
93 | extern struct device *omap2_get_mpuss_device(void); | 93 | extern struct device *omap2_get_mpuss_device(void); |
94 | extern struct device *omap2_get_dsp_device(void); | 94 | extern struct device *omap2_get_iva_device(void); |
95 | extern struct device *omap2_get_l3_device(void); | 95 | extern struct device *omap2_get_l3_device(void); |
96 | extern struct device *omap4_get_dsp_device(void); | ||
96 | 97 | ||
97 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ | 98 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ |
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 2e2ae530fced..3fd8b4055727 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -68,10 +68,9 @@ unsigned int omap_rev(void); | |||
68 | #define OMAP_REVBITS_00 0x00 | 68 | #define OMAP_REVBITS_00 0x00 |
69 | #define OMAP_REVBITS_01 0x01 | 69 | #define OMAP_REVBITS_01 0x01 |
70 | #define OMAP_REVBITS_02 0x02 | 70 | #define OMAP_REVBITS_02 0x02 |
71 | #define OMAP_REVBITS_10 0x10 | 71 | #define OMAP_REVBITS_03 0x03 |
72 | #define OMAP_REVBITS_20 0x20 | 72 | #define OMAP_REVBITS_04 0x04 |
73 | #define OMAP_REVBITS_30 0x30 | 73 | #define OMAP_REVBITS_05 0x05 |
74 | #define OMAP_REVBITS_40 0x40 | ||
75 | 74 | ||
76 | /* | 75 | /* |
77 | * Get the CPU revision for OMAP devices | 76 | * Get the CPU revision for OMAP devices |
@@ -363,23 +362,24 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
363 | 362 | ||
364 | /* Various silicon revisions for omap2 */ | 363 | /* Various silicon revisions for omap2 */ |
365 | #define OMAP242X_CLASS 0x24200024 | 364 | #define OMAP242X_CLASS 0x24200024 |
366 | #define OMAP2420_REV_ES1_0 0x24200024 | 365 | #define OMAP2420_REV_ES1_0 OMAP242X_CLASS |
367 | #define OMAP2420_REV_ES2_0 0x24201024 | 366 | #define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (OMAP_REVBITS_01 << 8)) |
368 | 367 | ||
369 | #define OMAP243X_CLASS 0x24300024 | 368 | #define OMAP243X_CLASS 0x24300024 |
370 | #define OMAP2430_REV_ES1_0 0x24300024 | 369 | #define OMAP2430_REV_ES1_0 OMAP243X_CLASS |
371 | 370 | ||
372 | #define OMAP343X_CLASS 0x34300034 | 371 | #define OMAP343X_CLASS 0x34300034 |
373 | #define OMAP3430_REV_ES1_0 0x34300034 | 372 | #define OMAP3430_REV_ES1_0 OMAP343X_CLASS |
374 | #define OMAP3430_REV_ES2_0 0x34301034 | 373 | #define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (OMAP_REVBITS_01 << 8)) |
375 | #define OMAP3430_REV_ES2_1 0x34302034 | 374 | #define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (OMAP_REVBITS_02 << 8)) |
376 | #define OMAP3430_REV_ES3_0 0x34303034 | 375 | #define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (OMAP_REVBITS_03 << 8)) |
377 | #define OMAP3430_REV_ES3_1 0x34304034 | 376 | #define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (OMAP_REVBITS_04 << 8)) |
378 | #define OMAP3430_REV_ES3_1_2 0x34305034 | 377 | #define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (OMAP_REVBITS_05 << 8)) |
379 | 378 | ||
380 | #define OMAP3630_REV_ES1_0 0x36300034 | 379 | #define OMAP363X_CLASS 0x36300034 |
381 | #define OMAP3630_REV_ES1_1 0x36300134 | 380 | #define OMAP3630_REV_ES1_0 OMAP363X_CLASS |
382 | #define OMAP3630_REV_ES1_2 0x36300234 | 381 | #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (OMAP_REVBITS_01 << 8)) |
382 | #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (OMAP_REVBITS_02 << 8)) | ||
383 | 383 | ||
384 | #define OMAP35XX_CLASS 0x35000034 | 384 | #define OMAP35XX_CLASS 0x35000034 |
385 | #define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) | 385 | #define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) |
@@ -390,7 +390,8 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
390 | #define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) | 390 | #define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) |
391 | 391 | ||
392 | #define OMAP443X_CLASS 0x44300044 | 392 | #define OMAP443X_CLASS 0x44300044 |
393 | #define OMAP4430_REV_ES1_0 0x44300044 | 393 | #define OMAP4430_REV_ES1_0 OMAP443X_CLASS |
394 | #define OMAP4430_REV_ES2_0 0x44301044 | ||
394 | 395 | ||
395 | /* | 396 | /* |
396 | * omap_chip bits | 397 | * omap_chip bits |
@@ -417,10 +418,12 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
417 | #define CHIP_IS_OMAP4430ES1 (1 << 8) | 418 | #define CHIP_IS_OMAP4430ES1 (1 << 8) |
418 | #define CHIP_IS_OMAP3630ES1_1 (1 << 9) | 419 | #define CHIP_IS_OMAP3630ES1_1 (1 << 9) |
419 | #define CHIP_IS_OMAP3630ES1_2 (1 << 10) | 420 | #define CHIP_IS_OMAP3630ES1_2 (1 << 10) |
421 | #define CHIP_IS_OMAP4430ES2 (1 << 11) | ||
420 | 422 | ||
421 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) | 423 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) |
422 | 424 | ||
423 | #define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1) | 425 | #define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1 | \ |
426 | CHIP_IS_OMAP4430ES2) | ||
424 | 427 | ||
425 | /* | 428 | /* |
426 | * "GE" here represents "greater than or equal to" in terms of ES | 429 | * "GE" here represents "greater than or equal to" in terms of ES |
diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h index af3a03941add..0cce4ca83aa0 100644 --- a/arch/arm/plat-omap/include/plat/dma.h +++ b/arch/arm/plat-omap/include/plat/dma.h | |||
@@ -319,6 +319,8 @@ | |||
319 | #define OMAP34XX_DMA_USIM_TX 79 /* S_DMA_78 */ | 319 | #define OMAP34XX_DMA_USIM_TX 79 /* S_DMA_78 */ |
320 | #define OMAP34XX_DMA_USIM_RX 80 /* S_DMA_79 */ | 320 | #define OMAP34XX_DMA_USIM_RX 80 /* S_DMA_79 */ |
321 | 321 | ||
322 | #define OMAP36XX_DMA_UART4_TX 81 /* S_DMA_80 */ | ||
323 | #define OMAP36XX_DMA_UART4_RX 82 /* S_DMA_81 */ | ||
322 | /*----------------------------------------------------------------------------*/ | 324 | /*----------------------------------------------------------------------------*/ |
323 | 325 | ||
324 | #define OMAP1_DMA_TOUT_IRQ (1 << 0) | 326 | #define OMAP1_DMA_TOUT_IRQ (1 << 0) |
@@ -335,6 +337,10 @@ | |||
335 | #define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11) | 337 | #define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11) |
336 | 338 | ||
337 | #define OMAP_DMA_CCR_EN (1 << 7) | 339 | #define OMAP_DMA_CCR_EN (1 << 7) |
340 | #define OMAP_DMA_CCR_RD_ACTIVE (1 << 9) | ||
341 | #define OMAP_DMA_CCR_WR_ACTIVE (1 << 10) | ||
342 | #define OMAP_DMA_CCR_SEL_SRC_DST_SYNC (1 << 24) | ||
343 | #define OMAP_DMA_CCR_BUFFERING_DISABLE (1 << 25) | ||
338 | 344 | ||
339 | #define OMAP_DMA_DATA_TYPE_S8 0x00 | 345 | #define OMAP_DMA_DATA_TYPE_S8 0x00 |
340 | #define OMAP_DMA_DATA_TYPE_S16 0x01 | 346 | #define OMAP_DMA_DATA_TYPE_S16 0x01 |
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index 20f1054c0a80..dfa3aff9761b 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
@@ -45,6 +45,8 @@ | |||
45 | #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 | 45 | #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 |
46 | 46 | ||
47 | struct omap_dm_timer; | 47 | struct omap_dm_timer; |
48 | extern struct omap_dm_timer *gptimer_wakeup; | ||
49 | extern struct sys_timer omap_timer; | ||
48 | struct clk; | 50 | struct clk; |
49 | 51 | ||
50 | int omap_dm_timer_init(void); | 52 | int omap_dm_timer_init(void); |
diff --git a/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h b/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h new file mode 100644 index 000000000000..872de0bf1e6b --- /dev/null +++ b/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-omap/include/plat/gpmc-smsc911x.h | ||
3 | * | ||
4 | * Copyright (C) 2009 Li-Pro.Net | ||
5 | * Stephan Linz <linz@li-pro.net> | ||
6 | * | ||
7 | * Modified from arch/arm/plat-omap/include/plat/gpmc-smc91x.h | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_OMAP_GPMC_SMSC911X_H__ | ||
15 | |||
16 | struct omap_smsc911x_platform_data { | ||
17 | int cs; | ||
18 | int gpio_irq; | ||
19 | int gpio_reset; | ||
20 | u32 flags; | ||
21 | }; | ||
22 | |||
23 | #if defined(CONFIG_SMSC911X) || \ | ||
24 | defined(CONFIG_SMSC911X_MODULE) | ||
25 | |||
26 | extern void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d); | ||
27 | |||
28 | #else | ||
29 | |||
30 | static inline void gpmc_smsc911x_init(struct omap_smsc911x_platform_data *d) | ||
31 | { | ||
32 | } | ||
33 | |||
34 | #endif | ||
35 | #endif | ||
diff --git a/arch/arm/plat-omap/include/plat/i2c.h b/arch/arm/plat-omap/include/plat/i2c.h index 87f6bf2ea4fa..36a0befd6168 100644 --- a/arch/arm/plat-omap/include/plat/i2c.h +++ b/arch/arm/plat-omap/include/plat/i2c.h | |||
@@ -18,6 +18,8 @@ | |||
18 | * 02110-1301 USA | 18 | * 02110-1301 USA |
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | #ifndef __ASM__ARCH_OMAP_I2C_H | ||
22 | #define __ASM__ARCH_OMAP_I2C_H | ||
21 | 23 | ||
22 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
23 | 25 | ||
@@ -36,3 +38,5 @@ static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, | |||
36 | 38 | ||
37 | void __init omap1_i2c_mux_pins(int bus_id); | 39 | void __init omap1_i2c_mux_pins(int bus_id); |
38 | void __init omap2_i2c_mux_pins(int bus_id); | 40 | void __init omap2_i2c_mux_pins(int bus_id); |
41 | |||
42 | #endif /* __ASM__ARCH_OMAP_I2C_H */ | ||
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index c01d9f08a198..65e20a686713 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h | |||
@@ -345,6 +345,8 @@ | |||
345 | #define INT_34XX_MMC3_IRQ 94 | 345 | #define INT_34XX_MMC3_IRQ 94 |
346 | #define INT_34XX_GPT12_IRQ 95 | 346 | #define INT_34XX_GPT12_IRQ 95 |
347 | 347 | ||
348 | #define INT_36XX_UART4_IRQ 80 | ||
349 | |||
348 | #define INT_35XX_HECC0_IRQ 24 | 350 | #define INT_35XX_HECC0_IRQ 24 |
349 | #define INT_35XX_HECC1_IRQ 28 | 351 | #define INT_35XX_HECC1_IRQ 28 |
350 | #define INT_35XX_EMAC_C0_RXTHRESH_IRQ 67 | 352 | #define INT_35XX_EMAC_C0_RXTHRESH_IRQ 67 |
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index 5b20103e68eb..b87d83ccd545 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h | |||
@@ -319,6 +319,18 @@ static struct platform_device omap_mcbsp##port_nr = { \ | |||
319 | #define RFSREN 0x0002 | 319 | #define RFSREN 0x0002 |
320 | #define RSYNCERREN 0x0001 | 320 | #define RSYNCERREN 0x0001 |
321 | 321 | ||
322 | /* CLKR signal muxing options */ | ||
323 | #define CLKR_SRC_CLKR 0 | ||
324 | #define CLKR_SRC_CLKX 1 | ||
325 | |||
326 | /* FSR signal muxing options */ | ||
327 | #define FSR_SRC_FSR 0 | ||
328 | #define FSR_SRC_FSX 1 | ||
329 | |||
330 | /* McBSP functional clock sources */ | ||
331 | #define MCBSP_CLKS_PRCM_SRC 0 | ||
332 | #define MCBSP_CLKS_PAD_SRC 1 | ||
333 | |||
322 | /* we don't do multichannel for now */ | 334 | /* we don't do multichannel for now */ |
323 | struct omap_mcbsp_reg_cfg { | 335 | struct omap_mcbsp_reg_cfg { |
324 | u16 spcr2; | 336 | u16 spcr2; |
@@ -405,6 +417,7 @@ struct omap_mcbsp_spi_cfg { | |||
405 | struct omap_mcbsp_ops { | 417 | struct omap_mcbsp_ops { |
406 | void (*request)(unsigned int); | 418 | void (*request)(unsigned int); |
407 | void (*free)(unsigned int); | 419 | void (*free)(unsigned int); |
420 | int (*set_clks_src)(u8, u8); | ||
408 | }; | 421 | }; |
409 | 422 | ||
410 | struct omap_mcbsp_platform_data { | 423 | struct omap_mcbsp_platform_data { |
@@ -471,6 +484,9 @@ struct omap_mcbsp { | |||
471 | extern struct omap_mcbsp **mcbsp_ptr; | 484 | extern struct omap_mcbsp **mcbsp_ptr; |
472 | extern int omap_mcbsp_count, omap_mcbsp_cache_size; | 485 | extern int omap_mcbsp_count, omap_mcbsp_cache_size; |
473 | 486 | ||
487 | #define omap_mcbsp_check_valid_id(id) (id < omap_mcbsp_count) | ||
488 | #define id_to_mcbsp_ptr(id) mcbsp_ptr[id]; | ||
489 | |||
474 | int omap_mcbsp_init(void); | 490 | int omap_mcbsp_init(void); |
475 | void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config, | 491 | void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config, |
476 | int size); | 492 | int size); |
@@ -509,6 +525,8 @@ int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word); | |||
509 | int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word); | 525 | int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word); |
510 | 526 | ||
511 | 527 | ||
528 | /* McBSP functional clock source changing function */ | ||
529 | extern int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id); | ||
512 | /* SPI specific API */ | 530 | /* SPI specific API */ |
513 | void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg); | 531 | void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg); |
514 | 532 | ||
@@ -517,6 +535,10 @@ int omap_mcbsp_pollread(unsigned int id, u16 * buf); | |||
517 | int omap_mcbsp_pollwrite(unsigned int id, u16 buf); | 535 | int omap_mcbsp_pollwrite(unsigned int id, u16 buf); |
518 | int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type); | 536 | int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type); |
519 | 537 | ||
538 | /* McBSP signal muxing API */ | ||
539 | void omap2_mcbsp1_mux_clkr_src(u8 mux); | ||
540 | void omap2_mcbsp1_mux_fsr_src(u8 mux); | ||
541 | |||
520 | #ifdef CONFIG_ARCH_OMAP3 | 542 | #ifdef CONFIG_ARCH_OMAP3 |
521 | /* Sidetone specific API */ | 543 | /* Sidetone specific API */ |
522 | int omap_st_set_chgain(unsigned int id, int channel, s16 chgain); | 544 | int omap_st_set_chgain(unsigned int id, int channel, s16 chgain); |
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index 9b89ec601ee2..f57f36abb07e 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h | |||
@@ -71,12 +71,17 @@ struct omap_mmc_platform_data { | |||
71 | 71 | ||
72 | u64 dma_mask; | 72 | u64 dma_mask; |
73 | 73 | ||
74 | /* Register offset deviation */ | ||
75 | u16 reg_offset; | ||
76 | |||
74 | struct omap_mmc_slot_data { | 77 | struct omap_mmc_slot_data { |
75 | 78 | ||
76 | /* 4 wire signaling is optional, and is used for SD/SDIO/HSMMC; | 79 | /* |
77 | * 8 wire signaling is also optional, and is used with HSMMC | 80 | * 4/8 wires and any additional host capabilities |
81 | * need to OR'd all capabilities (ref. linux/mmc/host.h) | ||
78 | */ | 82 | */ |
79 | u8 wires; | 83 | u8 wires; /* Used for the MMC driver on omap1 and 2420 */ |
84 | u32 caps; /* Used for the MMC driver on 2430 and later */ | ||
80 | 85 | ||
81 | /* | 86 | /* |
82 | * nomux means "standard" muxing is wrong on this board, and | 87 | * nomux means "standard" muxing is wrong on this board, and |
@@ -104,6 +109,7 @@ struct omap_mmc_platform_data { | |||
104 | 109 | ||
105 | /* we can put the features above into this variable */ | 110 | /* we can put the features above into this variable */ |
106 | #define HSMMC_HAS_PBIAS (1 << 0) | 111 | #define HSMMC_HAS_PBIAS (1 << 0) |
112 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) | ||
107 | unsigned features; | 113 | unsigned features; |
108 | 114 | ||
109 | int switch_pin; /* gpio (card detect) */ | 115 | int switch_pin; /* gpio (card detect) */ |
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h new file mode 100644 index 000000000000..c8dae02f0704 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/omap-serial.h | |||
@@ -0,0 +1,128 @@ | |||
1 | /* | ||
2 | * Driver for OMAP-UART controller. | ||
3 | * Based on drivers/serial/8250.c | ||
4 | * | ||
5 | * Copyright (C) 2010 Texas Instruments. | ||
6 | * | ||
7 | * Authors: | ||
8 | * Govindraj R <govindraj.raja@ti.com> | ||
9 | * Thara Gopinath <thara@ti.com> | ||
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 as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #ifndef __OMAP_SERIAL_H__ | ||
18 | #define __OMAP_SERIAL_H__ | ||
19 | |||
20 | #include <linux/serial_core.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | |||
23 | #include <plat/mux.h> | ||
24 | |||
25 | #define DRIVER_NAME "omap-hsuart" | ||
26 | |||
27 | /* | ||
28 | * Use tty device name as ttyO, [O -> OMAP] | ||
29 | * in bootargs we specify as console=ttyO0 if uart1 | ||
30 | * is used as console uart. | ||
31 | */ | ||
32 | #define OMAP_SERIAL_NAME "ttyO" | ||
33 | |||
34 | #define OMAP_MDR1_DISABLE 0x07 | ||
35 | #define OMAP_MDR1_MODE13X 0x03 | ||
36 | #define OMAP_MDR1_MODE16X 0x00 | ||
37 | #define OMAP_MODE13X_SPEED 230400 | ||
38 | |||
39 | /* | ||
40 | * LCR = 0XBF: Switch to Configuration Mode B. | ||
41 | * In configuration mode b allow access | ||
42 | * to EFR,DLL,DLH. | ||
43 | * Reference OMAP TRM Chapter 17 | ||
44 | * Section: 1.4.3 Mode Selection | ||
45 | */ | ||
46 | #define OMAP_UART_LCR_CONF_MDB 0XBF | ||
47 | |||
48 | /* WER = 0x7F | ||
49 | * Enable module level wakeup in WER reg | ||
50 | */ | ||
51 | #define OMAP_UART_WER_MOD_WKUP 0X7F | ||
52 | |||
53 | /* Enable XON/XOFF flow control on output */ | ||
54 | #define OMAP_UART_SW_TX 0x04 | ||
55 | |||
56 | /* Enable XON/XOFF flow control on input */ | ||
57 | #define OMAP_UART_SW_RX 0x04 | ||
58 | |||
59 | #define OMAP_UART_SYSC_RESET 0X07 | ||
60 | #define OMAP_UART_TCR_TRIG 0X0F | ||
61 | #define OMAP_UART_SW_CLR 0XF0 | ||
62 | #define OMAP_UART_FIFO_CLR 0X06 | ||
63 | |||
64 | #define OMAP_UART_DMA_CH_FREE -1 | ||
65 | |||
66 | #define RX_TIMEOUT (3 * HZ) | ||
67 | #define OMAP_MAX_HSUART_PORTS 4 | ||
68 | |||
69 | #define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA | ||
70 | |||
71 | struct omap_uart_port_info { | ||
72 | bool dma_enabled; /* To specify DMA Mode */ | ||
73 | unsigned int uartclk; /* UART clock rate */ | ||
74 | void __iomem *membase; /* ioremap cookie or NULL */ | ||
75 | resource_size_t mapbase; /* resource base */ | ||
76 | unsigned long irqflags; /* request_irq flags */ | ||
77 | upf_t flags; /* UPF_* flags */ | ||
78 | }; | ||
79 | |||
80 | struct uart_omap_dma { | ||
81 | u8 uart_dma_tx; | ||
82 | u8 uart_dma_rx; | ||
83 | int rx_dma_channel; | ||
84 | int tx_dma_channel; | ||
85 | dma_addr_t rx_buf_dma_phys; | ||
86 | dma_addr_t tx_buf_dma_phys; | ||
87 | unsigned int uart_base; | ||
88 | /* | ||
89 | * Buffer for rx dma.It is not required for tx because the buffer | ||
90 | * comes from port structure. | ||
91 | */ | ||
92 | unsigned char *rx_buf; | ||
93 | unsigned int prev_rx_dma_pos; | ||
94 | int tx_buf_size; | ||
95 | int tx_dma_used; | ||
96 | int rx_dma_used; | ||
97 | spinlock_t tx_lock; | ||
98 | spinlock_t rx_lock; | ||
99 | /* timer to poll activity on rx dma */ | ||
100 | struct timer_list rx_timer; | ||
101 | int rx_buf_size; | ||
102 | int rx_timeout; | ||
103 | }; | ||
104 | |||
105 | struct uart_omap_port { | ||
106 | struct uart_port port; | ||
107 | struct uart_omap_dma uart_dma; | ||
108 | struct platform_device *pdev; | ||
109 | |||
110 | unsigned char ier; | ||
111 | unsigned char lcr; | ||
112 | unsigned char mcr; | ||
113 | unsigned char fcr; | ||
114 | unsigned char efr; | ||
115 | |||
116 | int use_dma; | ||
117 | /* | ||
118 | * Some bits in registers are cleared on a read, so they must | ||
119 | * be saved whenever the register is read but the bits will not | ||
120 | * be immediately processed. | ||
121 | */ | ||
122 | unsigned int lsr_break_flag; | ||
123 | unsigned char msr_saved_flags; | ||
124 | char name[20]; | ||
125 | unsigned long port_activity; | ||
126 | }; | ||
127 | |||
128 | #endif /* __OMAP_SERIAL_H__ */ | ||
diff --git a/arch/arm/plat-omap/include/plat/omap24xx.h b/arch/arm/plat-omap/include/plat/omap24xx.h index 7055672a8c68..92df9e27cc5c 100644 --- a/arch/arm/plat-omap/include/plat/omap24xx.h +++ b/arch/arm/plat-omap/include/plat/omap24xx.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000) | 40 | #define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000) |
41 | #define OMAP24XX_IVA_INTC_BASE 0x40000000 | 41 | #define OMAP24XX_IVA_INTC_BASE 0x40000000 |
42 | 42 | ||
43 | #define OMAP2420_CTRL_BASE L4_24XX_BASE | 43 | #define OMAP242X_CTRL_BASE L4_24XX_BASE |
44 | #define OMAP2420_32KSYNCT_BASE (L4_24XX_BASE + 0x4000) | 44 | #define OMAP2420_32KSYNCT_BASE (L4_24XX_BASE + 0x4000) |
45 | #define OMAP2420_PRCM_BASE (L4_24XX_BASE + 0x8000) | 45 | #define OMAP2420_PRCM_BASE (L4_24XX_BASE + 0x8000) |
46 | #define OMAP2420_CM_BASE (L4_24XX_BASE + 0x8000) | 46 | #define OMAP2420_CM_BASE (L4_24XX_BASE + 0x8000) |
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h index 25cd9ac3b095..28e2d1a78433 100644 --- a/arch/arm/plat-omap/include/plat/omap_device.h +++ b/arch/arm/plat-omap/include/plat/omap_device.h | |||
@@ -36,6 +36,8 @@ | |||
36 | 36 | ||
37 | #include <plat/omap_hwmod.h> | 37 | #include <plat/omap_hwmod.h> |
38 | 38 | ||
39 | extern struct device omap_device_parent; | ||
40 | |||
39 | /* omap_device._state values */ | 41 | /* omap_device._state values */ |
40 | #define OMAP_DEVICE_STATE_UNKNOWN 0 | 42 | #define OMAP_DEVICE_STATE_UNKNOWN 0 |
41 | #define OMAP_DEVICE_STATE_ENABLED 1 | 43 | #define OMAP_DEVICE_STATE_ENABLED 1 |
@@ -62,7 +64,6 @@ | |||
62 | * | 64 | * |
63 | */ | 65 | */ |
64 | struct omap_device { | 66 | struct omap_device { |
65 | u32 magic; | ||
66 | struct platform_device pdev; | 67 | struct platform_device pdev; |
67 | struct omap_hwmod **hwmods; | 68 | struct omap_hwmod **hwmods; |
68 | struct omap_device_pm_latency *pm_lats; | 69 | struct omap_device_pm_latency *pm_lats; |
@@ -82,7 +83,6 @@ int omap_device_shutdown(struct platform_device *pdev); | |||
82 | 83 | ||
83 | /* Core code interface */ | 84 | /* Core code interface */ |
84 | 85 | ||
85 | bool omap_device_is_valid(struct omap_device *od); | ||
86 | int omap_device_count_resources(struct omap_device *od); | 86 | int omap_device_count_resources(struct omap_device *od); |
87 | int omap_device_fill_resources(struct omap_device *od, struct resource *res); | 87 | int omap_device_fill_resources(struct omap_device *od, struct resource *res); |
88 | 88 | ||
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index a4e508dfaba2..7eaa8edf3b14 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -14,19 +14,16 @@ | |||
14 | * | 14 | * |
15 | * These headers and macros are used to define OMAP on-chip module | 15 | * These headers and macros are used to define OMAP on-chip module |
16 | * data and their integration with other OMAP modules and Linux. | 16 | * data and their integration with other OMAP modules and Linux. |
17 | * | 17 | * Copious documentation and references can also be found in the |
18 | * References: | 18 | * omap_hwmod code, in arch/arm/mach-omap2/omap_hwmod.c (as of this |
19 | * - OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 (SWPU064) | 19 | * writing). |
20 | * - OMAP2430 Multimedia Device POP Silicon Revision 2.1 (SWPU090) | ||
21 | * - OMAP34xx Multimedia Device Silicon Revision 3.1 (SWPU108) | ||
22 | * - OMAP4430 Multimedia Device Silicon Revision 1.0 (SWPU140) | ||
23 | * - Open Core Protocol Specification 2.2 | ||
24 | * | 20 | * |
25 | * To do: | 21 | * To do: |
26 | * - add interconnect error log structures | 22 | * - add interconnect error log structures |
27 | * - add pinmuxing | 23 | * - add pinmuxing |
28 | * - init_conn_id_bit (CONNID_BIT_VECTOR) | 24 | * - init_conn_id_bit (CONNID_BIT_VECTOR) |
29 | * - implement default hwmod SMS/SDRC flags? | 25 | * - implement default hwmod SMS/SDRC flags? |
26 | * - remove unused fields | ||
30 | * | 27 | * |
31 | */ | 28 | */ |
32 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD_H | 29 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD_H |
@@ -35,6 +32,7 @@ | |||
35 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
36 | #include <linux/list.h> | 33 | #include <linux/list.h> |
37 | #include <linux/ioport.h> | 34 | #include <linux/ioport.h> |
35 | #include <linux/mutex.h> | ||
38 | #include <plat/cpu.h> | 36 | #include <plat/cpu.h> |
39 | 37 | ||
40 | struct omap_device; | 38 | struct omap_device; |
@@ -96,7 +94,7 @@ struct omap_hwmod_irq_info { | |||
96 | /** | 94 | /** |
97 | * struct omap_hwmod_dma_info - DMA channels used by the hwmod | 95 | * struct omap_hwmod_dma_info - DMA channels used by the hwmod |
98 | * @name: name of the DMA channel (module local name) | 96 | * @name: name of the DMA channel (module local name) |
99 | * @dma_ch: DMA channel ID | 97 | * @dma_req: DMA request ID |
100 | * | 98 | * |
101 | * @name should be something short, e.g., "tx" or "rx". It is for use | 99 | * @name should be something short, e.g., "tx" or "rx". It is for use |
102 | * by platform_get_resource_byname(). It is defined locally to the | 100 | * by platform_get_resource_byname(). It is defined locally to the |
@@ -104,7 +102,20 @@ struct omap_hwmod_irq_info { | |||
104 | */ | 102 | */ |
105 | struct omap_hwmod_dma_info { | 103 | struct omap_hwmod_dma_info { |
106 | const char *name; | 104 | const char *name; |
107 | u16 dma_ch; | 105 | u16 dma_req; |
106 | }; | ||
107 | |||
108 | /** | ||
109 | * struct omap_hwmod_rst_info - IPs reset lines use by hwmod | ||
110 | * @name: name of the reset line (module local name) | ||
111 | * @rst_shift: Offset of the reset bit | ||
112 | * | ||
113 | * @name should be something short, e.g., "cpu0" or "rst". It is defined | ||
114 | * locally to the hwmod. | ||
115 | */ | ||
116 | struct omap_hwmod_rst_info { | ||
117 | const char *name; | ||
118 | u8 rst_shift; | ||
108 | }; | 119 | }; |
109 | 120 | ||
110 | /** | 121 | /** |
@@ -237,8 +248,9 @@ struct omap_hwmod_ocp_if { | |||
237 | #define SYSC_HAS_CLOCKACTIVITY (1 << 4) | 248 | #define SYSC_HAS_CLOCKACTIVITY (1 << 4) |
238 | #define SYSC_HAS_SIDLEMODE (1 << 5) | 249 | #define SYSC_HAS_SIDLEMODE (1 << 5) |
239 | #define SYSC_HAS_MIDLEMODE (1 << 6) | 250 | #define SYSC_HAS_MIDLEMODE (1 << 6) |
240 | #define SYSS_MISSING (1 << 7) | 251 | #define SYSS_HAS_RESET_STATUS (1 << 7) |
241 | #define SYSC_NO_CACHE (1 << 8) /* XXX SW flag, belongs elsewhere */ | 252 | #define SYSC_NO_CACHE (1 << 8) /* XXX SW flag, belongs elsewhere */ |
253 | #define SYSC_HAS_RESET_STATUS (1 << 9) | ||
242 | 254 | ||
243 | /* omap_hwmod_sysconfig.clockact flags */ | 255 | /* omap_hwmod_sysconfig.clockact flags */ |
244 | #define CLOCKACT_TEST_BOTH 0x0 | 256 | #define CLOCKACT_TEST_BOTH 0x0 |
@@ -327,10 +339,12 @@ struct omap_hwmod_omap2_prcm { | |||
327 | /** | 339 | /** |
328 | * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data | 340 | * struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data |
329 | * @clkctrl_reg: PRCM address of the clock control register | 341 | * @clkctrl_reg: PRCM address of the clock control register |
342 | * @rstctrl_reg: adress of the XXX_RSTCTRL register located in the PRM | ||
330 | * @submodule_wkdep_bit: bit shift of the WKDEP range | 343 | * @submodule_wkdep_bit: bit shift of the WKDEP range |
331 | */ | 344 | */ |
332 | struct omap_hwmod_omap4_prcm { | 345 | struct omap_hwmod_omap4_prcm { |
333 | void __iomem *clkctrl_reg; | 346 | void __iomem *clkctrl_reg; |
347 | void __iomem *rstctrl_reg; | ||
334 | u8 submodule_wkdep_bit; | 348 | u8 submodule_wkdep_bit; |
335 | }; | 349 | }; |
336 | 350 | ||
@@ -352,6 +366,11 @@ struct omap_hwmod_omap4_prcm { | |||
352 | * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup | 366 | * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup |
353 | * HWMOD_NO_IDLEST : this module does not have idle status - this is the case | 367 | * HWMOD_NO_IDLEST : this module does not have idle status - this is the case |
354 | * only for few initiator modules on OMAP2 & 3. | 368 | * only for few initiator modules on OMAP2 & 3. |
369 | * HWMOD_CONTROL_OPT_CLKS_IN_RESET: Enable all optional clocks during reset. | ||
370 | * This is needed for devices like DSS that require optional clocks enabled | ||
371 | * in order to complete the reset. Optional clocks will be disabled | ||
372 | * again after the reset. | ||
373 | * HWMOD_16BIT_REG: Module has 16bit registers | ||
355 | */ | 374 | */ |
356 | #define HWMOD_SWSUP_SIDLE (1 << 0) | 375 | #define HWMOD_SWSUP_SIDLE (1 << 0) |
357 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) | 376 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) |
@@ -360,6 +379,8 @@ struct omap_hwmod_omap4_prcm { | |||
360 | #define HWMOD_NO_OCP_AUTOIDLE (1 << 4) | 379 | #define HWMOD_NO_OCP_AUTOIDLE (1 << 4) |
361 | #define HWMOD_SET_DEFAULT_CLOCKACT (1 << 5) | 380 | #define HWMOD_SET_DEFAULT_CLOCKACT (1 << 5) |
362 | #define HWMOD_NO_IDLEST (1 << 6) | 381 | #define HWMOD_NO_IDLEST (1 << 6) |
382 | #define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7) | ||
383 | #define HWMOD_16BIT_REG (1 << 8) | ||
363 | 384 | ||
364 | /* | 385 | /* |
365 | * omap_hwmod._int_flags definitions | 386 | * omap_hwmod._int_flags definitions |
@@ -410,7 +431,7 @@ struct omap_hwmod_class { | |||
410 | * @class: struct omap_hwmod_class * to the class of this hwmod | 431 | * @class: struct omap_hwmod_class * to the class of this hwmod |
411 | * @od: struct omap_device currently associated with this hwmod (internal use) | 432 | * @od: struct omap_device currently associated with this hwmod (internal use) |
412 | * @mpu_irqs: ptr to an array of MPU IRQs (see also mpu_irqs_cnt) | 433 | * @mpu_irqs: ptr to an array of MPU IRQs (see also mpu_irqs_cnt) |
413 | * @sdma_chs: ptr to an array of SDMA channel IDs (see also sdma_chs_cnt) | 434 | * @sdma_reqs: ptr to an array of System DMA request IDs (see sdma_reqs_cnt) |
414 | * @prcm: PRCM data pertaining to this hwmod | 435 | * @prcm: PRCM data pertaining to this hwmod |
415 | * @main_clk: main clock: OMAP clock name | 436 | * @main_clk: main clock: OMAP clock name |
416 | * @_clk: pointer to the main struct clk (filled in at runtime) | 437 | * @_clk: pointer to the main struct clk (filled in at runtime) |
@@ -424,7 +445,7 @@ struct omap_hwmod_class { | |||
424 | * @msuspendmux_reg_id: CONTROL_MSUSPENDMUX register ID (1-6) | 445 | * @msuspendmux_reg_id: CONTROL_MSUSPENDMUX register ID (1-6) |
425 | * @msuspendmux_shift: CONTROL_MSUSPENDMUX register bit shift | 446 | * @msuspendmux_shift: CONTROL_MSUSPENDMUX register bit shift |
426 | * @mpu_irqs_cnt: number of @mpu_irqs | 447 | * @mpu_irqs_cnt: number of @mpu_irqs |
427 | * @sdma_chs_cnt: number of @sdma_chs | 448 | * @sdma_reqs_cnt: number of @sdma_reqs |
428 | * @opt_clks_cnt: number of @opt_clks | 449 | * @opt_clks_cnt: number of @opt_clks |
429 | * @master_cnt: number of @master entries | 450 | * @master_cnt: number of @master entries |
430 | * @slaves_cnt: number of @slave entries | 451 | * @slaves_cnt: number of @slave entries |
@@ -433,6 +454,7 @@ struct omap_hwmod_class { | |||
433 | * @_state: internal-use hwmod state | 454 | * @_state: internal-use hwmod state |
434 | * @flags: hwmod flags (documented below) | 455 | * @flags: hwmod flags (documented below) |
435 | * @omap_chip: OMAP chips this hwmod is present on | 456 | * @omap_chip: OMAP chips this hwmod is present on |
457 | * @_mutex: mutex serializing operations on this hwmod | ||
436 | * @node: list node for hwmod list (internal use) | 458 | * @node: list node for hwmod list (internal use) |
437 | * | 459 | * |
438 | * @main_clk refers to this module's "main clock," which for our | 460 | * @main_clk refers to this module's "main clock," which for our |
@@ -448,7 +470,8 @@ struct omap_hwmod { | |||
448 | struct omap_hwmod_class *class; | 470 | struct omap_hwmod_class *class; |
449 | struct omap_device *od; | 471 | struct omap_device *od; |
450 | struct omap_hwmod_irq_info *mpu_irqs; | 472 | struct omap_hwmod_irq_info *mpu_irqs; |
451 | struct omap_hwmod_dma_info *sdma_chs; | 473 | struct omap_hwmod_dma_info *sdma_reqs; |
474 | struct omap_hwmod_rst_info *rst_lines; | ||
452 | union { | 475 | union { |
453 | struct omap_hwmod_omap2_prcm omap2; | 476 | struct omap_hwmod_omap2_prcm omap2; |
454 | struct omap_hwmod_omap4_prcm omap4; | 477 | struct omap_hwmod_omap4_prcm omap4; |
@@ -461,6 +484,7 @@ struct omap_hwmod { | |||
461 | void *dev_attr; | 484 | void *dev_attr; |
462 | u32 _sysc_cache; | 485 | u32 _sysc_cache; |
463 | void __iomem *_mpu_rt_va; | 486 | void __iomem *_mpu_rt_va; |
487 | struct mutex _mutex; | ||
464 | struct list_head node; | 488 | struct list_head node; |
465 | u16 flags; | 489 | u16 flags; |
466 | u8 _mpu_port_index; | 490 | u8 _mpu_port_index; |
@@ -468,7 +492,8 @@ struct omap_hwmod { | |||
468 | u8 msuspendmux_shift; | 492 | u8 msuspendmux_shift; |
469 | u8 response_lat; | 493 | u8 response_lat; |
470 | u8 mpu_irqs_cnt; | 494 | u8 mpu_irqs_cnt; |
471 | u8 sdma_chs_cnt; | 495 | u8 sdma_reqs_cnt; |
496 | u8 rst_lines_cnt; | ||
472 | u8 opt_clks_cnt; | 497 | u8 opt_clks_cnt; |
473 | u8 masters_cnt; | 498 | u8 masters_cnt; |
474 | u8 slaves_cnt; | 499 | u8 slaves_cnt; |
@@ -492,6 +517,10 @@ int omap_hwmod_idle(struct omap_hwmod *oh); | |||
492 | int _omap_hwmod_idle(struct omap_hwmod *oh); | 517 | int _omap_hwmod_idle(struct omap_hwmod *oh); |
493 | int omap_hwmod_shutdown(struct omap_hwmod *oh); | 518 | int omap_hwmod_shutdown(struct omap_hwmod *oh); |
494 | 519 | ||
520 | int omap_hwmod_assert_hardreset(struct omap_hwmod *oh, const char *name); | ||
521 | int omap_hwmod_deassert_hardreset(struct omap_hwmod *oh, const char *name); | ||
522 | int omap_hwmod_read_hardreset(struct omap_hwmod *oh, const char *name); | ||
523 | |||
495 | int omap_hwmod_enable_clocks(struct omap_hwmod *oh); | 524 | int omap_hwmod_enable_clocks(struct omap_hwmod *oh); |
496 | int omap_hwmod_disable_clocks(struct omap_hwmod *oh); | 525 | int omap_hwmod_disable_clocks(struct omap_hwmod *oh); |
497 | 526 | ||
@@ -500,8 +529,8 @@ int omap_hwmod_set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode); | |||
500 | int omap_hwmod_reset(struct omap_hwmod *oh); | 529 | int omap_hwmod_reset(struct omap_hwmod *oh); |
501 | void omap_hwmod_ocp_barrier(struct omap_hwmod *oh); | 530 | void omap_hwmod_ocp_barrier(struct omap_hwmod *oh); |
502 | 531 | ||
503 | void omap_hwmod_writel(u32 v, struct omap_hwmod *oh, u16 reg_offs); | 532 | void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs); |
504 | u32 omap_hwmod_readl(struct omap_hwmod *oh, u16 reg_offs); | 533 | u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs); |
505 | 534 | ||
506 | int omap_hwmod_count_resources(struct omap_hwmod *oh); | 535 | int omap_hwmod_count_resources(struct omap_hwmod *oh); |
507 | int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); | 536 | int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); |
@@ -534,5 +563,6 @@ int omap_hwmod_for_each_by_class(const char *classname, | |||
534 | extern int omap2420_hwmod_init(void); | 563 | extern int omap2420_hwmod_init(void); |
535 | extern int omap2430_hwmod_init(void); | 564 | extern int omap2430_hwmod_init(void); |
536 | extern int omap3xxx_hwmod_init(void); | 565 | extern int omap3xxx_hwmod_init(void); |
566 | extern int omap44xx_hwmod_init(void); | ||
537 | 567 | ||
538 | #endif | 568 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/powerdomain.h b/arch/arm/plat-omap/include/plat/powerdomain.h index fb6ec74fe39e..9ca420dcd2f8 100644 --- a/arch/arm/plat-omap/include/plat/powerdomain.h +++ b/arch/arm/plat-omap/include/plat/powerdomain.h | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | /* Powerdomain allowable state bitfields */ | 33 | /* Powerdomain allowable state bitfields */ |
34 | #define PWRSTS_ON (1 << PWRDM_POWER_ON) | 34 | #define PWRSTS_ON (1 << PWRDM_POWER_ON) |
35 | #define PWRSTS_OFF (1 << PWRDM_POWER_OFF) | ||
35 | #define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \ | 36 | #define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \ |
36 | (1 << PWRDM_POWER_ON)) | 37 | (1 << PWRDM_POWER_ON)) |
37 | 38 | ||
@@ -161,5 +162,6 @@ int pwrdm_state_switch(struct powerdomain *pwrdm); | |||
161 | int pwrdm_clkdm_state_switch(struct clockdomain *clkdm); | 162 | int pwrdm_clkdm_state_switch(struct clockdomain *clkdm); |
162 | int pwrdm_pre_transition(void); | 163 | int pwrdm_pre_transition(void); |
163 | int pwrdm_post_transition(void); | 164 | int pwrdm_post_transition(void); |
165 | int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm); | ||
164 | 166 | ||
165 | #endif | 167 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/prcm.h b/arch/arm/plat-omap/include/plat/prcm.h index 9fbd91419cd1..ab77442e42ab 100644 --- a/arch/arm/plat-omap/include/plat/prcm.h +++ b/arch/arm/plat-omap/include/plat/prcm.h | |||
@@ -38,6 +38,8 @@ u32 prm_read_mod_reg(s16 module, u16 idx); | |||
38 | void prm_write_mod_reg(u32 val, s16 module, u16 idx); | 38 | void prm_write_mod_reg(u32 val, s16 module, u16 idx); |
39 | u32 prm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx); | 39 | u32 prm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx); |
40 | u32 prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask); | 40 | u32 prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask); |
41 | u32 omap4_prm_read_bits_shift(void __iomem *reg, u32 mask); | ||
42 | u32 omap4_prm_rmw_reg_bits(u32 mask, u32 bits, void __iomem *reg); | ||
41 | u32 cm_read_mod_reg(s16 module, u16 idx); | 43 | u32 cm_read_mod_reg(s16 module, u16 idx); |
42 | void cm_write_mod_reg(u32 val, s16 module, u16 idx); | 44 | void cm_write_mod_reg(u32 val, s16 module, u16 idx); |
43 | u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx); | 45 | u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx); |
diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h index 7b76f50564ba..efd87c8dda69 100644 --- a/arch/arm/plat-omap/include/plat/sdrc.h +++ b/arch/arm/plat-omap/include/plat/sdrc.h | |||
@@ -147,6 +147,7 @@ struct memory_timings { | |||
147 | }; | 147 | }; |
148 | 148 | ||
149 | extern void omap2xxx_sdrc_init_params(u32 force_lock_to_unlock_mode); | 149 | extern void omap2xxx_sdrc_init_params(u32 force_lock_to_unlock_mode); |
150 | struct omap_sdrc_params *rx51_get_sdram_timings(void); | ||
150 | 151 | ||
151 | u32 omap2xxx_sdrc_dll_is_unlocked(void); | 152 | u32 omap2xxx_sdrc_dll_is_unlocked(void); |
152 | u32 omap2xxx_sdrc_reprogram(u32 level, u32 force); | 153 | u32 omap2xxx_sdrc_reprogram(u32 level, u32 force); |
diff --git a/arch/arm/plat-omap/include/plat/sram.h b/arch/arm/plat-omap/include/plat/sram.h index 16a1b458d53c..5905100b29a1 100644 --- a/arch/arm/plat-omap/include/plat/sram.h +++ b/arch/arm/plat-omap/include/plat/sram.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef __ARCH_ARM_OMAP_SRAM_H | 11 | #ifndef __ARCH_ARM_OMAP_SRAM_H |
12 | #define __ARCH_ARM_OMAP_SRAM_H | 12 | #define __ARCH_ARM_OMAP_SRAM_H |
13 | 13 | ||
14 | extern int __init omap_sram_init(void); | ||
15 | extern void * omap_sram_push(void * start, unsigned long size); | 14 | extern void * omap_sram_push(void * start, unsigned long size); |
16 | extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl); | 15 | extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl); |
17 | 16 | ||
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h index ddf723be48dc..9036e374e0ac 100644 --- a/arch/arm/plat-omap/include/plat/uncompress.h +++ b/arch/arm/plat-omap/include/plat/uncompress.h | |||
@@ -139,10 +139,14 @@ static inline void __arch_decomp_setup(unsigned long arch_id) | |||
139 | DEBUG_LL_OMAP2(1, omap3evm); | 139 | DEBUG_LL_OMAP2(1, omap3evm); |
140 | DEBUG_LL_OMAP3(1, omap_3430sdp); | 140 | DEBUG_LL_OMAP3(1, omap_3430sdp); |
141 | DEBUG_LL_OMAP3(1, omap_3630sdp); | 141 | DEBUG_LL_OMAP3(1, omap_3630sdp); |
142 | DEBUG_LL_OMAP3(1, omap3530_lv_som); | ||
143 | DEBUG_LL_OMAP3(1, omap3_torpedo); | ||
142 | 144 | ||
143 | /* omap3 based boards using UART3 */ | 145 | /* omap3 based boards using UART3 */ |
144 | DEBUG_LL_OMAP3(3, cm_t35); | 146 | DEBUG_LL_OMAP3(3, cm_t35); |
147 | DEBUG_LL_OMAP3(3, cm_t3517); | ||
145 | DEBUG_LL_OMAP3(3, igep0020); | 148 | DEBUG_LL_OMAP3(3, igep0020); |
149 | DEBUG_LL_OMAP3(3, igep0030); | ||
146 | DEBUG_LL_OMAP3(3, nokia_rx51); | 150 | DEBUG_LL_OMAP3(3, nokia_rx51); |
147 | DEBUG_LL_OMAP3(3, omap3517evm); | 151 | DEBUG_LL_OMAP3(3, omap3517evm); |
148 | DEBUG_LL_OMAP3(3, omap3_beagle); | 152 | DEBUG_LL_OMAP3(3, omap3_beagle); |
@@ -153,6 +157,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id) | |||
153 | 157 | ||
154 | /* omap4 based boards using UART3 */ | 158 | /* omap4 based boards using UART3 */ |
155 | DEBUG_LL_OMAP4(3, omap_4430sdp); | 159 | DEBUG_LL_OMAP4(3, omap_4430sdp); |
160 | DEBUG_LL_OMAP4(3, omap4_panda); | ||
156 | 161 | ||
157 | /* zoom2/3 external uart */ | 162 | /* zoom2/3 external uart */ |
158 | DEBUG_LL_ZOOM(omap_zoom2); | 163 | DEBUG_LL_ZOOM(omap_zoom2); |
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index 9feddacfe850..59c7fe731f28 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h | |||
@@ -105,7 +105,7 @@ static inline void omap1_usb_init(struct omap_usb_config *pdata) | |||
105 | #if defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_ARCH_OMAP_OTG_MODULE) | 105 | #if defined(CONFIG_ARCH_OMAP_OTG) || defined(CONFIG_ARCH_OMAP_OTG_MODULE) |
106 | void omap2_usbfs_init(struct omap_usb_config *pdata); | 106 | void omap2_usbfs_init(struct omap_usb_config *pdata); |
107 | #else | 107 | #else |
108 | static inline omap2_usbfs_init(struct omap_usb_config *pdata) | 108 | static inline void omap2_usbfs_init(struct omap_usb_config *pdata) |
109 | { | 109 | { |
110 | } | 110 | } |
111 | #endif | 111 | #endif |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 0c8612fd8312..eac4b978e9fd 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
@@ -33,7 +33,7 @@ | |||
33 | struct omap_mcbsp **mcbsp_ptr; | 33 | struct omap_mcbsp **mcbsp_ptr; |
34 | int omap_mcbsp_count, omap_mcbsp_cache_size; | 34 | int omap_mcbsp_count, omap_mcbsp_cache_size; |
35 | 35 | ||
36 | void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) | 36 | static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) |
37 | { | 37 | { |
38 | if (cpu_class_is_omap1()) { | 38 | if (cpu_class_is_omap1()) { |
39 | ((u16 *)mcbsp->reg_cache)[reg / sizeof(u16)] = (u16)val; | 39 | ((u16 *)mcbsp->reg_cache)[reg / sizeof(u16)] = (u16)val; |
@@ -47,7 +47,7 @@ void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) | |||
47 | } | 47 | } |
48 | } | 48 | } |
49 | 49 | ||
50 | int omap_mcbsp_read(struct omap_mcbsp *mcbsp, u16 reg, bool from_cache) | 50 | static int omap_mcbsp_read(struct omap_mcbsp *mcbsp, u16 reg, bool from_cache) |
51 | { | 51 | { |
52 | if (cpu_class_is_omap1()) { | 52 | if (cpu_class_is_omap1()) { |
53 | return !from_cache ? __raw_readw(mcbsp->io_base + reg) : | 53 | return !from_cache ? __raw_readw(mcbsp->io_base + reg) : |
@@ -62,12 +62,12 @@ int omap_mcbsp_read(struct omap_mcbsp *mcbsp, u16 reg, bool from_cache) | |||
62 | } | 62 | } |
63 | 63 | ||
64 | #ifdef CONFIG_ARCH_OMAP3 | 64 | #ifdef CONFIG_ARCH_OMAP3 |
65 | void omap_mcbsp_st_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) | 65 | static void omap_mcbsp_st_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) |
66 | { | 66 | { |
67 | __raw_writel(val, mcbsp->st_data->io_base_st + reg); | 67 | __raw_writel(val, mcbsp->st_data->io_base_st + reg); |
68 | } | 68 | } |
69 | 69 | ||
70 | int omap_mcbsp_st_read(struct omap_mcbsp *mcbsp, u16 reg) | 70 | static int omap_mcbsp_st_read(struct omap_mcbsp *mcbsp, u16 reg) |
71 | { | 71 | { |
72 | return __raw_readl(mcbsp->st_data->io_base_st + reg); | 72 | return __raw_readl(mcbsp->st_data->io_base_st + reg); |
73 | } | 73 | } |
@@ -80,9 +80,6 @@ int omap_mcbsp_st_read(struct omap_mcbsp *mcbsp, u16 reg) | |||
80 | #define MCBSP_READ_CACHE(mcbsp, reg) \ | 80 | #define MCBSP_READ_CACHE(mcbsp, reg) \ |
81 | omap_mcbsp_read(mcbsp, OMAP_MCBSP_REG_##reg, 1) | 81 | omap_mcbsp_read(mcbsp, OMAP_MCBSP_REG_##reg, 1) |
82 | 82 | ||
83 | #define omap_mcbsp_check_valid_id(id) (id < omap_mcbsp_count) | ||
84 | #define id_to_mcbsp_ptr(id) mcbsp_ptr[id]; | ||
85 | |||
86 | #define MCBSP_ST_READ(mcbsp, reg) \ | 83 | #define MCBSP_ST_READ(mcbsp, reg) \ |
87 | omap_mcbsp_st_read(mcbsp, OMAP_ST_REG_##reg) | 84 | omap_mcbsp_st_read(mcbsp, OMAP_ST_REG_##reg) |
88 | #define MCBSP_ST_WRITE(mcbsp, reg, val) \ | 85 | #define MCBSP_ST_WRITE(mcbsp, reg, val) \ |
@@ -878,7 +875,7 @@ EXPORT_SYMBOL(omap_mcbsp_free); | |||
878 | void omap_mcbsp_start(unsigned int id, int tx, int rx) | 875 | void omap_mcbsp_start(unsigned int id, int tx, int rx) |
879 | { | 876 | { |
880 | struct omap_mcbsp *mcbsp; | 877 | struct omap_mcbsp *mcbsp; |
881 | int idle; | 878 | int enable_srg = 0; |
882 | u16 w; | 879 | u16 w; |
883 | 880 | ||
884 | if (!omap_mcbsp_check_valid_id(id)) { | 881 | if (!omap_mcbsp_check_valid_id(id)) { |
@@ -893,10 +890,13 @@ void omap_mcbsp_start(unsigned int id, int tx, int rx) | |||
893 | mcbsp->rx_word_length = (MCBSP_READ_CACHE(mcbsp, RCR1) >> 5) & 0x7; | 890 | mcbsp->rx_word_length = (MCBSP_READ_CACHE(mcbsp, RCR1) >> 5) & 0x7; |
894 | mcbsp->tx_word_length = (MCBSP_READ_CACHE(mcbsp, XCR1) >> 5) & 0x7; | 891 | mcbsp->tx_word_length = (MCBSP_READ_CACHE(mcbsp, XCR1) >> 5) & 0x7; |
895 | 892 | ||
896 | idle = !((MCBSP_READ_CACHE(mcbsp, SPCR2) | | 893 | /* Only enable SRG, if McBSP is master */ |
897 | MCBSP_READ_CACHE(mcbsp, SPCR1)) & 1); | 894 | w = MCBSP_READ_CACHE(mcbsp, PCR0); |
895 | if (w & (FSXM | FSRM | CLKXM | CLKRM)) | ||
896 | enable_srg = !((MCBSP_READ_CACHE(mcbsp, SPCR2) | | ||
897 | MCBSP_READ_CACHE(mcbsp, SPCR1)) & 1); | ||
898 | 898 | ||
899 | if (idle) { | 899 | if (enable_srg) { |
900 | /* Start the sample generator */ | 900 | /* Start the sample generator */ |
901 | w = MCBSP_READ_CACHE(mcbsp, SPCR2); | 901 | w = MCBSP_READ_CACHE(mcbsp, SPCR2); |
902 | MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 6)); | 902 | MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 6)); |
@@ -919,7 +919,7 @@ void omap_mcbsp_start(unsigned int id, int tx, int rx) | |||
919 | */ | 919 | */ |
920 | udelay(500); | 920 | udelay(500); |
921 | 921 | ||
922 | if (idle) { | 922 | if (enable_srg) { |
923 | /* Start frame sync */ | 923 | /* Start frame sync */ |
924 | w = MCBSP_READ_CACHE(mcbsp, SPCR2); | 924 | w = MCBSP_READ_CACHE(mcbsp, SPCR2); |
925 | MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 7)); | 925 | MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 7)); |
@@ -1645,7 +1645,7 @@ static const struct attribute_group sidetone_attr_group = { | |||
1645 | .attrs = (struct attribute **)sidetone_attrs, | 1645 | .attrs = (struct attribute **)sidetone_attrs, |
1646 | }; | 1646 | }; |
1647 | 1647 | ||
1648 | int __devinit omap_st_add(struct omap_mcbsp *mcbsp) | 1648 | static int __devinit omap_st_add(struct omap_mcbsp *mcbsp) |
1649 | { | 1649 | { |
1650 | struct omap_mcbsp_platform_data *pdata = mcbsp->pdata; | 1650 | struct omap_mcbsp_platform_data *pdata = mcbsp->pdata; |
1651 | struct omap_mcbsp_st_data *st_data; | 1651 | struct omap_mcbsp_st_data *st_data; |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index d2b160942ccc..abe933cd8f09 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -82,6 +82,7 @@ | |||
82 | #include <linux/slab.h> | 82 | #include <linux/slab.h> |
83 | #include <linux/err.h> | 83 | #include <linux/err.h> |
84 | #include <linux/io.h> | 84 | #include <linux/io.h> |
85 | #include <linux/clk.h> | ||
85 | 86 | ||
86 | #include <plat/omap_device.h> | 87 | #include <plat/omap_device.h> |
87 | #include <plat/omap_hwmod.h> | 88 | #include <plat/omap_hwmod.h> |
@@ -90,12 +91,6 @@ | |||
90 | #define USE_WAKEUP_LAT 0 | 91 | #define USE_WAKEUP_LAT 0 |
91 | #define IGNORE_WAKEUP_LAT 1 | 92 | #define IGNORE_WAKEUP_LAT 1 |
92 | 93 | ||
93 | /* | ||
94 | * OMAP_DEVICE_MAGIC: used to determine whether a struct omap_device | ||
95 | * obtained via container_of() is in fact a struct omap_device | ||
96 | */ | ||
97 | #define OMAP_DEVICE_MAGIC 0xf00dcafe | ||
98 | |||
99 | /* Private functions */ | 94 | /* Private functions */ |
100 | 95 | ||
101 | /** | 96 | /** |
@@ -243,6 +238,44 @@ static inline struct omap_device *_find_by_pdev(struct platform_device *pdev) | |||
243 | return container_of(pdev, struct omap_device, pdev); | 238 | return container_of(pdev, struct omap_device, pdev); |
244 | } | 239 | } |
245 | 240 | ||
241 | /** | ||
242 | * _add_optional_clock_alias - Add clock alias for hwmod optional clocks | ||
243 | * @od: struct omap_device *od | ||
244 | * | ||
245 | * For every optional clock present per hwmod per omap_device, this function | ||
246 | * adds an entry in the clocks list of the form <dev-id=dev_name, con-id=role> | ||
247 | * if an entry is already present in it with the form <dev-id=NULL, con-id=role> | ||
248 | * | ||
249 | * The function is called from inside omap_device_build_ss(), after | ||
250 | * omap_device_register. | ||
251 | * | ||
252 | * This allows drivers to get a pointer to its optional clocks based on its role | ||
253 | * by calling clk_get(<dev*>, <role>). | ||
254 | * | ||
255 | * No return value. | ||
256 | */ | ||
257 | static void _add_optional_clock_alias(struct omap_device *od, | ||
258 | struct omap_hwmod *oh) | ||
259 | { | ||
260 | int i; | ||
261 | |||
262 | for (i = 0; i < oh->opt_clks_cnt; i++) { | ||
263 | struct omap_hwmod_opt_clk *oc; | ||
264 | int r; | ||
265 | |||
266 | oc = &oh->opt_clks[i]; | ||
267 | |||
268 | if (!oc->_clk) | ||
269 | continue; | ||
270 | |||
271 | r = clk_add_alias(oc->role, dev_name(&od->pdev.dev), | ||
272 | (char *)oc->clk, &od->pdev.dev); | ||
273 | if (r) | ||
274 | pr_err("omap_device: %s: clk_add_alias for %s failed\n", | ||
275 | dev_name(&od->pdev.dev), oc->role); | ||
276 | } | ||
277 | } | ||
278 | |||
246 | 279 | ||
247 | /* Public functions for use by core code */ | 280 | /* Public functions for use by core code */ |
248 | 281 | ||
@@ -257,12 +290,11 @@ static inline struct omap_device *_find_by_pdev(struct platform_device *pdev) | |||
257 | */ | 290 | */ |
258 | int omap_device_count_resources(struct omap_device *od) | 291 | int omap_device_count_resources(struct omap_device *od) |
259 | { | 292 | { |
260 | struct omap_hwmod *oh; | ||
261 | int c = 0; | 293 | int c = 0; |
262 | int i; | 294 | int i; |
263 | 295 | ||
264 | for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) | 296 | for (i = 0; i < od->hwmods_cnt; i++) |
265 | c += omap_hwmod_count_resources(oh); | 297 | c += omap_hwmod_count_resources(od->hwmods[i]); |
266 | 298 | ||
267 | pr_debug("omap_device: %s: counted %d total resources across %d " | 299 | pr_debug("omap_device: %s: counted %d total resources across %d " |
268 | "hwmods\n", od->pdev.name, c, od->hwmods_cnt); | 300 | "hwmods\n", od->pdev.name, c, od->hwmods_cnt); |
@@ -289,12 +321,11 @@ int omap_device_count_resources(struct omap_device *od) | |||
289 | */ | 321 | */ |
290 | int omap_device_fill_resources(struct omap_device *od, struct resource *res) | 322 | int omap_device_fill_resources(struct omap_device *od, struct resource *res) |
291 | { | 323 | { |
292 | struct omap_hwmod *oh; | ||
293 | int c = 0; | 324 | int c = 0; |
294 | int i, r; | 325 | int i, r; |
295 | 326 | ||
296 | for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) { | 327 | for (i = 0; i < od->hwmods_cnt; i++) { |
297 | r = omap_hwmod_fill_resources(oh, res); | 328 | r = omap_hwmod_fill_resources(od->hwmods[i], res); |
298 | res += r; | 329 | res += r; |
299 | c += r; | 330 | c += r; |
300 | } | 331 | } |
@@ -414,15 +445,15 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, | |||
414 | od->pm_lats = pm_lats; | 445 | od->pm_lats = pm_lats; |
415 | od->pm_lats_cnt = pm_lats_cnt; | 446 | od->pm_lats_cnt = pm_lats_cnt; |
416 | 447 | ||
417 | od->magic = OMAP_DEVICE_MAGIC; | ||
418 | |||
419 | if (is_early_device) | 448 | if (is_early_device) |
420 | ret = omap_early_device_register(od); | 449 | ret = omap_early_device_register(od); |
421 | else | 450 | else |
422 | ret = omap_device_register(od); | 451 | ret = omap_device_register(od); |
423 | 452 | ||
424 | for (i = 0; i < oh_cnt; i++) | 453 | for (i = 0; i < oh_cnt; i++) { |
425 | hwmods[i]->od = od; | 454 | hwmods[i]->od = od; |
455 | _add_optional_clock_alias(od, hwmods[i]); | ||
456 | } | ||
426 | 457 | ||
427 | if (ret) | 458 | if (ret) |
428 | goto odbs_exit4; | 459 | goto odbs_exit4; |
@@ -473,6 +504,7 @@ int omap_device_register(struct omap_device *od) | |||
473 | { | 504 | { |
474 | pr_debug("omap_device: %s: registering\n", od->pdev.name); | 505 | pr_debug("omap_device: %s: registering\n", od->pdev.name); |
475 | 506 | ||
507 | od->pdev.dev.parent = &omap_device_parent; | ||
476 | return platform_device_register(&od->pdev); | 508 | return platform_device_register(&od->pdev); |
477 | } | 509 | } |
478 | 510 | ||
@@ -566,7 +598,6 @@ int omap_device_shutdown(struct platform_device *pdev) | |||
566 | { | 598 | { |
567 | int ret, i; | 599 | int ret, i; |
568 | struct omap_device *od; | 600 | struct omap_device *od; |
569 | struct omap_hwmod *oh; | ||
570 | 601 | ||
571 | od = _find_by_pdev(pdev); | 602 | od = _find_by_pdev(pdev); |
572 | 603 | ||
@@ -579,8 +610,8 @@ int omap_device_shutdown(struct platform_device *pdev) | |||
579 | 610 | ||
580 | ret = _omap_device_deactivate(od, IGNORE_WAKEUP_LAT); | 611 | ret = _omap_device_deactivate(od, IGNORE_WAKEUP_LAT); |
581 | 612 | ||
582 | for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) | 613 | for (i = 0; i < od->hwmods_cnt; i++) |
583 | omap_hwmod_shutdown(oh); | 614 | omap_hwmod_shutdown(od->hwmods[i]); |
584 | 615 | ||
585 | od->_state = OMAP_DEVICE_STATE_SHUTDOWN; | 616 | od->_state = OMAP_DEVICE_STATE_SHUTDOWN; |
586 | 617 | ||
@@ -627,18 +658,6 @@ int omap_device_align_pm_lat(struct platform_device *pdev, | |||
627 | } | 658 | } |
628 | 659 | ||
629 | /** | 660 | /** |
630 | * omap_device_is_valid - Check if pointer is a valid omap_device | ||
631 | * @od: struct omap_device * | ||
632 | * | ||
633 | * Return whether struct omap_device pointer @od points to a valid | ||
634 | * omap_device. | ||
635 | */ | ||
636 | bool omap_device_is_valid(struct omap_device *od) | ||
637 | { | ||
638 | return (od && od->magic == OMAP_DEVICE_MAGIC); | ||
639 | } | ||
640 | |||
641 | /** | ||
642 | * omap_device_get_pwrdm - return the powerdomain * associated with @od | 661 | * omap_device_get_pwrdm - return the powerdomain * associated with @od |
643 | * @od: struct omap_device * | 662 | * @od: struct omap_device * |
644 | * | 663 | * |
@@ -692,11 +711,10 @@ void __iomem *omap_device_get_rt_va(struct omap_device *od) | |||
692 | */ | 711 | */ |
693 | int omap_device_enable_hwmods(struct omap_device *od) | 712 | int omap_device_enable_hwmods(struct omap_device *od) |
694 | { | 713 | { |
695 | struct omap_hwmod *oh; | ||
696 | int i; | 714 | int i; |
697 | 715 | ||
698 | for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) | 716 | for (i = 0; i < od->hwmods_cnt; i++) |
699 | omap_hwmod_enable(oh); | 717 | omap_hwmod_enable(od->hwmods[i]); |
700 | 718 | ||
701 | /* XXX pass along return value here? */ | 719 | /* XXX pass along return value here? */ |
702 | return 0; | 720 | return 0; |
@@ -710,11 +728,10 @@ int omap_device_enable_hwmods(struct omap_device *od) | |||
710 | */ | 728 | */ |
711 | int omap_device_idle_hwmods(struct omap_device *od) | 729 | int omap_device_idle_hwmods(struct omap_device *od) |
712 | { | 730 | { |
713 | struct omap_hwmod *oh; | ||
714 | int i; | 731 | int i; |
715 | 732 | ||
716 | for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) | 733 | for (i = 0; i < od->hwmods_cnt; i++) |
717 | omap_hwmod_idle(oh); | 734 | omap_hwmod_idle(od->hwmods[i]); |
718 | 735 | ||
719 | /* XXX pass along return value here? */ | 736 | /* XXX pass along return value here? */ |
720 | return 0; | 737 | return 0; |
@@ -729,11 +746,10 @@ int omap_device_idle_hwmods(struct omap_device *od) | |||
729 | */ | 746 | */ |
730 | int omap_device_disable_clocks(struct omap_device *od) | 747 | int omap_device_disable_clocks(struct omap_device *od) |
731 | { | 748 | { |
732 | struct omap_hwmod *oh; | ||
733 | int i; | 749 | int i; |
734 | 750 | ||
735 | for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) | 751 | for (i = 0; i < od->hwmods_cnt; i++) |
736 | omap_hwmod_disable_clocks(oh); | 752 | omap_hwmod_disable_clocks(od->hwmods[i]); |
737 | 753 | ||
738 | /* XXX pass along return value here? */ | 754 | /* XXX pass along return value here? */ |
739 | return 0; | 755 | return 0; |
@@ -748,12 +764,22 @@ int omap_device_disable_clocks(struct omap_device *od) | |||
748 | */ | 764 | */ |
749 | int omap_device_enable_clocks(struct omap_device *od) | 765 | int omap_device_enable_clocks(struct omap_device *od) |
750 | { | 766 | { |
751 | struct omap_hwmod *oh; | ||
752 | int i; | 767 | int i; |
753 | 768 | ||
754 | for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) | 769 | for (i = 0; i < od->hwmods_cnt; i++) |
755 | omap_hwmod_enable_clocks(oh); | 770 | omap_hwmod_enable_clocks(od->hwmods[i]); |
756 | 771 | ||
757 | /* XXX pass along return value here? */ | 772 | /* XXX pass along return value here? */ |
758 | return 0; | 773 | return 0; |
759 | } | 774 | } |
775 | |||
776 | struct device omap_device_parent = { | ||
777 | .init_name = "omap", | ||
778 | .parent = &platform_bus, | ||
779 | }; | ||
780 | |||
781 | static int __init omap_device_init(void) | ||
782 | { | ||
783 | return device_register(&omap_device_parent); | ||
784 | } | ||
785 | core_initcall(omap_device_init); | ||
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 10b3b4c63372..e2c8eebe6b3a 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/omapfb.h> | ||
22 | 23 | ||
23 | #include <asm/tlb.h> | 24 | #include <asm/tlb.h> |
24 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
@@ -30,8 +31,8 @@ | |||
30 | #include <plat/cpu.h> | 31 | #include <plat/cpu.h> |
31 | #include <plat/vram.h> | 32 | #include <plat/vram.h> |
32 | 33 | ||
33 | #include <plat/control.h> | 34 | #include "sram.h" |
34 | 35 | #include "fb.h" | |
35 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 36 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
36 | # include "../mach-omap2/prm.h" | 37 | # include "../mach-omap2/prm.h" |
37 | # include "../mach-omap2/cm.h" | 38 | # include "../mach-omap2/cm.h" |
@@ -53,7 +54,7 @@ | |||
53 | #define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000) | 54 | #define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000) |
54 | #define OMAP4_SRAM_PUB_VA (OMAP4_SRAM_VA + 0x4000) | 55 | #define OMAP4_SRAM_PUB_VA (OMAP4_SRAM_VA + 0x4000) |
55 | 56 | ||
56 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 57 | #if defined(CONFIG_ARCH_OMAP2PLUS) |
57 | #define SRAM_BOOTLOADER_SZ 0x00 | 58 | #define SRAM_BOOTLOADER_SZ 0x00 |
58 | #else | 59 | #else |
59 | #define SRAM_BOOTLOADER_SZ 0x80 | 60 | #define SRAM_BOOTLOADER_SZ 0x80 |
@@ -68,7 +69,6 @@ | |||
68 | #define OMAP34XX_VA_WRITEPERM0 OMAP2_L3_IO_ADDRESS(0x68012858) | 69 | #define OMAP34XX_VA_WRITEPERM0 OMAP2_L3_IO_ADDRESS(0x68012858) |
69 | #define OMAP34XX_VA_ADDR_MATCH2 OMAP2_L3_IO_ADDRESS(0x68012880) | 70 | #define OMAP34XX_VA_ADDR_MATCH2 OMAP2_L3_IO_ADDRESS(0x68012880) |
70 | #define OMAP34XX_VA_SMS_RG_ATT0 OMAP2_L3_IO_ADDRESS(0x6C000048) | 71 | #define OMAP34XX_VA_SMS_RG_ATT0 OMAP2_L3_IO_ADDRESS(0x6C000048) |
71 | #define OMAP34XX_VA_CONTROL_STAT OMAP2_L4_IO_ADDRESS(0x480022F0) | ||
72 | 72 | ||
73 | #define GP_DEVICE 0x300 | 73 | #define GP_DEVICE 0x300 |
74 | 74 | ||
@@ -79,12 +79,6 @@ static unsigned long omap_sram_base; | |||
79 | static unsigned long omap_sram_size; | 79 | static unsigned long omap_sram_size; |
80 | static unsigned long omap_sram_ceil; | 80 | static unsigned long omap_sram_ceil; |
81 | 81 | ||
82 | extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart, | ||
83 | unsigned long sram_vstart, | ||
84 | unsigned long sram_size, | ||
85 | unsigned long pstart_avail, | ||
86 | unsigned long size_avail); | ||
87 | |||
88 | /* | 82 | /* |
89 | * Depending on the target RAMFS firewall setup, the public usable amount of | 83 | * Depending on the target RAMFS firewall setup, the public usable amount of |
90 | * SRAM varies. The default accessible size for all device types is 2k. A GP | 84 | * SRAM varies. The default accessible size for all device types is 2k. A GP |
@@ -93,16 +87,7 @@ extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart, | |||
93 | */ | 87 | */ |
94 | static int is_sram_locked(void) | 88 | static int is_sram_locked(void) |
95 | { | 89 | { |
96 | int type = 0; | 90 | if (OMAP2_DEVICE_TYPE_GP == omap_type()) { |
97 | |||
98 | if (cpu_is_omap44xx()) | ||
99 | /* Not yet supported */ | ||
100 | return 0; | ||
101 | |||
102 | if (cpu_is_omap242x()) | ||
103 | type = omap_rev() & OMAP2_DEVICETYPE_MASK; | ||
104 | |||
105 | if (type == GP_DEVICE) { | ||
106 | /* RAMFW: R/W access to all initiators for all qualifier sets */ | 91 | /* RAMFW: R/W access to all initiators for all qualifier sets */ |
107 | if (cpu_is_omap242x()) { | 92 | if (cpu_is_omap242x()) { |
108 | __raw_writel(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all q-vects */ | 93 | __raw_writel(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all q-vects */ |
@@ -127,7 +112,7 @@ static int is_sram_locked(void) | |||
127 | * to secure SRAM will hang the system. Also the SRAM is not | 112 | * to secure SRAM will hang the system. Also the SRAM is not |
128 | * yet mapped at this point. | 113 | * yet mapped at this point. |
129 | */ | 114 | */ |
130 | void __init omap_detect_sram(void) | 115 | static void __init omap_detect_sram(void) |
131 | { | 116 | { |
132 | unsigned long reserved; | 117 | unsigned long reserved; |
133 | 118 | ||
@@ -213,7 +198,7 @@ static struct map_desc omap_sram_io_desc[] __initdata = { | |||
213 | /* | 198 | /* |
214 | * Note that we cannot use ioremap for SRAM, as clock init needs SRAM early. | 199 | * Note that we cannot use ioremap for SRAM, as clock init needs SRAM early. |
215 | */ | 200 | */ |
216 | void __init omap_map_sram(void) | 201 | static void __init omap_map_sram(void) |
217 | { | 202 | { |
218 | unsigned long base; | 203 | unsigned long base; |
219 | 204 | ||
@@ -330,7 +315,7 @@ u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass) | |||
330 | #endif | 315 | #endif |
331 | 316 | ||
332 | #ifdef CONFIG_ARCH_OMAP2420 | 317 | #ifdef CONFIG_ARCH_OMAP2420 |
333 | int __init omap242x_sram_init(void) | 318 | static int __init omap242x_sram_init(void) |
334 | { | 319 | { |
335 | _omap2_sram_ddr_init = omap_sram_push(omap242x_sram_ddr_init, | 320 | _omap2_sram_ddr_init = omap_sram_push(omap242x_sram_ddr_init, |
336 | omap242x_sram_ddr_init_sz); | 321 | omap242x_sram_ddr_init_sz); |
@@ -351,7 +336,7 @@ static inline int omap242x_sram_init(void) | |||
351 | #endif | 336 | #endif |
352 | 337 | ||
353 | #ifdef CONFIG_ARCH_OMAP2430 | 338 | #ifdef CONFIG_ARCH_OMAP2430 |
354 | int __init omap243x_sram_init(void) | 339 | static int __init omap243x_sram_init(void) |
355 | { | 340 | { |
356 | _omap2_sram_ddr_init = omap_sram_push(omap243x_sram_ddr_init, | 341 | _omap2_sram_ddr_init = omap_sram_push(omap243x_sram_ddr_init, |
357 | omap243x_sram_ddr_init_sz); | 342 | omap243x_sram_ddr_init_sz); |
@@ -407,7 +392,7 @@ void omap3_sram_restore_context(void) | |||
407 | } | 392 | } |
408 | #endif /* CONFIG_PM */ | 393 | #endif /* CONFIG_PM */ |
409 | 394 | ||
410 | int __init omap34xx_sram_init(void) | 395 | static int __init omap34xx_sram_init(void) |
411 | { | 396 | { |
412 | _omap3_sram_configure_core_dpll = | 397 | _omap3_sram_configure_core_dpll = |
413 | omap_sram_push(omap3_sram_configure_core_dpll, | 398 | omap_sram_push(omap3_sram_configure_core_dpll, |
@@ -423,7 +408,7 @@ static inline int omap34xx_sram_init(void) | |||
423 | #endif | 408 | #endif |
424 | 409 | ||
425 | #ifdef CONFIG_ARCH_OMAP4 | 410 | #ifdef CONFIG_ARCH_OMAP4 |
426 | int __init omap44xx_sram_init(void) | 411 | static int __init omap44xx_sram_init(void) |
427 | { | 412 | { |
428 | printk(KERN_ERR "FIXME: %s not implemented\n", __func__); | 413 | printk(KERN_ERR "FIXME: %s not implemented\n", __func__); |
429 | 414 | ||
diff --git a/arch/arm/plat-omap/sram.h b/arch/arm/plat-omap/sram.h new file mode 100644 index 000000000000..29b43ef97f20 --- /dev/null +++ b/arch/arm/plat-omap/sram.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __PLAT_OMAP_SRAM_H__ | ||
2 | #define __PLAT_OMAP_SRAM_H__ | ||
3 | |||
4 | extern int __init omap_sram_init(void); | ||
5 | |||
6 | #endif /* __PLAT_OMAP_SRAM_H__ */ | ||