diff options
author | Gabriel Fernandez <gabriel.fernandez@foss.st.com> | 2023-12-08 15:36:57 +0100 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-12-17 15:33:26 -0800 |
commit | 30500c2ad9c440d1a81e7a5dac3bcef62e21d910 (patch) | |
tree | 8d0acc4e88aa4ed58b2420286838cfb45885d45f /drivers/clk/stm32/reset-stm32.c | |
parent | 3ac7ca599515d335a55009c9c1016f244ef82a79 (diff) | |
download | linux-30500c2ad9c440d1a81e7a5dac3bcef62e21d910.tar.gz linux-30500c2ad9c440d1a81e7a5dac3bcef62e21d910.tar.bz2 linux-30500c2ad9c440d1a81e7a5dac3bcef62e21d910.zip |
clk: stm32mp1: use stm32mp13 reset driver
STM32MP15 is now using the same reset driver as STM32MP13 as they
have the same binding requirement.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Link: https://lore.kernel.org/r/20231208143700.354785-3-gabriel.fernandez@foss.st.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/stm32/reset-stm32.c')
-rw-r--r-- | drivers/clk/stm32/reset-stm32.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/clk/stm32/reset-stm32.c b/drivers/clk/stm32/reset-stm32.c index e89381528af9..14c2ee1eebee 100644 --- a/drivers/clk/stm32/reset-stm32.c +++ b/drivers/clk/stm32/reset-stm32.c @@ -11,9 +11,7 @@ #include <linux/slab.h> #include <linux/spinlock.h> -#include "clk-stm32-core.h" - -#define STM32_RESET_ID_MASK GENMASK(15, 0) +#include "reset-stm32.h" struct stm32_reset_data { /* reset lock */ @@ -99,24 +97,22 @@ static const struct reset_control_ops stm32_reset_ops = { .status = stm32_reset_status, }; -int stm32_rcc_reset_init(struct device *dev, const struct of_device_id *match, +int stm32_rcc_reset_init(struct device *dev, struct clk_stm32_reset_data *data, void __iomem *base) { - const struct stm32_rcc_match_data *data = match->data; - struct stm32_reset_data *reset_data = NULL; - - data = match->data; + struct stm32_reset_data *reset_data; reset_data = kzalloc(sizeof(*reset_data), GFP_KERNEL); if (!reset_data) return -ENOMEM; spin_lock_init(&reset_data->lock); + reset_data->membase = base; reset_data->rcdev.owner = THIS_MODULE; reset_data->rcdev.ops = &stm32_reset_ops; reset_data->rcdev.of_node = dev_of_node(dev); - reset_data->rcdev.nr_resets = STM32_RESET_ID_MASK; + reset_data->rcdev.nr_resets = data->nr_lines; reset_data->clear_offset = data->clear_offset; return reset_controller_register(&reset_data->rcdev); |