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>
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>
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>
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>
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>
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>
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>