6ab0df5954ca100e1ae0390a2edbdbdb332dd2d4
[openwrt/staging/blocktrron.git] /
1 From e0b6ece7d54eba3187d15b357c94973fecdb4e52 Mon Sep 17 00:00:00 2001
2 From: Alberto Solavagione <albertosolavagione30@gmail.com>
3 Date: Wed, 20 Apr 2022 17:15:42 +0200
4 Subject: [PATCH] clk-bcm2835: use subsys_initcall for the clock driver
5 when IMA is enabled
6
7 Co-authored-by: Davide Scovotto <scovottodavide@gmail.com>
8 Co-developed-by: Davide Scovotto <scovottodavide@gmail.com>
9 Signed-off-by: Davide Scovotto <scovottodavide@gmail.com>
10 Signed-off-by: Alberto Solavagione <albertosolavagione30@gmail.com>
11 ---
12 drivers/clk/bcm/clk-bcm2835.c | 4 ++++
13 1 file changed, 4 insertions(+)
14
15 --- a/drivers/clk/bcm/clk-bcm2835.c
16 +++ b/drivers/clk/bcm/clk-bcm2835.c
17 @@ -2408,7 +2408,11 @@ static int __init __bcm2835_clk_driver_i
18 {
19 return platform_driver_register(&bcm2835_clk_driver);
20 }
21 +#ifdef CONFIG_IMA
22 +subsys_initcall(__bcm2835_clk_driver_init);
23 +#else
24 postcore_initcall(__bcm2835_clk_driver_init);
25 +#endif
26
27 MODULE_AUTHOR("Eric Anholt <eric@anholt.net>");
28 MODULE_DESCRIPTION("BCM2835 clock driver");