Skip to content

Commit 60f81bf

Browse files
Gabriel-Fernandzbebarino
authored andcommitted
clk: stm32mp2: use of STM32 access controller
Use an STM32 access controller to filter the registration of clocks. If a clock is used by the security world, then it must not registered. Signed-off-by: Gabriel Fernandez <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 1613e60 commit 60f81bf

File tree

4 files changed

+290
-198
lines changed

4 files changed

+290
-198
lines changed

drivers/clk/stm32/clk-stm32-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static int stm32_rcc_clock_init(struct device *dev,
4646
struct clk_hw *hw = ERR_PTR(-ENOENT);
4747

4848
if (data->check_security &&
49-
data->check_security(base, cfg_clock))
49+
data->check_security(dev->of_node, base, cfg_clock))
5050
continue;
5151

5252
if (cfg_clock->func)

drivers/clk/stm32/clk-stm32-core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct stm32_rcc_match_data {
7171
unsigned int maxbinding;
7272
struct clk_stm32_clock_data *clock_data;
7373
struct clk_stm32_reset_data *reset_data;
74-
int (*check_security)(void __iomem *base,
74+
int (*check_security)(struct device_node *np, void __iomem *base,
7575
const struct clock_config *cfg);
7676
int (*multi_mux)(void __iomem *base, const struct clock_config *cfg);
7777
};

drivers/clk/stm32/clk-stm32mp13.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ static const struct clock_config stm32mp13_clock_cfg[] = {
14581458
STM32_COMPOSITE_CFG(CK_MCO2, ck_mco2, SECF_MCO2),
14591459
};
14601460

1461-
static int stm32mp13_clock_is_provided_by_secure(void __iomem *base,
1461+
static int stm32mp13_clock_is_provided_by_secure(struct device_node *np, void __iomem *base,
14621462
const struct clock_config *cfg)
14631463
{
14641464
int sec_id = cfg->sec_id;

0 commit comments

Comments
 (0)