summaryrefslogtreecommitdiff
path: root/drivers/power/reset/xgene-reboot.c
AgeCommit message (Collapse)AuthorFilesLines
2016-09-19power: reset: xgene-reboot: Unmap region obtained by of_iomapArvind Yadav1-1/+3
Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-03-20power: constify of_device_id arrayFabian Frederick1-1/+1
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> [for vexpress] Acked-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2014-11-17power/reset: xgene: Register with kernel restart handlerGuenter Roeck1-10/+18
Register with kernel restart handler instead of setting arm_pm_restart directly. This patch also addresses the following compile warning. drivers/power/reset/xgene-reboot.c: In function 'xgene_reboot_probe': drivers/power/reset/xgene-reboot.c:77:17: warning: assignment from incompatible pointer type [enabled by default] The warning was due to a mismatch between the type of arm_pm_restart and the restart function. Cc: Loc Ho <lho@apm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-11-17power/reset: xgene: Use mdelay instead of jiffies based timeoutGuenter Roeck1-4/+2
jiffies are not running at this stage of system shutdown, meaning an error in the reset function would never be reported. Replace with mdelay(). Cc: Loc Ho <lho@apm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-11-17power/reset: xgene: Use local variable dev instead of pdev->devGuenter Roeck1-7/+8
Using a local variable dev to point to the device is simpler then repeatedly dereferencing pdev->dev. Cc: Loc Ho <lho@apm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-11-17power/reset: xgene: Drop devm_kfreeGuenter Roeck1-1/+0
Calling devm_kfree is unnecessary. Drop it. Cc: Loc Ho <lho@apm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-11-17power/reset: xgene: Return -ENOMEM if out of memoryGuenter Roeck1-4/+2
It is customary to return an error code of -ENOMEM if the system is out of memory. Also, in that case, the infrastructure will report an error, so it is unnecessary to report it again. Cc: Loc Ho <lho@apm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-09-06power/reset: xgene-reset: Fix prototype of xgene_restart()Mark Brown1-1/+1
The xgene-reset driver uses xgene_restart() as arm_pm_restart() but that function should take an enum reset_type as the first argument rather than a char. Fix this; the paramter is not referenced in the implementation. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2013-08-10power: Add APM X-Gene system reboot driverLoc Ho1-0/+103
Add APM X-Gene SoC system reboot driver. This driver handles only system reboot. System shutdown is board specific and can be handled by board driver or GPIO based shutdown driver. Signed-off-by: Loc Ho <lho@apm.com> Signed-off-by: Feng Kan <fkan@apm.com> Signed-off-by: Kumar Sankaran <ksankaran@apm.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>