Skip to content

Commit bc2da26

Browse files
ConchuODbebarino
authored andcommitted
clk, reset: microchip: mpfs: fix incorrect preprocessor conditions
While moving all the reset code in the PolarFire SoC clock driver to the reset subsystem, I removed an `#if IS_ENABLED(RESET_CONTROLLER)` from the driver and moved it to the header, however this was not the correct thing to do. In the driver such a condition over-eagerly provided a complete implementation for mpfs_reset_{read,write}() when the reset subsystem was enabled without the PolarFire SoC reset driver, but in the header it meant that when the subsystem was enabled and the driver was not, no implementation for mpfs_reset_controller_register() was provided. Fix the condition so that the stub implementation of mpfs_reset_controller_register() is used when the reset driver is disabled. Fixes: 098c290 ("clock, reset: microchip: move all mpfs reset code to the reset subsystem") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202405082259.44DzHvaN-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202405082200.tBrEs5CZ-lkp@intel.com/ Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240508-unabashed-cheese-8f645b4f69ba@spud Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 098c290 commit bc2da26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/soc/microchip/mpfs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ struct mtd_info *mpfs_sys_controller_get_flash(struct mpfs_sys_controller *mpfs_
4343
#endif /* if IS_ENABLED(CONFIG_POLARFIRE_SOC_SYS_CTRL) */
4444

4545
#if IS_ENABLED(CONFIG_MCHP_CLK_MPFS)
46-
#if IS_ENABLED(CONFIG_RESET_CONTROLLER)
46+
#if IS_ENABLED(CONFIG_RESET_POLARFIRE_SOC)
4747
int mpfs_reset_controller_register(struct device *clk_dev, void __iomem *base);
4848
#else
4949
static inline int mpfs_reset_controller_register(struct device *clk_dev, void __iomem *base) { return 0; }
50-
#endif /* if IS_ENABLED(CONFIG_RESET_CONTROLLER) */
50+
#endif /* if IS_ENABLED(CONFIG_RESET_POLARFIRE_SOC) */
5151
#endif /* if IS_ENABLED(CONFIG_MCHP_CLK_MPFS) */
5252

5353
#endif /* __SOC_MPFS_H__ */

0 commit comments

Comments
 (0)