Commit graph

9 commits

Author SHA1 Message Date
Arvind Yadav 896af83ef6 power: reset: xgene-reboot: Unmap region obtained by of_iomap
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>
2016-09-19 21:24:06 +02:00
Fabian Frederick 8fb0885504 power: constify of_device_id array
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>
2015-03-20 13:23:06 +01:00
Guenter Roeck 8f57f2310f power/reset: xgene: Register with kernel restart handler
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-17 03:07:09 +01:00
Guenter Roeck 745e19764a power/reset: xgene: Use mdelay instead of jiffies based timeout
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-17 03:07:09 +01:00
Guenter Roeck 43160718d9 power/reset: xgene: Use local variable dev instead of pdev->dev
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-17 03:07:09 +01:00
Guenter Roeck 22ecd65f40 power/reset: xgene: Drop devm_kfree
Calling devm_kfree is unnecessary. Drop it.

Cc: Loc Ho <lho@apm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-11-17 03:07:09 +01:00
Guenter Roeck ef288f9f65 power/reset: xgene: Return -ENOMEM if out of memory
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-11-17 03:07:09 +01:00
Mark Brown d3ed534cca power/reset: xgene-reset: Fix prototype of xgene_restart()
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>
2014-09-06 20:59:07 +02:00
Loc Ho 67778e0eda power: Add APM X-Gene system reboot driver
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>
2013-08-09 14:28:17 -07:00