| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/arch/arm/mach-omap2/io.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 11 | 12 | * Syed Khasim <x0khasim@ti.com> |
|---|
| 12 | 13 | * |
|---|
| 13 | 14 | * 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. |
|---|
| 18 | 15 | */ |
|---|
| 19 | 16 | #include <linux/module.h> |
|---|
| 20 | 17 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 54 | 51 | #include "prm33xx.h" |
|---|
| 55 | 52 | #include "prm44xx.h" |
|---|
| 56 | 53 | #include "opp2xxx.h" |
|---|
| 54 | +#include "omap-secure.h" |
|---|
| 57 | 55 | |
|---|
| 58 | 56 | /* |
|---|
| 59 | 57 | * omap_clk_soc_init: points to a function that does the SoC-specific |
|---|
| .. | .. |
|---|
| 411 | 409 | |
|---|
| 412 | 410 | static void __init __maybe_unused omap_hwmod_init_postsetup(void) |
|---|
| 413 | 411 | { |
|---|
| 414 | | - u8 postsetup_state; |
|---|
| 412 | + u8 postsetup_state = _HWMOD_STATE_DEFAULT; |
|---|
| 415 | 413 | |
|---|
| 416 | 414 | /* 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 |
|---|
| 422 | 415 | omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state); |
|---|
| 423 | 416 | } |
|---|
| 424 | 417 | |
|---|
| .. | .. |
|---|
| 489 | 482 | omap3xxx_clockdomains_init(); |
|---|
| 490 | 483 | omap3xxx_hwmod_init(); |
|---|
| 491 | 484 | omap_hwmod_init_postsetup(); |
|---|
| 485 | + omap_secure_init(); |
|---|
| 492 | 486 | } |
|---|
| 493 | 487 | |
|---|
| 494 | 488 | void __init omap3430_init_early(void) |
|---|
| .. | .. |
|---|
| 541 | 535 | dm814x_hwmod_init(); |
|---|
| 542 | 536 | omap_hwmod_init_postsetup(); |
|---|
| 543 | 537 | omap_clk_soc_init = dm814x_dt_clk_init; |
|---|
| 538 | + omap_secure_init(); |
|---|
| 544 | 539 | } |
|---|
| 545 | 540 | |
|---|
| 546 | 541 | void __init ti816x_init_early(void) |
|---|
| .. | .. |
|---|
| 557 | 552 | dm816x_hwmod_init(); |
|---|
| 558 | 553 | omap_hwmod_init_postsetup(); |
|---|
| 559 | 554 | omap_clk_soc_init = dm816x_dt_clk_init; |
|---|
| 555 | + omap_secure_init(); |
|---|
| 560 | 556 | } |
|---|
| 561 | 557 | #endif |
|---|
| 562 | 558 | |
|---|
| .. | .. |
|---|
| 574 | 570 | am33xx_hwmod_init(); |
|---|
| 575 | 571 | omap_hwmod_init_postsetup(); |
|---|
| 576 | 572 | omap_clk_soc_init = am33xx_dt_clk_init; |
|---|
| 573 | + omap_secure_init(); |
|---|
| 577 | 574 | } |
|---|
| 578 | 575 | |
|---|
| 579 | 576 | void __init am33xx_init_late(void) |
|---|
| .. | .. |
|---|
| 597 | 594 | omap_hwmod_init_postsetup(); |
|---|
| 598 | 595 | omap_l2_cache_init(); |
|---|
| 599 | 596 | omap_clk_soc_init = am43xx_dt_clk_init; |
|---|
| 597 | + omap_secure_init(); |
|---|
| 600 | 598 | } |
|---|
| 601 | 599 | |
|---|
| 602 | 600 | void __init am43xx_init_late(void) |
|---|
| .. | .. |
|---|
| 625 | 623 | omap_hwmod_init_postsetup(); |
|---|
| 626 | 624 | omap_l2_cache_init(); |
|---|
| 627 | 625 | omap_clk_soc_init = omap4xxx_dt_clk_init; |
|---|
| 626 | + omap_secure_init(); |
|---|
| 628 | 627 | } |
|---|
| 629 | 628 | |
|---|
| 630 | 629 | void __init omap4430_init_late(void) |
|---|
| .. | .. |
|---|
| 651 | 650 | omap54xx_hwmod_init(); |
|---|
| 652 | 651 | omap_hwmod_init_postsetup(); |
|---|
| 653 | 652 | omap_clk_soc_init = omap5xxx_dt_clk_init; |
|---|
| 653 | + omap_secure_init(); |
|---|
| 654 | 654 | } |
|---|
| 655 | 655 | |
|---|
| 656 | 656 | void __init omap5_init_late(void) |
|---|
| .. | .. |
|---|
| 674 | 674 | dra7xx_hwmod_init(); |
|---|
| 675 | 675 | omap_hwmod_init_postsetup(); |
|---|
| 676 | 676 | omap_clk_soc_init = dra7xx_dt_clk_init; |
|---|
| 677 | + omap_secure_init(); |
|---|
| 677 | 678 | } |
|---|
| 678 | 679 | |
|---|
| 679 | 680 | void __init dra7xx_init_late(void) |
|---|