aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/reset/rmobile-reset.c
AgeCommit message (Collapse)AuthorFilesLines
2024-02-26power: reset: rmobile-reset: Make sysc_base2 localGeert Uytterhoeven1-3/+4
The static global variable sysc_base2 is no longer used outside the probe method and the reset handler, so it can be converted to a local variable, and passed to the reset handler via its callback data. Signed-off-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/35f04935c48ae55dc562071e0a1d6fca65234a58.1708944642.git.geert+renesas@glider.be Signed-off-by: Sebastian Reichel <[email protected]>
2024-02-21power: reset: rmobile-reset: Map correct MMIO resourceGeert Uytterhoeven1-1/+1
The registers related to reset generation are located in the second register block. However, the conversion to device life-cycle managed ioremap function accidentally changed the mapping to the first register block. Fixes: 0867276eb12230a5 ("power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helper") Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Andrew Davis <[email protected]> Link: https://lore.kernel.org/r/3b267fb1b303f63248934a1a77bee319e1c44879.1708458882.git.geert+renesas@glider.be Signed-off-by: Sebastian Reichel <[email protected]>
2024-02-13power: reset: rmobile-reset: Use devm_register_sys_off_handler(RESTART)Andrew Davis1-16/+6
Use device life-cycle managed register function to simplify probe and exit paths. Signed-off-by: Andrew Davis <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
2024-02-13power: reset: rmobile-reset: Use devm_platform_ioremap_resource() helperAndrew Davis1-9/+4
Use device life-cycle managed ioremap function to simplify probe and exit paths. Signed-off-by: Andrew Davis <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
2023-11-15power: reset: rmobile-reset: Convert to platform remove callback returning voidUwe Kleine-König1-3/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
2018-09-16power: reset: convert to SPDX identifiersKuninori Morimoto1-4/+1
This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
2015-01-21power: reset: Add reset driver for R-Mobile platformsGeert Uytterhoeven1-0/+91
Add a reset driver for Renesas R-Mobile and SH-Mobile SoCs. It registers a restart handler to trigger a soft power-on reset through the R-Mobile System Controller. The priority of this restart handler is 192, to allow a watchdog driver to use priority 128. Note that we do not use syscon-reboot, as the HPB (Peripheral Bus Bridge) semaphore should be acquired on systems where both the ARM and SH core are in use. The driver can be extended later to support this, when needed. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>