mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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 <gabriel.fernandez@foss.st.com> Link: https://lore.kernel.org/r/20240529131310.260954-2-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
committed by
Stephen Boyd
parent
1613e604df
commit
60f81bfc98
@@ -46,7 +46,7 @@ static int stm32_rcc_clock_init(struct device *dev,
|
||||
struct clk_hw *hw = ERR_PTR(-ENOENT);
|
||||
|
||||
if (data->check_security &&
|
||||
data->check_security(base, cfg_clock))
|
||||
data->check_security(dev->of_node, base, cfg_clock))
|
||||
continue;
|
||||
|
||||
if (cfg_clock->func)
|
||||
|
||||
@@ -71,7 +71,7 @@ struct stm32_rcc_match_data {
|
||||
unsigned int maxbinding;
|
||||
struct clk_stm32_clock_data *clock_data;
|
||||
struct clk_stm32_reset_data *reset_data;
|
||||
int (*check_security)(void __iomem *base,
|
||||
int (*check_security)(struct device_node *np, void __iomem *base,
|
||||
const struct clock_config *cfg);
|
||||
int (*multi_mux)(void __iomem *base, const struct clock_config *cfg);
|
||||
};
|
||||
|
||||
@@ -1458,7 +1458,7 @@ static const struct clock_config stm32mp13_clock_cfg[] = {
|
||||
STM32_COMPOSITE_CFG(CK_MCO2, ck_mco2, SECF_MCO2),
|
||||
};
|
||||
|
||||
static int stm32mp13_clock_is_provided_by_secure(void __iomem *base,
|
||||
static int stm32mp13_clock_is_provided_by_secure(struct device_node *np, void __iomem *base,
|
||||
const struct clock_config *cfg)
|
||||
{
|
||||
int sec_id = cfg->sec_id;
|
||||
|
||||
+287
-195
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user