Skip to content

Commit db71189

Browse files
glneotmlind
authored andcommitted
ARM: OMAP2+: Add omap_secure_init callback hook for secure initialization
This can be used for detecting secure features or making early device init sequence changes based on device security type. Signed-off-by: Andrew F. Davis <[email protected]> Reviewed-by: Lokesh Vutla <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 4601832 commit db71189

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

arch/arm/mach-omap2/io.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include "prm33xx.h"
5252
#include "prm44xx.h"
5353
#include "opp2xxx.h"
54+
#include "omap-secure.h"
5455

5556
/*
5657
* omap_clk_soc_init: points to a function that does the SoC-specific
@@ -430,6 +431,7 @@ void __init omap2420_init_early(void)
430431
omap_hwmod_init_postsetup();
431432
omap_clk_soc_init = omap2420_dt_clk_init;
432433
rate_table = omap2420_rate_table;
434+
omap_secure_init();
433435
}
434436

435437
void __init omap2420_init_late(void)
@@ -454,6 +456,7 @@ void __init omap2430_init_early(void)
454456
omap_hwmod_init_postsetup();
455457
omap_clk_soc_init = omap2430_dt_clk_init;
456458
rate_table = omap2430_rate_table;
459+
omap_secure_init();
457460
}
458461

459462
void __init omap2430_init_late(void)
@@ -481,6 +484,7 @@ void __init omap3_init_early(void)
481484
omap3xxx_clockdomains_init();
482485
omap3xxx_hwmod_init();
483486
omap_hwmod_init_postsetup();
487+
omap_secure_init();
484488
}
485489

486490
void __init omap3430_init_early(void)
@@ -533,6 +537,7 @@ void __init ti814x_init_early(void)
533537
dm814x_hwmod_init();
534538
omap_hwmod_init_postsetup();
535539
omap_clk_soc_init = dm814x_dt_clk_init;
540+
omap_secure_init();
536541
}
537542

538543
void __init ti816x_init_early(void)
@@ -549,6 +554,7 @@ void __init ti816x_init_early(void)
549554
dm816x_hwmod_init();
550555
omap_hwmod_init_postsetup();
551556
omap_clk_soc_init = dm816x_dt_clk_init;
557+
omap_secure_init();
552558
}
553559
#endif
554560

@@ -566,6 +572,7 @@ void __init am33xx_init_early(void)
566572
am33xx_hwmod_init();
567573
omap_hwmod_init_postsetup();
568574
omap_clk_soc_init = am33xx_dt_clk_init;
575+
omap_secure_init();
569576
}
570577

571578
void __init am33xx_init_late(void)
@@ -589,6 +596,7 @@ void __init am43xx_init_early(void)
589596
omap_hwmod_init_postsetup();
590597
omap_l2_cache_init();
591598
omap_clk_soc_init = am43xx_dt_clk_init;
599+
omap_secure_init();
592600
}
593601

594602
void __init am43xx_init_late(void)
@@ -617,6 +625,7 @@ void __init omap4430_init_early(void)
617625
omap_hwmod_init_postsetup();
618626
omap_l2_cache_init();
619627
omap_clk_soc_init = omap4xxx_dt_clk_init;
628+
omap_secure_init();
620629
}
621630

622631
void __init omap4430_init_late(void)
@@ -643,6 +652,7 @@ void __init omap5_init_early(void)
643652
omap54xx_hwmod_init();
644653
omap_hwmod_init_postsetup();
645654
omap_clk_soc_init = omap5xxx_dt_clk_init;
655+
omap_secure_init();
646656
}
647657

648658
void __init omap5_init_late(void)
@@ -666,6 +676,7 @@ void __init dra7xx_init_early(void)
666676
dra7xx_hwmod_init();
667677
omap_hwmod_init_postsetup();
668678
omap_clk_soc_init = dra7xx_dt_clk_init;
679+
omap_secure_init();
669680
}
670681

671682
void __init dra7xx_init_late(void)

arch/arm/mach-omap2/omap-secure.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,7 @@ u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag)
163163
NO_FLAG,
164164
3, ptr, count, flag, 0);
165165
}
166+
167+
void __init omap_secure_init(void)
168+
{
169+
}

arch/arm/mach-omap2/omap-secure.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs,
7272
extern u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits);
7373
extern u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag);
7474

75+
void omap_secure_init(void);
76+
7577
#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
7678
void set_cntfreq(void);
7779
#else

0 commit comments

Comments
 (0)