clk, reset: microchip: mpfs: fix incorrect preprocessor conditions
Subsystems (2)
PATCH 1/1 clk, reset: microchip: mpfs: fix incorrect preprocessor conditions
From: Conor Dooley <[email protected]>
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.
---
CC: Conor Dooley <[email protected]>
CC: Daire McNamara <[email protected]>
CC: Stephen Boyd <[email protected]>
CC: [email protected]
CC: [email protected]
--- include/soc/microchip/mpfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/soc/microchip/mpfs.h +2 -2
@@ -43,11 +43,11 @@ struct mtd_info *mpfs_sys_controller_get_flash(struct mpfs_sys_controller *mpfs_#endif /* if IS_ENABLED(CONFIG_POLARFIRE_SOC_SYS_CTRL) */ #if IS_ENABLED (CONFIG_MCHP_CLK_MPFS ) -#if IS_ENABLED (CONFIG_RESET_CONTROLLER ) +#if IS_ENABLED (CONFIG_RESET_POLARFIRE_SOC )int mpfs_reset_controller_register (struct device *clk_dev,void __iomem *base);#else static inline int mpfs_reset_controller_register (struct device *clk_dev,void __iomem *base) {return 0 ; } -#endif /* if IS_ENABLED(CONFIG_RESET_CONTROLLER) */ +#endif /* if IS_ENABLED(CONFIG_RESET_POLARFIRE_SOC) */ #endif /* if IS_ENABLED(CONFIG_MCHP_CLK_MPFS) */ #endif /* __SOC_MPFS_H__ */
Signature · 1 line
2.43.0
Quoting Conor Dooley (2024-05-08 14:33:24)
Quoted 14 lines
From: Conor Dooley <[email protected]>
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 formpfs_reset_controller_register()was provided. Fix the condition so that the stub implementation ofmpfs_reset_controller_register()is used when the reset driver is disabled.
Quoted 6 lines
Fixes 098c290a490d ("clock, reset: microchip: move all mpfs reset code to the reset subsystem")Reported-by kernel test robot <[email protected]>Signed-off-by Conor Dooley <[email protected]>---
Applied to clk-next