forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/arch/arm/mach-omap2/io.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/arch/arm/mach-omap2/io.c
34 *
....@@ -11,10 +12,6 @@
1112 * Syed Khasim <x0khasim@ti.com>
1213 *
1314 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
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.
1815 */
1916 #include <linux/module.h>
2017 #include <linux/kernel.h>
....@@ -54,6 +51,7 @@
5451 #include "prm33xx.h"
5552 #include "prm44xx.h"
5653 #include "opp2xxx.h"
54
+#include "omap-secure.h"
5755
5856 /*
5957 * omap_clk_soc_init: points to a function that does the SoC-specific
....@@ -411,14 +409,9 @@
411409
412410 static void __init __maybe_unused omap_hwmod_init_postsetup(void)
413411 {
414
- u8 postsetup_state;
412
+ u8 postsetup_state = _HWMOD_STATE_DEFAULT;
415413
416414 /* Set the default postsetup state for all hwmods */
417
-#ifdef CONFIG_PM
418
- postsetup_state = _HWMOD_STATE_IDLE;
419
-#else
420
- postsetup_state = _HWMOD_STATE_ENABLED;
421
-#endif
422415 omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state);
423416 }
424417
....@@ -489,6 +482,7 @@
489482 omap3xxx_clockdomains_init();
490483 omap3xxx_hwmod_init();
491484 omap_hwmod_init_postsetup();
485
+ omap_secure_init();
492486 }
493487
494488 void __init omap3430_init_early(void)
....@@ -541,6 +535,7 @@
541535 dm814x_hwmod_init();
542536 omap_hwmod_init_postsetup();
543537 omap_clk_soc_init = dm814x_dt_clk_init;
538
+ omap_secure_init();
544539 }
545540
546541 void __init ti816x_init_early(void)
....@@ -557,6 +552,7 @@
557552 dm816x_hwmod_init();
558553 omap_hwmod_init_postsetup();
559554 omap_clk_soc_init = dm816x_dt_clk_init;
555
+ omap_secure_init();
560556 }
561557 #endif
562558
....@@ -574,6 +570,7 @@
574570 am33xx_hwmod_init();
575571 omap_hwmod_init_postsetup();
576572 omap_clk_soc_init = am33xx_dt_clk_init;
573
+ omap_secure_init();
577574 }
578575
579576 void __init am33xx_init_late(void)
....@@ -597,6 +594,7 @@
597594 omap_hwmod_init_postsetup();
598595 omap_l2_cache_init();
599596 omap_clk_soc_init = am43xx_dt_clk_init;
597
+ omap_secure_init();
600598 }
601599
602600 void __init am43xx_init_late(void)
....@@ -625,6 +623,7 @@
625623 omap_hwmod_init_postsetup();
626624 omap_l2_cache_init();
627625 omap_clk_soc_init = omap4xxx_dt_clk_init;
626
+ omap_secure_init();
628627 }
629628
630629 void __init omap4430_init_late(void)
....@@ -651,6 +650,7 @@
651650 omap54xx_hwmod_init();
652651 omap_hwmod_init_postsetup();
653652 omap_clk_soc_init = omap5xxx_dt_clk_init;
653
+ omap_secure_init();
654654 }
655655
656656 void __init omap5_init_late(void)
....@@ -674,6 +674,7 @@
674674 dra7xx_hwmod_init();
675675 omap_hwmod_init_postsetup();
676676 omap_clk_soc_init = dra7xx_dt_clk_init;
677
+ omap_secure_init();
677678 }
678679
679680 void __init dra7xx_init_late(void)