aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2016-11-18 19:42:44 -0500
committerOlof Johansson <olof@lixom.net>2016-11-18 19:42:44 -0500
commita9fa1f7c18e22223026f151f563f9770d6923a75 (patch)
treea5e5a8175a67e96f83ba4e3dc03bc20c8aef0b84
parente1cb1c7835e2fc4c025950dc7b98ac22b24a78e9 (diff)
parent2bb6375f5c03cc5bf510402b646c1a23046b3f12 (diff)
Merge tag 'omap-for-v4.10/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
SoC changes for omaps for v4.10 merge window: - Add hwmod interconnect target wrapper module data for crypto accelerators for am3xxx, am43xx and dra7 - Add support for dra71x family of SoCs - PM fixes for omap4/5 needed for omap5 cpuidle * tag 'omap-for-v4.10/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: DRA7: hwmod: Do not register RTC on DRA71 ARM: OMAP2+: board-generic: add support for DRA71x family ARM: AMx3xx: hwmod: Add data for RNG ARM: AM43xx: hwmod: Add data for DES ARM: OMAP: DRA7xx: Make L4SEC clock domain SWSUP only ARM: DRA7: hwmod: Add data for RNG IP ARM: DRA7: hwmod: Add data for SHA IP ARM: DRA7: hwmod: Add data for AES IP ARM: DRA7: hwmod: Add data for DES IP ARM: OMAP5: Add basic cpuidle MPU CSWR support ARM: OMAP4+: Fix bad fallthrough for cpuidle ARM: OMAP5: Fix mpuss_early_init ARM: OMAP5: Fix build for PM code Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--Documentation/devicetree/bindings/arm/omap/omap.txt6
-rw-r--r--arch/arm/mach-omap2/Makefile2
-rw-r--r--arch/arm/mach-omap2/board-generic.c1
-rw-r--r--arch/arm/mach-omap2/clockdomains7xx_data.c2
-rw-r--r--arch/arm/mach-omap2/common.h38
-rw-r--r--arch/arm/mach-omap2/cpuidle44xx.c80
-rw-r--r--arch/arm/mach-omap2/io.c3
-rw-r--r--arch/arm/mach-omap2/omap-mpuss-lowpower.c37
-rw-r--r--arch/arm/mach-omap2/omap4-sar-layout.h2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c8
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c29
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_data.c35
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_43xx_data.c34
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c182
-rw-r--r--arch/arm/mach-omap2/pm44xx.c2
-rw-r--r--arch/arm/mach-omap2/prcm43xx.h2
17 files changed, 405 insertions, 60 deletions
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index f53e2ee65e35..454b1bec7542 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -86,6 +86,9 @@ SoCs:
86- DRA722 86- DRA722
87 compatible = "ti,dra722", "ti,dra72", "ti,dra7" 87 compatible = "ti,dra722", "ti,dra72", "ti,dra7"
88 88
89- DRA718
90 compatible = "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7"
91
89- AM5728 92- AM5728
90 compatible = "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7" 93 compatible = "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"
91 94
@@ -181,6 +184,9 @@ Boards:
181- DRA722 EVM: Software Development Board for DRA722 184- DRA722 EVM: Software Development Board for DRA722
182 compatible = "ti,dra72-evm", "ti,dra722", "ti,dra72", "ti,dra7" 185 compatible = "ti,dra72-evm", "ti,dra722", "ti,dra72", "ti,dra7"
183 186
187- DRA718 EVM: Software Development Board for DRA718
188 compatible = "ti,dra718-evm", "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7"
189
184- DM3730 Logic PD Torpedo + Wireless: Commercial System on Module with WiFi and Bluetooth 190- DM3730 Logic PD Torpedo + Wireless: Commercial System on Module with WiFi and Bluetooth
185 compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap3630", "ti,omap3" 191 compatible = "logicpd,dm3730-torpedo-devkit", "ti,omap3630", "ti,omap3"
186 192
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 5b37ec29996e..e37ceb81a379 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -80,7 +80,7 @@ endif
80# Power Management 80# Power Management
81omap-4-5-pm-common = omap-mpuss-lowpower.o 81omap-4-5-pm-common = omap-mpuss-lowpower.o
82obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-pm-common) 82obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-pm-common)
83obj-$(CONFIG_ARCH_OMAP5) += $(omap-4-5-pm-common) 83obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-pm-common)
84obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o 84obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o
85 85
86ifeq ($(CONFIG_PM),y) 86ifeq ($(CONFIG_PM),y)
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index bab814d2f37d..981b23a39f29 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -341,6 +341,7 @@ static const char *const dra72x_boards_compat[] __initconst = {
341 "ti,am5718", 341 "ti,am5718",
342 "ti,am5716", 342 "ti,am5716",
343 "ti,dra722", 343 "ti,dra722",
344 "ti,dra718",
344 NULL, 345 NULL,
345}; 346};
346 347
diff --git a/arch/arm/mach-omap2/clockdomains7xx_data.c b/arch/arm/mach-omap2/clockdomains7xx_data.c
index ef9ed36e8a61..6c679659cda5 100644
--- a/arch/arm/mach-omap2/clockdomains7xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains7xx_data.c
@@ -409,7 +409,7 @@ static struct clockdomain l4sec_7xx_clkdm = {
409 .dep_bit = DRA7XX_L4SEC_STATDEP_SHIFT, 409 .dep_bit = DRA7XX_L4SEC_STATDEP_SHIFT,
410 .wkdep_srcs = l4sec_wkup_sleep_deps, 410 .wkdep_srcs = l4sec_wkup_sleep_deps,
411 .sleepdep_srcs = l4sec_wkup_sleep_deps, 411 .sleepdep_srcs = l4sec_wkup_sleep_deps,
412 .flags = CLKDM_CAN_HWSUP_SWSUP, 412 .flags = CLKDM_CAN_SWSUP,
413}; 413};
414 414
415static struct clockdomain l3main1_7xx_clkdm = { 415static struct clockdomain l3main1_7xx_clkdm = {
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index deed42e1dd9c..6dcca2957e23 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -262,8 +262,6 @@ extern void __iomem *omap4_get_sar_ram_base(void);
262extern void omap4_mpuss_early_init(void); 262extern void omap4_mpuss_early_init(void);
263extern void omap_do_wfi(void); 263extern void omap_do_wfi(void);
264 264
265extern void omap4_secondary_startup(void);
266extern void omap4460_secondary_startup(void);
267 265
268#ifdef CONFIG_SMP 266#ifdef CONFIG_SMP
269/* Needed for secondary core boot */ 267/* Needed for secondary core boot */
@@ -275,16 +273,11 @@ extern void omap4_cpu_die(unsigned int cpu);
275extern int omap4_cpu_kill(unsigned int cpu); 273extern int omap4_cpu_kill(unsigned int cpu);
276 274
277extern const struct smp_operations omap4_smp_ops; 275extern const struct smp_operations omap4_smp_ops;
278
279extern void omap5_secondary_startup(void);
280extern void omap5_secondary_hyp_startup(void);
281#endif 276#endif
282 277
283#if defined(CONFIG_SMP) && defined(CONFIG_PM) 278#if defined(CONFIG_SMP) && defined(CONFIG_PM)
284extern int omap4_mpuss_init(void); 279extern int omap4_mpuss_init(void);
285extern int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state); 280extern int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state);
286extern int omap4_finish_suspend(unsigned long cpu_state);
287extern void omap4_cpu_resume(void);
288extern int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state); 281extern int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state);
289#else 282#else
290static inline int omap4_enter_lowpower(unsigned int cpu, 283static inline int omap4_enter_lowpower(unsigned int cpu,
@@ -305,14 +298,41 @@ static inline int omap4_mpuss_init(void)
305 return 0; 298 return 0;
306} 299}
307 300
301#endif
302
303#ifdef CONFIG_ARCH_OMAP4
304void omap4_secondary_startup(void);
305void omap4460_secondary_startup(void);
306int omap4_finish_suspend(unsigned long cpu_state);
307void omap4_cpu_resume(void);
308#else
309static inline void omap4_secondary_startup(void)
310{
311}
312
313static inline void omap4460_secondary_startup(void)
314{
315}
308static inline int omap4_finish_suspend(unsigned long cpu_state) 316static inline int omap4_finish_suspend(unsigned long cpu_state)
309{ 317{
310 return 0; 318 return 0;
311} 319}
312
313static inline void omap4_cpu_resume(void) 320static inline void omap4_cpu_resume(void)
314{} 321{
322}
323#endif
315 324
325#if defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX)
326void omap5_secondary_startup(void);
327void omap5_secondary_hyp_startup(void);
328#else
329static inline void omap5_secondary_startup(void)
330{
331}
332
333static inline void omap5_secondary_hyp_startup(void)
334{
335}
316#endif 336#endif
317 337
318void pdata_quirks_init(const struct of_device_id *); 338void pdata_quirks_init(const struct of_device_id *);
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index fa138d4032b6..a8b291f00109 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -21,6 +21,7 @@
21#include "common.h" 21#include "common.h"
22#include "pm.h" 22#include "pm.h"
23#include "prm.h" 23#include "prm.h"
24#include "soc.h"
24#include "clockdomain.h" 25#include "clockdomain.h"
25 26
26#define MAX_CPUS 2 27#define MAX_CPUS 2
@@ -30,6 +31,7 @@ struct idle_statedata {
30 u32 cpu_state; 31 u32 cpu_state;
31 u32 mpu_logic_state; 32 u32 mpu_logic_state;
32 u32 mpu_state; 33 u32 mpu_state;
34 u32 mpu_state_vote;
33}; 35};
34 36
35static struct idle_statedata omap4_idle_data[] = { 37static struct idle_statedata omap4_idle_data[] = {
@@ -50,12 +52,26 @@ static struct idle_statedata omap4_idle_data[] = {
50 }, 52 },
51}; 53};
52 54
55static struct idle_statedata omap5_idle_data[] = {
56 {
57 .cpu_state = PWRDM_POWER_ON,
58 .mpu_state = PWRDM_POWER_ON,
59 .mpu_logic_state = PWRDM_POWER_ON,
60 },
61 {
62 .cpu_state = PWRDM_POWER_RET,
63 .mpu_state = PWRDM_POWER_RET,
64 .mpu_logic_state = PWRDM_POWER_RET,
65 },
66};
67
53static struct powerdomain *mpu_pd, *cpu_pd[MAX_CPUS]; 68static struct powerdomain *mpu_pd, *cpu_pd[MAX_CPUS];
54static struct clockdomain *cpu_clkdm[MAX_CPUS]; 69static struct clockdomain *cpu_clkdm[MAX_CPUS];
55 70
56static atomic_t abort_barrier; 71static atomic_t abort_barrier;
57static bool cpu_done[MAX_CPUS]; 72static bool cpu_done[MAX_CPUS];
58static struct idle_statedata *state_ptr = &omap4_idle_data[0]; 73static struct idle_statedata *state_ptr = &omap4_idle_data[0];
74static DEFINE_RAW_SPINLOCK(mpu_lock);
59 75
60/* Private functions */ 76/* Private functions */
61 77
@@ -77,6 +93,32 @@ static int omap_enter_idle_simple(struct cpuidle_device *dev,
77 return index; 93 return index;
78} 94}
79 95
96static int omap_enter_idle_smp(struct cpuidle_device *dev,
97 struct cpuidle_driver *drv,
98 int index)
99{
100 struct idle_statedata *cx = state_ptr + index;
101 unsigned long flag;
102
103 raw_spin_lock_irqsave(&mpu_lock, flag);
104 cx->mpu_state_vote++;
105 if (cx->mpu_state_vote == num_online_cpus()) {
106 pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
107 omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
108 }
109 raw_spin_unlock_irqrestore(&mpu_lock, flag);
110
111 omap4_enter_lowpower(dev->cpu, cx->cpu_state);
112
113 raw_spin_lock_irqsave(&mpu_lock, flag);
114 if (cx->mpu_state_vote == num_online_cpus())
115 omap_set_pwrdm_state(mpu_pd, PWRDM_POWER_ON);
116 cx->mpu_state_vote--;
117 raw_spin_unlock_irqrestore(&mpu_lock, flag);
118
119 return index;
120}
121
80static int omap_enter_idle_coupled(struct cpuidle_device *dev, 122static int omap_enter_idle_coupled(struct cpuidle_device *dev,
81 struct cpuidle_driver *drv, 123 struct cpuidle_driver *drv,
82 int index) 124 int index)
@@ -220,6 +262,32 @@ static struct cpuidle_driver omap4_idle_driver = {
220 .safe_state_index = 0, 262 .safe_state_index = 0,
221}; 263};
222 264
265static struct cpuidle_driver omap5_idle_driver = {
266 .name = "omap5_idle",
267 .owner = THIS_MODULE,
268 .states = {
269 {
270 /* C1 - CPU0 ON + CPU1 ON + MPU ON */
271 .exit_latency = 2 + 2,
272 .target_residency = 5,
273 .enter = omap_enter_idle_simple,
274 .name = "C1",
275 .desc = "CPUx WFI, MPUSS ON"
276 },
277 {
278 /* C2 - CPU0 RET + CPU1 RET + MPU CSWR */
279 .exit_latency = 48 + 60,
280 .target_residency = 100,
281 .flags = CPUIDLE_FLAG_TIMER_STOP,
282 .enter = omap_enter_idle_smp,
283 .name = "C2",
284 .desc = "CPUx CSWR, MPUSS CSWR",
285 },
286 },
287 .state_count = ARRAY_SIZE(omap5_idle_data),
288 .safe_state_index = 0,
289};
290
223/* Public functions */ 291/* Public functions */
224 292
225/** 293/**
@@ -230,6 +298,16 @@ static struct cpuidle_driver omap4_idle_driver = {
230 */ 298 */
231int __init omap4_idle_init(void) 299int __init omap4_idle_init(void)
232{ 300{
301 struct cpuidle_driver *idle_driver;
302
303 if (soc_is_omap54xx()) {
304 state_ptr = &omap5_idle_data[0];
305 idle_driver = &omap5_idle_driver;
306 } else {
307 state_ptr = &omap4_idle_data[0];
308 idle_driver = &omap4_idle_driver;
309 }
310
233 mpu_pd = pwrdm_lookup("mpu_pwrdm"); 311 mpu_pd = pwrdm_lookup("mpu_pwrdm");
234 cpu_pd[0] = pwrdm_lookup("cpu0_pwrdm"); 312 cpu_pd[0] = pwrdm_lookup("cpu0_pwrdm");
235 cpu_pd[1] = pwrdm_lookup("cpu1_pwrdm"); 313 cpu_pd[1] = pwrdm_lookup("cpu1_pwrdm");
@@ -244,5 +322,5 @@ int __init omap4_idle_init(void)
244 /* Configure the broadcast timer on each cpu */ 322 /* Configure the broadcast timer on each cpu */
245 on_each_cpu(omap_setup_broadcast_timer, NULL, 1); 323 on_each_cpu(omap_setup_broadcast_timer, NULL, 1);
246 324
247 return cpuidle_register(&omap4_idle_driver, cpu_online_mask); 325 return cpuidle_register(idle_driver, cpu_online_mask);
248} 326}
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 0e9acdd95d70..f0da5259762a 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -717,10 +717,11 @@ void __init omap5_init_early(void)
717 OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE)); 717 OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE));
718 omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); 718 omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE));
719 omap2_control_base_init(); 719 omap2_control_base_init();
720 omap4_pm_init_early();
721 omap2_prcm_base_init(); 720 omap2_prcm_base_init();
722 omap5xxx_check_revision(); 721 omap5xxx_check_revision();
723 omap4_sar_ram_init(); 722 omap4_sar_ram_init();
723 omap4_mpuss_early_init();
724 omap4_pm_init_early();
724 omap54xx_voltagedomains_init(); 725 omap54xx_voltagedomains_init();
725 omap54xx_powerdomains_init(); 726 omap54xx_powerdomains_init();
726 omap54xx_clockdomains_init(); 727 omap54xx_clockdomains_init();
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index ad982465efd0..7d62ad48c7c9 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -48,6 +48,7 @@
48#include <asm/smp_scu.h> 48#include <asm/smp_scu.h>
49#include <asm/pgalloc.h> 49#include <asm/pgalloc.h>
50#include <asm/suspend.h> 50#include <asm/suspend.h>
51#include <asm/virt.h>
51#include <asm/hardware/cache-l2x0.h> 52#include <asm/hardware/cache-l2x0.h>
52 53
53#include "soc.h" 54#include "soc.h"
@@ -244,10 +245,9 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
244 save_state = 1; 245 save_state = 1;
245 break; 246 break;
246 case PWRDM_POWER_RET: 247 case PWRDM_POWER_RET:
247 if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) { 248 if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE))
248 save_state = 0; 249 save_state = 0;
249 break; 250 break;
250 }
251 default: 251 default:
252 /* 252 /*
253 * CPUx CSWR is invalid hardware state. Also CPUx OSWR 253 * CPUx CSWR is invalid hardware state. Also CPUx OSWR
@@ -371,8 +371,12 @@ int __init omap4_mpuss_init(void)
371 pm_info = &per_cpu(omap4_pm_info, 0x0); 371 pm_info = &per_cpu(omap4_pm_info, 0x0);
372 if (sar_base) { 372 if (sar_base) {
373 pm_info->scu_sar_addr = sar_base + SCU_OFFSET0; 373 pm_info->scu_sar_addr = sar_base + SCU_OFFSET0;
374 pm_info->wkup_sar_addr = sar_base + 374 if (cpu_is_omap44xx())
375 CPU0_WAKEUP_NS_PA_ADDR_OFFSET; 375 pm_info->wkup_sar_addr = sar_base +
376 CPU0_WAKEUP_NS_PA_ADDR_OFFSET;
377 else
378 pm_info->wkup_sar_addr = sar_base +
379 OMAP5_CPU0_WAKEUP_NS_PA_ADDR_OFFSET;
376 pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET0; 380 pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET0;
377 } 381 }
378 pm_info->pwrdm = pwrdm_lookup("cpu0_pwrdm"); 382 pm_info->pwrdm = pwrdm_lookup("cpu0_pwrdm");
@@ -391,8 +395,12 @@ int __init omap4_mpuss_init(void)
391 pm_info = &per_cpu(omap4_pm_info, 0x1); 395 pm_info = &per_cpu(omap4_pm_info, 0x1);
392 if (sar_base) { 396 if (sar_base) {
393 pm_info->scu_sar_addr = sar_base + SCU_OFFSET1; 397 pm_info->scu_sar_addr = sar_base + SCU_OFFSET1;
394 pm_info->wkup_sar_addr = sar_base + 398 if (cpu_is_omap44xx())
395 CPU1_WAKEUP_NS_PA_ADDR_OFFSET; 399 pm_info->wkup_sar_addr = sar_base +
400 CPU1_WAKEUP_NS_PA_ADDR_OFFSET;
401 else
402 pm_info->wkup_sar_addr = sar_base +
403 OMAP5_CPU1_WAKEUP_NS_PA_ADDR_OFFSET;
396 pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET1; 404 pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET1;
397 } 405 }
398 406
@@ -453,15 +461,24 @@ void __init omap4_mpuss_early_init(void)
453{ 461{
454 unsigned long startup_pa; 462 unsigned long startup_pa;
455 463
456 if (!cpu_is_omap44xx()) 464 if (!(cpu_is_omap44xx() || soc_is_omap54xx()))
457 return; 465 return;
458 466
459 sar_base = omap4_get_sar_ram_base(); 467 sar_base = omap4_get_sar_ram_base();
460 468
461 if (cpu_is_omap443x()) 469 if (cpu_is_omap443x())
462 startup_pa = virt_to_phys(omap4_secondary_startup); 470 startup_pa = virt_to_phys(omap4_secondary_startup);
463 else 471 else if (cpu_is_omap446x())
464 startup_pa = virt_to_phys(omap4460_secondary_startup); 472 startup_pa = virt_to_phys(omap4460_secondary_startup);
473 else if ((__boot_cpu_mode & MODE_MASK) == HYP_MODE)
474 startup_pa = virt_to_phys(omap5_secondary_hyp_startup);
475 else
476 startup_pa = virt_to_phys(omap5_secondary_startup);
465 477
466 writel_relaxed(startup_pa, sar_base + CPU1_WAKEUP_NS_PA_ADDR_OFFSET); 478 if (cpu_is_omap44xx())
479 writel_relaxed(startup_pa, sar_base +
480 CPU1_WAKEUP_NS_PA_ADDR_OFFSET);
481 else
482 writel_relaxed(startup_pa, sar_base +
483 OMAP5_CPU1_WAKEUP_NS_PA_ADDR_OFFSET);
467} 484}
diff --git a/arch/arm/mach-omap2/omap4-sar-layout.h b/arch/arm/mach-omap2/omap4-sar-layout.h
index 792b1069f724..5b2966a0f733 100644
--- a/arch/arm/mach-omap2/omap4-sar-layout.h
+++ b/arch/arm/mach-omap2/omap4-sar-layout.h
@@ -31,6 +31,8 @@
31/* CPUx Wakeup Non-Secure Physical Address offsets in SAR_BANK3 */ 31/* CPUx Wakeup Non-Secure Physical Address offsets in SAR_BANK3 */
32#define CPU0_WAKEUP_NS_PA_ADDR_OFFSET 0xa04 32#define CPU0_WAKEUP_NS_PA_ADDR_OFFSET 0xa04
33#define CPU1_WAKEUP_NS_PA_ADDR_OFFSET 0xa08 33#define CPU1_WAKEUP_NS_PA_ADDR_OFFSET 0xa08
34#define OMAP5_CPU0_WAKEUP_NS_PA_ADDR_OFFSET 0xe00
35#define OMAP5_CPU1_WAKEUP_NS_PA_ADDR_OFFSET 0xe04
34 36
35#define SAR_BACKUP_STATUS_OFFSET (SAR_BANK3_OFFSET + 0x500) 37#define SAR_BACKUP_STATUS_OFFSET (SAR_BANK3_OFFSET + 0x500)
36#define SAR_SECURE_RAM_SIZE_OFFSET (SAR_BANK3_OFFSET + 0x504) 38#define SAR_SECURE_RAM_SIZE_OFFSET (SAR_BANK3_OFFSET + 0x504)
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
index d3e61d1a02d7..434bd1a77229 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
@@ -68,6 +68,7 @@ extern struct omap_hwmod_ocp_if am33xx_l4_ls__uart6;
68extern struct omap_hwmod_ocp_if am33xx_l3_main__ocmc; 68extern struct omap_hwmod_ocp_if am33xx_l3_main__ocmc;
69extern struct omap_hwmod_ocp_if am33xx_l3_main__sha0; 69extern struct omap_hwmod_ocp_if am33xx_l3_main__sha0;
70extern struct omap_hwmod_ocp_if am33xx_l3_main__aes0; 70extern struct omap_hwmod_ocp_if am33xx_l3_main__aes0;
71extern struct omap_hwmod_ocp_if am33xx_l4_per__rng;
71 72
72extern struct omap_hwmod am33xx_l3_main_hwmod; 73extern struct omap_hwmod am33xx_l3_main_hwmod;
73extern struct omap_hwmod am33xx_l3_s_hwmod; 74extern struct omap_hwmod am33xx_l3_s_hwmod;
@@ -80,6 +81,7 @@ extern struct omap_hwmod am33xx_gfx_hwmod;
80extern struct omap_hwmod am33xx_prcm_hwmod; 81extern struct omap_hwmod am33xx_prcm_hwmod;
81extern struct omap_hwmod am33xx_aes0_hwmod; 82extern struct omap_hwmod am33xx_aes0_hwmod;
82extern struct omap_hwmod am33xx_sha0_hwmod; 83extern struct omap_hwmod am33xx_sha0_hwmod;
84extern struct omap_hwmod am33xx_rng_hwmod;
83extern struct omap_hwmod am33xx_ocmcram_hwmod; 85extern struct omap_hwmod am33xx_ocmcram_hwmod;
84extern struct omap_hwmod am33xx_smartreflex0_hwmod; 86extern struct omap_hwmod am33xx_smartreflex0_hwmod;
85extern struct omap_hwmod am33xx_smartreflex1_hwmod; 87extern struct omap_hwmod am33xx_smartreflex1_hwmod;
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
index 10dff2f0086a..8236e5c49ec3 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c
@@ -547,3 +547,11 @@ struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
547 .addr = am33xx_aes0_addrs, 547 .addr = am33xx_aes0_addrs,
548 .user = OCP_USER_MPU | OCP_USER_SDMA, 548 .user = OCP_USER_MPU | OCP_USER_SDMA,
549}; 549};
550
551/* l4 per -> rng */
552struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
553 .master = &am33xx_l4_ls_hwmod,
554 .slave = &am33xx_rng_hwmod,
555 .clk = "rng_fck",
556 .user = OCP_USER_MPU,
557};
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
index e2d84aa7f595..de06a1d5ffab 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
@@ -268,6 +268,33 @@ struct omap_hwmod am33xx_sha0_hwmod = {
268 }, 268 },
269}; 269};
270 270
271/* rng */
272static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
273 .rev_offs = 0x1fe0,
274 .sysc_offs = 0x1fe4,
275 .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
276 .idlemodes = SIDLE_FORCE | SIDLE_NO,
277 .sysc_fields = &omap_hwmod_sysc_type1,
278};
279
280static struct omap_hwmod_class am33xx_rng_hwmod_class = {
281 .name = "rng",
282 .sysc = &am33xx_rng_sysc,
283};
284
285struct omap_hwmod am33xx_rng_hwmod = {
286 .name = "rng",
287 .class = &am33xx_rng_hwmod_class,
288 .clkdm_name = "l4ls_clkdm",
289 .flags = HWMOD_SWSUP_SIDLE,
290 .main_clk = "rng_fck",
291 .prcm = {
292 .omap4 = {
293 .modulemode = MODULEMODE_SWCTRL,
294 },
295 },
296};
297
271/* ocmcram */ 298/* ocmcram */
272static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = { 299static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
273 .name = "ocmcram", 300 .name = "ocmcram",
@@ -1315,6 +1342,7 @@ static void omap_hwmod_am33xx_clkctrl(void)
1315 CLKCTRL(am33xx_ocmcram_hwmod , AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET); 1342 CLKCTRL(am33xx_ocmcram_hwmod , AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET);
1316 CLKCTRL(am33xx_sha0_hwmod , AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET); 1343 CLKCTRL(am33xx_sha0_hwmod , AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET);
1317 CLKCTRL(am33xx_aes0_hwmod , AM33XX_CM_PER_AES0_CLKCTRL_OFFSET); 1344 CLKCTRL(am33xx_aes0_hwmod , AM33XX_CM_PER_AES0_CLKCTRL_OFFSET);
1345 CLKCTRL(am33xx_rng_hwmod, AM33XX_CM_PER_RNG_CLKCTRL_OFFSET);
1318} 1346}
1319 1347
1320static void omap_hwmod_am33xx_rst(void) 1348static void omap_hwmod_am33xx_rst(void)
@@ -1388,6 +1416,7 @@ static void omap_hwmod_am43xx_clkctrl(void)
1388 CLKCTRL(am33xx_ocmcram_hwmod , AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET); 1416 CLKCTRL(am33xx_ocmcram_hwmod , AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET);
1389 CLKCTRL(am33xx_sha0_hwmod , AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET); 1417 CLKCTRL(am33xx_sha0_hwmod , AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET);
1390 CLKCTRL(am33xx_aes0_hwmod , AM43XX_CM_PER_AES0_CLKCTRL_OFFSET); 1418 CLKCTRL(am33xx_aes0_hwmod , AM43XX_CM_PER_AES0_CLKCTRL_OFFSET);
1419 CLKCTRL(am33xx_rng_hwmod, AM43XX_CM_PER_RNG_CLKCTRL_OFFSET);
1391} 1420}
1392 1421
1393static void omap_hwmod_am43xx_rst(void) 1422static void omap_hwmod_am43xx_rst(void)
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index e1c2025d6d3e..6dc51a774a26 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -503,41 +503,6 @@ static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
503 .flags = OCPIF_SWSUP_IDLE, 503 .flags = OCPIF_SWSUP_IDLE,
504}; 504};
505 505
506/* rng */
507static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
508 .rev_offs = 0x1fe0,
509 .sysc_offs = 0x1fe4,
510 .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
511 .idlemodes = SIDLE_FORCE | SIDLE_NO,
512 .sysc_fields = &omap_hwmod_sysc_type1,
513};
514
515static struct omap_hwmod_class am33xx_rng_hwmod_class = {
516 .name = "rng",
517 .sysc = &am33xx_rng_sysc,
518};
519
520static struct omap_hwmod am33xx_rng_hwmod = {
521 .name = "rng",
522 .class = &am33xx_rng_hwmod_class,
523 .clkdm_name = "l4ls_clkdm",
524 .flags = HWMOD_SWSUP_SIDLE,
525 .main_clk = "rng_fck",
526 .prcm = {
527 .omap4 = {
528 .clkctrl_offs = AM33XX_CM_PER_RNG_CLKCTRL_OFFSET,
529 .modulemode = MODULEMODE_SWCTRL,
530 },
531 },
532};
533
534static struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
535 .master = &am33xx_l4_ls_hwmod,
536 .slave = &am33xx_rng_hwmod,
537 .clk = "rng_fck",
538 .user = OCP_USER_MPU,
539};
540
541static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = { 506static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
542 &am33xx_l3_main__emif, 507 &am33xx_l3_main__emif,
543 &am33xx_mpu__l3_main, 508 &am33xx_mpu__l3_main,
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
index 61f2f301d739..afbce1f6f641 100644
--- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
@@ -442,6 +442,31 @@ static struct omap_hwmod am43xx_adc_tsc_hwmod = {
442 }, 442 },
443}; 443};
444 444
445static struct omap_hwmod_class_sysconfig am43xx_des_sysc = {
446 .rev_offs = 0x30,
447 .sysc_offs = 0x34,
448 .syss_offs = 0x38,
449 .sysc_flags = SYSS_HAS_RESET_STATUS,
450};
451
452static struct omap_hwmod_class am43xx_des_hwmod_class = {
453 .name = "des",
454 .sysc = &am43xx_des_sysc,
455};
456
457static struct omap_hwmod am43xx_des_hwmod = {
458 .name = "des",
459 .class = &am43xx_des_hwmod_class,
460 .clkdm_name = "l3_clkdm",
461 .main_clk = "l3_gclk",
462 .prcm = {
463 .omap4 = {
464 .clkctrl_offs = AM43XX_CM_PER_DES_CLKCTRL_OFFSET,
465 .modulemode = MODULEMODE_SWCTRL,
466 },
467 },
468};
469
445/* dss */ 470/* dss */
446 471
447static struct omap_hwmod am43xx_dss_core_hwmod = { 472static struct omap_hwmod am43xx_dss_core_hwmod = {
@@ -870,6 +895,13 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe1 = {
870 .user = OCP_USER_MPU | OCP_USER_SDMA, 895 .user = OCP_USER_MPU | OCP_USER_SDMA,
871}; 896};
872 897
898static struct omap_hwmod_ocp_if am43xx_l3_main__des = {
899 .master = &am33xx_l3_main_hwmod,
900 .slave = &am43xx_des_hwmod,
901 .clk = "l3_gclk",
902 .user = OCP_USER_MPU,
903};
904
873static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { 905static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
874 &am33xx_l4_wkup__synctimer, 906 &am33xx_l4_wkup__synctimer,
875 &am43xx_l4_ls__timer8, 907 &am43xx_l4_ls__timer8,
@@ -917,6 +949,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
917 &am33xx_l4_per__i2c2, 949 &am33xx_l4_per__i2c2,
918 &am33xx_l4_per__i2c3, 950 &am33xx_l4_per__i2c3,
919 &am33xx_l4_per__mailbox, 951 &am33xx_l4_per__mailbox,
952 &am33xx_l4_per__rng,
920 &am33xx_l4_ls__mcasp0, 953 &am33xx_l4_ls__mcasp0,
921 &am33xx_l4_ls__mcasp1, 954 &am33xx_l4_ls__mcasp1,
922 &am33xx_l4_ls__mmc0, 955 &am33xx_l4_ls__mmc0,
@@ -950,6 +983,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
950 &am33xx_cpgmac0__mdio, 983 &am33xx_cpgmac0__mdio,
951 &am33xx_l3_main__sha0, 984 &am33xx_l3_main__sha0,
952 &am33xx_l3_main__aes0, 985 &am33xx_l3_main__aes0,
986 &am43xx_l3_main__des,
953 &am43xx_l4_ls__ocp2scp0, 987 &am43xx_l4_ls__ocp2scp0,
954 &am43xx_l4_ls__ocp2scp1, 988 &am43xx_l4_ls__ocp2scp1,
955 &am43xx_l3_s__usbotgss0, 989 &am43xx_l3_s__usbotgss0,
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 1ab7096af8e2..d0585293a381 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -690,6 +690,78 @@ static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
690 .parent_hwmod = &dra7xx_dss_hwmod, 690 .parent_hwmod = &dra7xx_dss_hwmod,
691}; 691};
692 692
693/* AES (the 'P' (public) device) */
694static struct omap_hwmod_class_sysconfig dra7xx_aes_sysc = {
695 .rev_offs = 0x0080,
696 .sysc_offs = 0x0084,
697 .syss_offs = 0x0088,
698 .sysc_flags = SYSS_HAS_RESET_STATUS,
699};
700
701static struct omap_hwmod_class dra7xx_aes_hwmod_class = {
702 .name = "aes",
703 .sysc = &dra7xx_aes_sysc,
704 .rev = 2,
705};
706
707/* AES1 */
708static struct omap_hwmod dra7xx_aes1_hwmod = {
709 .name = "aes1",
710 .class = &dra7xx_aes_hwmod_class,
711 .clkdm_name = "l4sec_clkdm",
712 .main_clk = "l3_iclk_div",
713 .prcm = {
714 .omap4 = {
715 .clkctrl_offs = DRA7XX_CM_L4SEC_AES1_CLKCTRL_OFFSET,
716 .context_offs = DRA7XX_RM_L4SEC_AES1_CONTEXT_OFFSET,
717 .modulemode = MODULEMODE_HWCTRL,
718 },
719 },
720};
721
722/* AES2 */
723static struct omap_hwmod dra7xx_aes2_hwmod = {
724 .name = "aes2",
725 .class = &dra7xx_aes_hwmod_class,
726 .clkdm_name = "l4sec_clkdm",
727 .main_clk = "l3_iclk_div",
728 .prcm = {
729 .omap4 = {
730 .clkctrl_offs = DRA7XX_CM_L4SEC_AES2_CLKCTRL_OFFSET,
731 .context_offs = DRA7XX_RM_L4SEC_AES2_CONTEXT_OFFSET,
732 .modulemode = MODULEMODE_HWCTRL,
733 },
734 },
735};
736
737/* sha0 HIB2 (the 'P' (public) device) */
738static struct omap_hwmod_class_sysconfig dra7xx_sha0_sysc = {
739 .rev_offs = 0x100,
740 .sysc_offs = 0x110,
741 .syss_offs = 0x114,
742 .sysc_flags = SYSS_HAS_RESET_STATUS,
743};
744
745static struct omap_hwmod_class dra7xx_sha0_hwmod_class = {
746 .name = "sham",
747 .sysc = &dra7xx_sha0_sysc,
748 .rev = 2,
749};
750
751struct omap_hwmod dra7xx_sha0_hwmod = {
752 .name = "sham",
753 .class = &dra7xx_sha0_hwmod_class,
754 .clkdm_name = "l4sec_clkdm",
755 .main_clk = "l3_iclk_div",
756 .prcm = {
757 .omap4 = {
758 .clkctrl_offs = DRA7XX_CM_L4SEC_SHA2MD51_CLKCTRL_OFFSET,
759 .context_offs = DRA7XX_RM_L4SEC_SHA2MD51_CONTEXT_OFFSET,
760 .modulemode = MODULEMODE_HWCTRL,
761 },
762 },
763};
764
693/* 765/*
694 * 'elm' class 766 * 'elm' class
695 * 767 *
@@ -2541,6 +2613,62 @@ static struct omap_hwmod dra7xx_uart10_hwmod = {
2541 }, 2613 },
2542}; 2614};
2543 2615
2616/* DES (the 'P' (public) device) */
2617static struct omap_hwmod_class_sysconfig dra7xx_des_sysc = {
2618 .rev_offs = 0x0030,
2619 .sysc_offs = 0x0034,
2620 .syss_offs = 0x0038,
2621 .sysc_flags = SYSS_HAS_RESET_STATUS,
2622};
2623
2624static struct omap_hwmod_class dra7xx_des_hwmod_class = {
2625 .name = "des",
2626 .sysc = &dra7xx_des_sysc,
2627};
2628
2629/* DES */
2630static struct omap_hwmod dra7xx_des_hwmod = {
2631 .name = "des",
2632 .class = &dra7xx_des_hwmod_class,
2633 .clkdm_name = "l4sec_clkdm",
2634 .main_clk = "l3_iclk_div",
2635 .prcm = {
2636 .omap4 = {
2637 .clkctrl_offs = DRA7XX_CM_L4SEC_DES3DES_CLKCTRL_OFFSET,
2638 .context_offs = DRA7XX_RM_L4SEC_DES3DES_CONTEXT_OFFSET,
2639 .modulemode = MODULEMODE_HWCTRL,
2640 },
2641 },
2642};
2643
2644/* rng */
2645static struct omap_hwmod_class_sysconfig dra7xx_rng_sysc = {
2646 .rev_offs = 0x1fe0,
2647 .sysc_offs = 0x1fe4,
2648 .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
2649 .idlemodes = SIDLE_FORCE | SIDLE_NO,
2650 .sysc_fields = &omap_hwmod_sysc_type1,
2651};
2652
2653static struct omap_hwmod_class dra7xx_rng_hwmod_class = {
2654 .name = "rng",
2655 .sysc = &dra7xx_rng_sysc,
2656};
2657
2658static struct omap_hwmod dra7xx_rng_hwmod = {
2659 .name = "rng",
2660 .class = &dra7xx_rng_hwmod_class,
2661 .flags = HWMOD_SWSUP_SIDLE,
2662 .clkdm_name = "l4sec_clkdm",
2663 .prcm = {
2664 .omap4 = {
2665 .clkctrl_offs = DRA7XX_CM_L4SEC_RNG_CLKCTRL_OFFSET,
2666 .context_offs = DRA7XX_RM_L4SEC_RNG_CONTEXT_OFFSET,
2667 .modulemode = MODULEMODE_HWCTRL,
2668 },
2669 },
2670};
2671
2544/* 2672/*
2545 * 'usb_otg_ss' class 2673 * 'usb_otg_ss' class
2546 * 2674 *
@@ -2929,6 +3057,30 @@ static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
2929 .user = OCP_USER_MPU | OCP_USER_SDMA, 3057 .user = OCP_USER_MPU | OCP_USER_SDMA,
2930}; 3058};
2931 3059
3060/* l3_main_1 -> aes1 */
3061static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes1 = {
3062 .master = &dra7xx_l3_main_1_hwmod,
3063 .slave = &dra7xx_aes1_hwmod,
3064 .clk = "l3_iclk_div",
3065 .user = OCP_USER_MPU | OCP_USER_SDMA,
3066};
3067
3068/* l3_main_1 -> aes2 */
3069static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes2 = {
3070 .master = &dra7xx_l3_main_1_hwmod,
3071 .slave = &dra7xx_aes2_hwmod,
3072 .clk = "l3_iclk_div",
3073 .user = OCP_USER_MPU | OCP_USER_SDMA,
3074};
3075
3076/* l3_main_1 -> sha0 */
3077static struct omap_hwmod_ocp_if dra7xx_l3_main_1__sha0 = {
3078 .master = &dra7xx_l3_main_1_hwmod,
3079 .slave = &dra7xx_sha0_hwmod,
3080 .clk = "l3_iclk_div",
3081 .user = OCP_USER_MPU | OCP_USER_SDMA,
3082};
3083
2932/* l4_per2 -> mcasp1 */ 3084/* l4_per2 -> mcasp1 */
2933static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp1 = { 3085static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp1 = {
2934 .master = &dra7xx_l4_per2_hwmod, 3086 .master = &dra7xx_l4_per2_hwmod,
@@ -3642,6 +3794,14 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart7 = {
3642 .user = OCP_USER_MPU | OCP_USER_SDMA, 3794 .user = OCP_USER_MPU | OCP_USER_SDMA,
3643}; 3795};
3644 3796
3797/* l4_per1 -> des */
3798static struct omap_hwmod_ocp_if dra7xx_l4_per1__des = {
3799 .master = &dra7xx_l4_per1_hwmod,
3800 .slave = &dra7xx_des_hwmod,
3801 .clk = "l3_iclk_div",
3802 .user = OCP_USER_MPU | OCP_USER_SDMA,
3803};
3804
3645/* l4_per2 -> uart8 */ 3805/* l4_per2 -> uart8 */
3646static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart8 = { 3806static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart8 = {
3647 .master = &dra7xx_l4_per2_hwmod, 3807 .master = &dra7xx_l4_per2_hwmod,
@@ -3666,6 +3826,13 @@ static struct omap_hwmod_ocp_if dra7xx_l4_wkup__uart10 = {
3666 .user = OCP_USER_MPU | OCP_USER_SDMA, 3826 .user = OCP_USER_MPU | OCP_USER_SDMA,
3667}; 3827};
3668 3828
3829/* l4_per1 -> rng */
3830static struct omap_hwmod_ocp_if dra7xx_l4_per1__rng = {
3831 .master = &dra7xx_l4_per1_hwmod,
3832 .slave = &dra7xx_rng_hwmod,
3833 .user = OCP_USER_MPU,
3834};
3835
3669/* l4_per3 -> usb_otg_ss1 */ 3836/* l4_per3 -> usb_otg_ss1 */
3670static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = { 3837static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
3671 .master = &dra7xx_l4_per3_hwmod, 3838 .master = &dra7xx_l4_per3_hwmod,
@@ -3800,6 +3967,9 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3800 &dra7xx_l3_main_1__dss, 3967 &dra7xx_l3_main_1__dss,
3801 &dra7xx_l3_main_1__dispc, 3968 &dra7xx_l3_main_1__dispc,
3802 &dra7xx_l3_main_1__hdmi, 3969 &dra7xx_l3_main_1__hdmi,
3970 &dra7xx_l3_main_1__aes1,
3971 &dra7xx_l3_main_1__aes2,
3972 &dra7xx_l3_main_1__sha0,
3803 &dra7xx_l4_per1__elm, 3973 &dra7xx_l4_per1__elm,
3804 &dra7xx_l4_wkup__gpio1, 3974 &dra7xx_l4_wkup__gpio1,
3805 &dra7xx_l4_per1__gpio2, 3975 &dra7xx_l4_per1__gpio2,
@@ -3845,7 +4015,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3845 &dra7xx_l3_main_1__pciess2, 4015 &dra7xx_l3_main_1__pciess2,
3846 &dra7xx_l4_cfg__pciess2, 4016 &dra7xx_l4_cfg__pciess2,
3847 &dra7xx_l3_main_1__qspi, 4017 &dra7xx_l3_main_1__qspi,
3848 &dra7xx_l4_per3__rtcss,
3849 &dra7xx_l4_cfg__sata, 4018 &dra7xx_l4_cfg__sata,
3850 &dra7xx_l4_cfg__smartreflex_core, 4019 &dra7xx_l4_cfg__smartreflex_core,
3851 &dra7xx_l4_cfg__smartreflex_mpu, 4020 &dra7xx_l4_cfg__smartreflex_mpu,
@@ -3875,6 +4044,7 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3875 &dra7xx_l4_per2__uart8, 4044 &dra7xx_l4_per2__uart8,
3876 &dra7xx_l4_per2__uart9, 4045 &dra7xx_l4_per2__uart9,
3877 &dra7xx_l4_wkup__uart10, 4046 &dra7xx_l4_wkup__uart10,
4047 &dra7xx_l4_per1__des,
3878 &dra7xx_l4_per3__usb_otg_ss1, 4048 &dra7xx_l4_per3__usb_otg_ss1,
3879 &dra7xx_l4_per3__usb_otg_ss2, 4049 &dra7xx_l4_per3__usb_otg_ss2,
3880 &dra7xx_l4_per3__usb_otg_ss3, 4050 &dra7xx_l4_per3__usb_otg_ss3,
@@ -3892,6 +4062,7 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3892/* GP-only hwmod links */ 4062/* GP-only hwmod links */
3893static struct omap_hwmod_ocp_if *dra7xx_gp_hwmod_ocp_ifs[] __initdata = { 4063static struct omap_hwmod_ocp_if *dra7xx_gp_hwmod_ocp_ifs[] __initdata = {
3894 &dra7xx_l4_wkup__timer12, 4064 &dra7xx_l4_wkup__timer12,
4065 &dra7xx_l4_per1__rng,
3895 NULL, 4066 NULL,
3896}; 4067};
3897 4068
@@ -3905,6 +4076,11 @@ static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
3905 NULL, 4076 NULL,
3906}; 4077};
3907 4078
4079static struct omap_hwmod_ocp_if *dra74x_dra72x_hwmod_ocp_ifs[] __initdata = {
4080 &dra7xx_l4_per3__rtcss,
4081 NULL,
4082};
4083
3908int __init dra7xx_hwmod_init(void) 4084int __init dra7xx_hwmod_init(void)
3909{ 4085{
3910 int ret; 4086 int ret;
@@ -3920,5 +4096,9 @@ int __init dra7xx_hwmod_init(void)
3920 if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP) 4096 if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP)
3921 ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs); 4097 ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs);
3922 4098
4099 /* now for the IPs *NOT* in dra71 */
4100 if (!ret && !of_machine_is_compatible("ti,dra718"))
4101 ret = omap_hwmod_register_links(dra74x_dra72x_hwmod_ocp_ifs);
4102
3923 return ret; 4103 return ret;
3924} 4104}
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 178e22c146b7..b3870220612e 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -287,7 +287,7 @@ int __init omap4_pm_init(void)
287 /* Overwrite the default cpu_do_idle() */ 287 /* Overwrite the default cpu_do_idle() */
288 arm_pm_idle = omap_default_idle; 288 arm_pm_idle = omap_default_idle;
289 289
290 if (cpu_is_omap44xx()) 290 if (cpu_is_omap44xx() || soc_is_omap54xx())
291 omap4_idle_init(); 291 omap4_idle_init();
292 292
293err2: 293err2:
diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h
index babb5db5a3a4..e2ad14e77064 100644
--- a/arch/arm/mach-omap2/prcm43xx.h
+++ b/arch/arm/mach-omap2/prcm43xx.h
@@ -92,6 +92,7 @@
92#define AM43XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET 0x04b8 92#define AM43XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET 0x04b8
93#define AM43XX_CM_PER_MMC0_CLKCTRL_OFFSET 0x04c0 93#define AM43XX_CM_PER_MMC0_CLKCTRL_OFFSET 0x04c0
94#define AM43XX_CM_PER_MMC1_CLKCTRL_OFFSET 0x04c8 94#define AM43XX_CM_PER_MMC1_CLKCTRL_OFFSET 0x04c8
95#define AM43XX_CM_PER_RNG_CLKCTRL_OFFSET 0x04e0
95#define AM43XX_CM_PER_SPI0_CLKCTRL_OFFSET 0x0500 96#define AM43XX_CM_PER_SPI0_CLKCTRL_OFFSET 0x0500
96#define AM43XX_CM_PER_SPI1_CLKCTRL_OFFSET 0x0508 97#define AM43XX_CM_PER_SPI1_CLKCTRL_OFFSET 0x0508
97#define AM43XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET 0x0528 98#define AM43XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET 0x0528
@@ -133,6 +134,7 @@
133#define AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET 0x0050 134#define AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET 0x0050
134#define AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET 0x0058 135#define AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET 0x0058
135#define AM43XX_CM_PER_AES0_CLKCTRL_OFFSET 0x0028 136#define AM43XX_CM_PER_AES0_CLKCTRL_OFFSET 0x0028
137#define AM43XX_CM_PER_DES_CLKCTRL_OFFSET 0x0030
136#define AM43XX_CM_PER_TIMER8_CLKCTRL_OFFSET 0x0560 138#define AM43XX_CM_PER_TIMER8_CLKCTRL_OFFSET 0x0560
137#define AM43XX_CM_PER_TIMER9_CLKCTRL_OFFSET 0x0568 139#define AM43XX_CM_PER_TIMER9_CLKCTRL_OFFSET 0x0568
138#define AM43XX_CM_PER_TIMER10_CLKCTRL_OFFSET 0x0570 140#define AM43XX_CM_PER_TIMER10_CLKCTRL_OFFSET 0x0570